Download the PHP package crovitche/swiss-geo-bundle without Composer
On this page you can find all versions of the php package crovitche/swiss-geo-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download crovitche/swiss-geo-bundle
More information about crovitche/swiss-geo-bundle
Files in crovitche/swiss-geo-bundle
Package swiss-geo-bundle
Short Description Import swiss building addresses, streets and localities locally on your MySQL database using Doctrine ORM
License GPL-3.0-only
Informations about the package swiss-geo-bundle
SwissGeoBundle
SwissGeoBundle provide you a clean way to use swiss building addresses. If you have the following use cases, this bundle can be useful for you :
- An autocomplete address input without incorrect address entries
- Store addresses locally (offline !)
- "I want to locate my clients on a map offline."
- Create statistics based on addresses:
- "In which locality do I have the majority of my customers?"
- Avoid Google Map services and therefore save money
- Avoid having postal addresses that are no longer valid.
- "How can this customer live here? This building has been destroyed!"
- Get some information about addresses:
- "Is this building partly residential ?"
- "Is this address on a street or a place?"
- "Is this address already built or planned ?"
- ...
Technical requirements
SwissGeoBundle requires the following:
- MySQL 8.0 or higher (other RDBMS coming soon...) with this options activated:
- PHP 8.1 or higher
- Symfony components specified in
composer.json
- Doctrine ORM entities (Doctrine ODM is not supported)
- Meilisearch v1.5 - Necessary for full address search (performance too low otherwise)
Installation
Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.
Applications that use Symfony Flex
Open a command console, enter your project directory and execute:
Then make sure the bundle is enabled in registered bundles in
config/bundles.php
if your application doesn't use Symfony Flex.
Getting started
Run the following commands and put them in a cron if you want your data to be updated regularly.
1. Configure your entity
2. Create a database migration.
To do this, you have to use DoctrineMigrationBundle.
Generate a migration using Maker bundle.
This command will automatically generate the SQL you in a migration php file.
Check the created migration and add this piece of code if it does not exist :
3. Execute the migration
4. Import data
Note: you can also run the following commands in a cron job so that your data is regularly updated.
4.1 Localities
4.2 Streets
4.3 Building addresses
4.4 Generate/update documents in Meilisearch
All versions of swiss-geo-bundle with dependencies
doctrine/doctrine-bundle Version ^2.13
doctrine/orm Version ^2.13 || ^3.0
guzzlehttp/guzzle Version ^7.7
http-interop/http-factory-guzzle Version ^1.0
league/csv Version ^9.7
meilisearch/meilisearch-php Version ^1.5
symfony/cache Version ^6.4|^7.0
symfony/config Version ^6.4|^7.0
symfony/console Version ^6.4|^7.0
symfony/dependency-injection Version ^6.4|^7.0
symfony/filesystem Version ^6.4|^7.0
symfony/finder Version ^6.4|^7.0
symfony/http-client Version ^6.4|^7.0
symfony/http-foundation Version ^6.4|^7.0
symfony/form Version ^6.4|^7.0
symfony/monolog-bundle Version ^3.7
symfony/options-resolver Version ^6.4|^7.0
symfony/lock Version ^6.4|^7.0
symfony/yaml Version ^6.4|^7.0