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

There is no active transaction #216

Closed yanarowana123 closed 2 years ago

yanarowana123 commented 2 years ago

"There is no active transaction" occurs when trying to flush $manager->flush().

package version v7.1.1

doctrine/dbal - 3.3.6

dmaicher commented 2 years ago

Can you provide a reproducer? I cannot help with just that information.

yanarowana123 commented 2 years ago

Found out that problems occurs only when i use doctrine-data-fixtures.

I guess the problem refers to https://www.doctrine-project.org/projects/doctrine-data-fixtures/en/latest/explanation/transactions-and-purging.html.

I am using Mysql 5.7

dmaicher commented 2 years ago

Yeah. Can you try configuring it to use DELETE instead of TRUNCATE?

yanarowana123 commented 2 years ago

It works now. Thanks!

beejaz commented 1 year ago

Yeah. Can you try configuring it to use DELETE instead of TRUNCATE?

Hi, can someone point me in correct dirrection for where I need to change "it" to DELETE instead of TRUNCATE?

Im using php 8.2, MySQL 8, Symfony 6.3, dama/doctrine-test-bundle 7.2 and doctrine/doctrine-fixtures-bundle 3.4 and I get this error when adding this bundle in phpunit.xml.dist