Question

I updated my vendors on symfony2, and after I began to got this error, I have no idea why it appears

uan@juan-VirtualBox:/var/www/msw-web$ php app/console doctrine:migrations:diff PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0

PHP Fatal error: Call to undefined method Doctrine\DBAL\Configuration::getFilterSchemaAssetsExpression() in /var/www/msw-web/vendor/doctrine-migrations/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/DiffCommand.php on line 85 PHP Stack trace: PHP 1. {main}() /var/www/msw-web/app/console:0 PHP 2. Symfony\Component\Console\Application->run() /var/www/msw-web/app/console:22 PHP 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/msw-web/vendor/symfony/src/Symfony/Component/Console/Application.php:118 PHP 4. Symfony\Component\Console\Application->doRun() /var/www/msw-web/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:75 PHP 5. Symfony\Component\Console\Command\Command->run() /var/www/msw-web/vendor/symfony/src/Symfony/Component/Console/Application.php:194 PHP 6. Symfony\Bundle\DoctrineMigrationsBundle\Command\MigrationsDiffDoctrineCommand->execute() /var/www/msw-web/vendor/symfony/src/Symfony/Component/Console/Command/Command.php:224 PHP 7. Doctrine\DBAL\Migrations\Tools\Console\Command\DiffCommand->execute() /var/www/msw-web/vendor/bundles/Symfony/Bundle/DoctrineMigrationsBundle/Command/MigrationsDiffDoctrineCommand.php:46

Fatal error: Call to undefined method Doctrine\DBAL\Configuration::getFilterSchemaAssetsExpression() in /var/www/msw-web/vendor/doctrine-migrations/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/DiffCommand.php on line 85

Call Stack: 0.0003 328524 1. {main}() /var/www/msw-web/app/console:0 0.0210 1930264 2. Symfony\Component\Console\Application->run() /var/www/msw-web/app/console:22 0.0289 2110852 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/msw-web/vendor/symfony/src/Symfony/Component/Console/Application.php:118 0.1349 7697284 4. Symfony\Component\Console\Application->doRun() /var/www/msw-web/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:75 0.1422 7697284 5. Symfony\Component\Console\Command\Command->run() /var/www/msw-web/vendor/symfony/src/Symfony/Component/Console/Application.php:194 0.1432 7697828 6. Symfony\Bundle\DoctrineMigrationsBundle\Command\MigrationsDiffDoctrineCommand->execute() /var/www/msw-web/vendor/symfony/src/Symfony/Component/Console/Command/Command.php:224 0.1767 11022484 7. Doctrine\DBAL\Migrations\Tools\Console\Command\DiffCommand->execute() /var/www/msw-web/vendor/bundles/Symfony/Bundle/DoctrineMigrationsBundle/Command/MigrationsDiffDoctrineCommand.php:46

juan@juan-VirtualBox:/var/www/msw-web$

I am not sure if the problem came from Doctrine.


I tryed to update doctrine dbal, I used on mi file deps

doctrine-common
    git=http://github.com/doctrine/common.git
    version=2.2.1

doctrine-dbal
    git=http://github.com/doctrine/dbal.git
    version=2.2.1

doctrine
    git=http://github.com/doctrine/doctrine2.git
    version=2.2.1

But I get the same error because when I reinstall vendor it download the version 2.1.X

What can I do?

Regards.

Was it helpful?

Solution

set commit version value in deps file

[doctrine-migrations]
    git=http://github.com/doctrine/migrations.git
    version=b86b4cc0a39714f0aa53b908d495beacfa0e4011

OTHER TIPS

You should check which version of Doctrine/DBAL do you have. Probably you have incompatibile versions of DoctrineMigrations and DoctrineDBAL.

Method 'getFilterSchemaAssetsExpression` was added in 2.2 IIRC. See that commit

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top