This package is abandoned and no longer maintained. No replacement package was suggested.

Bundle for provinces

v1.0.2 2012-06-27 09:52 UTC

This package is auto-updated.

Last update: 2022-02-01 12:20:52 UTC


This bundle is intended to allow you to easily have the basic structure of regions-provinces of a given country (or all, I hope).

Build Status

Installation and configuration:

Get the bundle

Add to your /deps file :

  • Side note: if you want provinces and regions in the database, you will need doctrine-fixtures and DoctrineFixturesBundle


And make a php bin/vendors install.

Register the namespace


  // app/autoload.php
      'Egulias' => __DIR__.'/../vendor/bundles',
      // your other namespaces
  • Installation note for Database fixtures: Also add this to registerNamespaces

        'Doctrine\\Common' => __DIR__.'/../vendor/doctrine-common/lib', 

Add EguliasProvincesBundle to your application kernel


  // app/AppKernel.php
  public function registerBundles()
    return array(
      // ...
      new Egulias\EguliasProvincesBundle\EguliasProvincesBundle(),
      // ...
  • Installation note for Database fixtures: Also add
    new Symfony\Bundle\DoctrineFixturesBundle\DoctrineFixturesBundle(),


  • Without a database Just use the needed localized Entity for regions or provinces (as of this writing, only SpainProvince) and use the provided methods.

  • With Database Features have been removed, but will be available soon

    • First you'll need to do a app/console doctrine:schema:update --force (or --dump-sql first to see the sql to be executed) to generate the db tables.
    • Secondly you'll need to dump data with app/console doctrine:fixtures:load --fixtures=vendor/bundles/Egulias/EguliasProvincesBundle/DataFixtures/ORM/ If you want just to dump specific countries data, just point to the corresponding data fixture (e.g LoadSpanishRegions)