Installation
Install the plugin in your application:
composer require dereuromark/cakephp-geoComposer defines supported PHP and CakePHP versions.
Load the plugin
In src/Application.php, inside bootstrap() after parent::bootstrap():
$this->addPlugin('Geo', ['routes' => false]);This loads plugin bootstrap configuration while leaving the admin backend disabled. Map helpers and coordinate calculations do not need admin routes or a database migration.
Optional geocoding packages
Address lookup needs a provider package in addition to the plugin. Select a package matching your provider. For Google:
composer require geocoder-php/google-maps-providerFor Nominatim:
composer require geocoder-php/nominatim-providerThese packages install their geocoder dependencies. geocoder-php/provider-implementation is a virtual package fulfilled by concrete providers; it is not an adapter you instantiate.
The built-in Geoapify and Null providers use geocoder interfaces and address models. If using them without another provider package, install the core library:
composer require willdurand/geocoderConfigure the chosen provider in the Geocoder reference. Google and Geoapify need credentials. For the public Nominatim service, use an identifying User-Agent and follow its usage policy.
Optional database cache
Only caching and the admin cache interface need the plugin table. With CakePHP Migrations installed and loaded, run:
bin/cake migrations migrate -p GeoThe cache's data column uses JSON. Normal plugin bootstrap also registers the legacy object type, but the current cache does not require an additional manual type mapping.
Next step
Getting started renders a Leaflet map with fixed coordinates. Add geocoding or caching once that works.