theofidry / AliceDataFixtures

Nelmio Alice extension to persist the loaded fixtures.
MIT License
311 stars 71 forks source link

Persister decoration doesn't work #170

Closed bravik closed 3 years ago

bravik commented 3 years ago

Hi,

I'm trying to decorate the Fidry\AliceDataFixtures\Bridge\Doctrine\Persister\ObjectManagerPersister:

services:
    Macroactive\App\Fixtures\CustomPersister:
        arguments:
            $defaultPersister: '@.inner'
        decorates: 'fidry_alice_data_fixtures.persistence.persister.doctrine.object_manager_persister'

However it doesn't work.

When I debug container, it seems that services are linked correctly: image

However when I dump $this->persister in PersisterLoader it still gets default ObjectManagerPersister: image

I've also tried to override the persister, but it doesn't work either. Is there anything missing?

bravik commented 3 years ago

Damn, writing an issues makes you find the cause faster... Hautelook/fixtures create ObjectManagerPersister manually in DoctrineOrmLoader. This issue is not relevant, please close.

alexislefebvre commented 3 years ago

You should have a close button below.