Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AbstractMigration doesn't have a getName method anymore #49

Closed
skmetaly opened this issue Nov 4, 2016 · 2 comments
Closed

AbstractMigration doesn't have a getName method anymore #49

skmetaly opened this issue Nov 4, 2016 · 2 comments

Comments

@skmetaly
Copy link
Collaborator

skmetaly commented Nov 4, 2016

https://github.com/doctrine/migrations/blob/master/lib/Doctrine/DBAL/Migrations/AbstractMigration.php

the getMigratedVersions function depends on a getName() method for each migration to have in order to determine it's name.

Since AbstractMigration had an empty getName() this wasn't a problem until now.

So now when running
./meteor.phar migrations:migrate

We get
PHP Fatal error: Call to undefined method DoctrineMigrations\Version20140122155355::getName() in /var/www/jadu/vendor/doctrine/migrations/lib/Doctrine/DBAL/Migrations/Version.php on line 114

@jedkirby
Copy link
Contributor

jedkirby commented Nov 7, 2016

@skmetaly Can't see anywhere in the AbstractMigration where there is a getName() method ... Are you sure it wasn't trying to be used within the Version20140122155355 migration?

@skmetaly
Copy link
Collaborator Author

skmetaly commented Nov 8, 2016

@jedkirby Found the issue.
Because of autoloading of the install vendor/ folder in some migrations ( for example ones that are using spacecraft/migrations ) composer overrides the autoloads from meteor.

This can cause issues like in this case where doctrine/migrations version differs from meteor and CMS.
We have a good case here where we can spot this issues, but there might be cases when meteor upgrades to minimum dependency of php 5.6 which will have different version of dependencies than the CMS one .

One option would be to automatically autoload the necessary classes ( for example the spacecraft/migrations package ) through a meteor extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants