symfonydoctrinemigration

"There is no active transaction" in Doctrine migrations


I try to apply migrations, first three of them to create table, the last one - insert data. When i run php bin/console doctrine:migrations:migrate it gives me an error "There is no active transaction" after each migration and had stoped migration. So i had to run migrations:migrate 4 times. Whats could be the problem?


Solution

  • If you use PHP 8.0, implements "isTransactional" in migration class and return false (See https://github.com/doctrine/DoctrineMigrationsBundle/issues/393)