dmaicher / doctrine-test-bundle

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

Handle DB cleanup with triggers #159

Closed pabloelcolombiano closed 3 years ago

pabloelcolombiano commented 3 years ago

Thanks for the great plugin!

I am stuck with the implicit committing matter reported in the troubleshooting section.

Are you aware of any solution/alternative for Symfony?

I have developed a solution for CakePHP based on triggers, rather than transactions. This also presents the advantage that the database is not emptied after the tests but before, which facilitates debugging after a test is run.

If this is of any interest to the Symfony community, I could propose an extension of the present package.

dmaicher commented 3 years ago

I am stuck with the implicit committing matter reported in the troubleshooting section.

So you are running DDL queries during test cases? Maybe you could avoid this somehow?

Are you aware of any solution/alternative for Symfony?

I don't know any solution that is based on triggers.

If this is of any interest to the Symfony community, I could propose an extension of the present package.

I personally do not have the need for something like this but maybe someone else in the community would use it? I guess you could try creating your own library/bundle. I would not extend this bundle with this functionality.