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

LatestCommand Issue #91

Closed
github-scott opened this issue Mar 18, 2014 · 13 comments
Closed

LatestCommand Issue #91

github-scott opened this issue Mar 18, 2014 · 13 comments
Labels

Comments

@github-scott
Copy link

Since this commit - bf9bcb3

I now get this error:-

PHP Fatal error: Class 'Doctrine\DBAL\Migrations\Tools\Console\Command\LatestCommand' not found in /...../vendor/doctrine/doctrine-migrations-bundle/Doctrine/Bundle/MigrationsBundle/Command/MigrationsLatestDoctrineCommand.php on line 30

Is there a dependancy required to make sure Doctrine\DBAL\Migrations\Tools\Console\Command\LatestCommand exists?

@odino
Copy link
Member

odino commented Mar 18, 2014

since this was integrated in migrations, I think you should stick to dev-master...anything we can help with?

@stof
Copy link
Member

stof commented Mar 18, 2014

We should register the command only when the LatestCommand command is available. You can look at DoctrineBundle or DoctrinePHPCRBundle for such cases

@github-scott
Copy link
Author

It is on dev-master although it broke when composer updated to bf9bcb3. Seems like I can get it working by adding "doctrine/migrations": "1.0.x-dev", to my composer file. I think the requirement should be updated to a version of doctrine/migrations which has the LatestCommand file or Stof's suggestion.

@stof
Copy link
Member

stof commented Mar 18, 2014

@github-scott if you don't allow dev versions of doctrine/migrations in your project, there is strictly no change to get the latest dev version of the library, even if we change the requirement (you may get a "package not found" error)

@dincho
Copy link

dincho commented Mar 18, 2014

The same here. Because the bundle require "doctrine/migrations": "~1.0@dev", composer installs v1.0-ALPHA1 of doctrine/migrations, which is missing the LatestCommand

@stof
Copy link
Member

stof commented Mar 19, 2014

do you have prefer-stable: true somewhere in your composer config ?

@github-scott
Copy link
Author

I have "minimum-stability": "alpha" in the composer file so I assume this is causing the problem for me.

@stof
Copy link
Member

stof commented Mar 19, 2014

well, as I said, you have to whitelist the dev version of doctrine/migrations for now.

@dincho
Copy link

dincho commented Mar 19, 2014

I've

    "minimum-stability": "dev",
    "prefer-stable": true,

Indeed adding "doctrine/migrations": "dev-master", explicitly works. However, it worked before without it. I don't know what should be the correct behaviour, but it's kinda strange a working composer config to brake at some point without changes.

@stof
Copy link
Member

stof commented Mar 19, 2014

Well, the culprit is indeed "prefer-stable": true, as it will prefer the old alpha instead of the dev version.
The bundle should indeed be fixed (which is why the issue is not closed) but I wanted to understand why you got an old version

@Strate
Copy link

Strate commented Mar 30, 2014

Me also got an old version, same issue.

@mikeSimonson
Copy link
Contributor

Closing as it's old and probably fixed by that commit 0a3c377

@dincho
Copy link

dincho commented Jan 13, 2016

I can confirm that below config works:

    "minimum-stability": "dev",
    "prefer-stable": true,
    "require": {
        "doctrine/doctrine-migrations-bundle": "1.*",
    }

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

No branches or pull requests

6 participants