доке https://symfony.com/bundles/DoctrineFixturesBundle/current/index.html#loading-fixtures сказано:
This command looks for all services tagged with doctrine.fixture.orm. If you're using the default service configuration, any class that implements ORMFixtureInterface (for example, those extending from Fixture) will automatically be registered with this tag.
Т.е., по сути, в services.yaml достаточно прописать:
App\:
resource: '../src/'
exclude:
- '../src/DependencyInjection/'
- '../src/Entity/'
- '../src/Kernel.php'
- '../src/Tests/'
DataFixtures\:
resource: '../fixtures/'
и всё должно заработать. Но оно не хочет...
Автозагрузка?
Обсуждают сегодня