dmaicher / doctrine-test-bundle

Symfony bundle to isolate your app's doctrine database tests and improve the test performance
MIT License
1.08k stars 61 forks source link

Update README.md #276

Closed Leanne251 closed 9 months ago

Leanne251 commented 9 months ago

I was trying to update the doctrine.yml file for a while.. no luck. i almost gave up.. but then noticed this file this morning.

Not sure if this little hint will be helpful for anyone else

dmaicher commented 9 months ago

I guess you are referring to the file coming from the recipe?

This is not the correct place to edit that use_savepoints option though. This needs to be done on the doctrine dbal config.

dmaicher commented 9 months ago

See https://www.doctrine-project.org/projects/doctrine-bundle/en/2.11/configuration.html#line-number-323669d70f6e461d0d8560b717bfc7fe4ffe822d-85

Leanne251 commented 9 months ago

recipe

Yeah... I put the save points change in there and i didnt have any probelms. But to be fair, its not deleting my test data each time I run the test (should it do this automatically, or do I need to import something / add a use statement? )

I tried initially to add this information the doctrine.yml file at the top. Like this: doctrine: dbal: connections: default: use_savepoints: true url: '%env(resolve:DATABASE_URL)%' profiling_collect_backtrace: '%kernel.debug%'

    But i kept getting errors?