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

use ocramius/package-versions 2.0 to support composer 2 #1066

Closed
czhDavid opened this issue Oct 26, 2020 · 3 comments
Closed

use ocramius/package-versions 2.0 to support composer 2 #1066

czhDavid opened this issue Oct 26, 2020 · 3 comments

Comments

@czhDavid
Copy link

Feature Request

Q A
New Feature no
RFC no
BC Break no

Summary

Doctrine migrations requires ocramius/package-versions in version ^1.3 .
This version is using composer plugin which was dropped in composer version 2.
ocramius/package-versions 2.0 is out which is compatible with composer 2 and if possible shoud be used with doctrine migrations.

@stof
Copy link
Member

stof commented Oct 26, 2020

ocramius/package-versions 1.x can also support composer 2 in 1.8+. But it only supports Composer 2 in versions requiring PHP 7.4+.
What the ORM did is switching to composer/package-versions-deprecated which replaces ocramius/package-versions but supports Composer 1 and 2 on PHP 7.0+. This allows to keep the existing PHP support matrix.

Once dropping support for Composer 1 is an option (we should watch for Composer announcements about how the migration to Composer 2 happens), using composer-runtime-api directly will be the right path (ocramius/package-versions is just a BC wrapper around composer-runtime-api and will likely be deprecated in the future).

@czhDavid as a workaround, you can require composer/package-versions-deprecated in your own project to make it used as a replacement, which will work with Composer 2.

@kevinpapst
Copy link

using composer-runtime-api directly will be the right path

Yes please, its time that ocramius/package-versions is banned from all major libs ...

@goetas
Copy link
Member

goetas commented Dec 13, 2020

As of #999, doctrine/migrations does not depend anymore on ocramius/package-versions

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

4 participants