Executing Fixtures


Since the Starter Pack fixtures are appended to the existing Sylius fixtures, you can load them by running:
php bin/console sylius:fixtures:load --no-interaction

Known Issues

Some block attributes reference entity IDs (e.g., product.id, taxon.id).

By default, Sylius fixtures perform a full database purge using Doctrine’s orm_purger listener with the DELETE strategy. While this removes all data, it does not reset autoincrement indexes, potentially causing entity reference mismatches.

Although Doctrine and Sylius allow setting orm_purger to truncate, this approach isn't compatible with MySQL due to foreign key constraints (it results in a cannot truncate a table referenced in a foreign key constraint error). In contrast, PostgreSQL supports this behavior using the TRUNCATE ... CASCADE option.

💡 Recommended Approach

To ensure stable entity references during fixture loading, we recommend dropping and recreating the database before loading fixtures.
⚠️ Warning: the command below will drop your existing database. Be sure to back it up first!
Drop and Recreate the Database + Load Fixtures From the root of your project, run:
1php bin/console doctrine:database:drop --force && \ 2php bin/console doctrine:database:create && \ 3php bin/console doctrine:migrations:migrate --no-interaction && \ 4php bin/console sylius:fixtures:load --no-interaction 5
Three, two, one...

Ready for DegDitor?

Try the plugin

Experience the best features at no cost

Get a better understanding of DegDitor and how it works

Test it risk-free and see the results

Try it

Get a demo

Get a personalized demo tailored to your unique needs

Preview our pricing plans

Evaluate DegDitor against your requirements

Get a demo

We are here for you

After months of intense development, it’s time to put DegDitor to work. For feedback, questions or information please contact us!

Contact us