Skip to content

Latest commit

 

History

History
49 lines (28 loc) · 3.17 KB

UPGRADE.md

File metadata and controls

49 lines (28 loc) · 3.17 KB

Upgrading guide

From 1.x to 2.x

  1. Remove DataLoaders. Instead of having a data loader to reference a file in a different folder, you can create a "dummy" file, which will only contain an include statement and refer to the other file.

  2. The persistence layer has been moved to FidryAliceDataFixtures. As a result, refer to this library documentation for configuration related to the database.

  3. Alice now ships with a Symfony bundle so some elements of the configuration have been moved from HautelookAliceBundle to NelmioAliceBundle.

  4. The default and recommended location of fixtures have been changed from src/AppBundle/DataFixtures{/ORM} to Resources/fixtures{/orm} instead (from app or one of your bundle).

  5. Faker provider are now registered with the tag nelmio_alice.faker.provider instead of hautelook_alice.faker.provider.

  6. Processors are now registered with the tag fidry_alice_data_fixtures.processor instead of hautelook_alice.alice.processor

From 0.2 to 1.x

Upgrading the data loaders

  1. You data loader should now either extend Hautelook\AliceBundle\Doctrine\DataFixtures\AbstractLoader or implement Hautelook\AliceBundle\Doctrine\DataFixtures\LoaderInterface.

  2. If you were overriding the ::load() function of the data loader, you should not need it anymore now:

  1. If you had very long path for some fixtures because you needed to refer to the fixtures of another bundle, you can now use the bundle annotation @Bundlename.

  2. If you had several data loaders to manage different set of fixtures depending of your environment, now you can devide your fixtures by environment instead of having to use and specify a data loader for that.

Doctrine command

You should now rely on the bundle command hautelook_alice:doctrine:fixtures:load (or h:d:f:l) instead of doctrine:fixtures:load.

Remove DoctrineFixturesBundle

As explained here, there is no obligation to do so. HautelookAliceBundle is fully compatible with it. However it does not make sense to use the both of them together. It is recommended to choose only one.

Back to the documentation