doctrine-fixtures icon indicating copy to clipboard operation
doctrine-fixtures copied to clipboard

Fixtures as services

Open Gappa opened this issue 1 year ago • 1 comments

Since the --fixtures option has been removed (#28), would it be possible to load fixtures registered as services?

doctrine/DoctrineFixturesBundle loads fixtures that implement the ORMFixtureInterface:

  • https://symfony.com/bundles/DoctrineFixturesBundle/current/index.html#loading-fixtures
  • https://github.com/doctrine/data-fixtures/blob/ae4e845decbe177348fdbecd04331f4fb96aa301/src/FixtureInterface.php

The common interface in doctrine/data-fixtures is this one:

  • https://github.com/doctrine/data-fixtures/blob/ae4e845decbe177348fdbecd04331f4fb96aa301/src/FixtureInterface.php

This could be used to automatically load fixtures from extensions. Just an idea :)

Gappa avatar Oct 12 '23 05:10 Gappa

Sure, that make sense.

f3l1x avatar Oct 12 '23 07:10 f3l1x