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

Fixed doctrine/persistence dependency #928

Closed

Conversation

smilesrg
Copy link

@smilesrg smilesrg commented Apr 24, 2021

doctrine/persistence dependency has been updated to 3.0@dev version for 3.0.x branch.

That problem leads to

 Your lock file does not contain a compatible set of packages. Please run composer update.
 
   Problem 1
     - doctrine/common is locked to version 3.0.2 and an update of this package was not requested.
     - doctrine/common 3.0.2 requires doctrine/persistence ^2.0 -> found doctrine/persistence[3.0.x-dev] but it does not match the constraint.

while installing dependency for doctrine/persistence

@greg0ire
Copy link
Member

doctrine/persistence dependency has been updated to 3.0@dev version for 3.0.x branch.
That problem leads to

I'm sorry, what problem? And why would we use a dev version on a stable branch? Also, 3.0.x is no longer maintained.

@smilesrg
Copy link
Author

smilesrg commented Apr 24, 2021

I'm sorry, what problem?

I described it in the description (I've just updated it). I tried to composer install on doctrine/persistence 3.0.x but got an errors with dependencies.

And why would we use a dev version on a stable branch?

If remove @dev prefix, you can get minimum stability error while doing composer install on doctrine/common

Also, 3.0.x is no longer maintained.

Could you please tell which branch is proper to use?

@smilesrg
Copy link
Author

Also, 3.0.x is no longer maintained.

There's no information about this
https://www.doctrine-project.org/projects/persistence.html

@smilesrg
Copy link
Author

Well, dependencies are totally confused. I am working on doctrine/orm#8657 issue doctrine/orm#8460 (Deprecate EntityManager::clear with argument of one entity class and EntityRepository::clear), making changes in ORM 3.x but I also need to make changes in doctrine/persistence doctrine/persistence#174, I guess I should make changes in 3.x branch? But then, if I am using 3.x branch, error appears during composer install. Also, it is so strange, when stable doctrine/common 3.x stable branches are using persistence 2.x stable branch. I really confused with the dependencies. Could you please help me to resolve that?

@greg0ire
Copy link
Member

You can use the following to trick doctrine/persistence into thinking it is in version 2.0 instead of 3:

COMPOSER_ROOT_VERSION=2.0 composer install --no-interaction --no-progress

More details here on why I added this dependency: doctrine/persistence#122 (comment)

Could you please tell which branch is proper to use?

If it's a fix, 3.1.x. .doctrine-project.json is often outdated, so I'll give you the rule: if the last tag is X.Y.Z, then fixes should got to X.Y, and features to X.Y+1 .

@greg0ire greg0ire closed this Apr 24, 2021
@smilesrg smilesrg deleted the fix_doctrine_persistence_dependency branch April 24, 2021 20:59
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

Successfully merging this pull request may close these issues.

2 participants