I am trying to use Doctrine 2 Migrations in my Symfony project.
for that, I first put
[doctrine-migrations]
git=http://github.com/doctrine/migrations.git
[DoctrineMigrationsBundle]
git=http://github.com/doctrine/DoctrineMigrationsBundle.git
target=/bundles/Symfony/Bundle/DoctrineMigrationsBundle
version=origin/2.0
in th deps file.
Then I am updating vendors with:
php bin/vendors install
And try to use
php app/console doctrine:migrations:diff
But I am getting there a fatal error:
PHP Fatal error: Call to undefined method Doctrine\DBAL\Configuration::getFilterSchemaAssetsExpression() in /home/milos/workspace/Symfony/vendor/doctrine-migrations/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/DiffCommand.php on line 85
Fatal error: Call to undefined method Doctrine\DBAL\Configuration::getFilterSchemaAssetsExpression() in /home/milos/workspace/Symfony/vendor/doctrine-migrations/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/DiffCommand.php on line 85
Well, the problem is that doctrine migration is calling a function which only exists in Doctrine 2.2, not Doctrine 2.1. This was just introduced a few days ago in this commit
The problem is that doctrine-migrations does not have any branches or tags, so you cannot ask for an older version which works for you.
It is difficult to upgrade to Doctrine 2.2 if you are using symfony-2.0. So, what I would do is remove the lines introduced in that commit manually for now and then open a new issue on the doctrine-migrations github explaining the situiation and asking for a fix (probably the best idea would be to add a tag for the version which is compatible with Doctrine 2.1)
EDIT
This has been fixed now thanks to the issue opened by @Milos! You should not find this problem anymore.