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

Allow "doctrine/persistence:^2.0" #203

Merged
merged 1 commit into from
Jul 1, 2020

Conversation

phansys
Copy link
Member

@phansys phansys commented Jun 27, 2020

Subject

Allow version 2 for "doctrine/persistence".

I am targeting this branch, because this change respects BC.

Changelog

### Added
- Added support for "doctrine/persistence:^2.0".

@phansys phansys added the minor label Jun 27, 2020
@phansys phansys force-pushed the doctrine_common branch 3 times, most recently from df49d59 to f6d5e2c Compare June 27, 2020 14:41
@phansys phansys requested a review from a team June 27, 2020 14:43
@phansys phansys marked this pull request as ready for review June 27, 2020 14:43
"doctrine/orm": "^2.5",
"doctrine/phpcr-odm": "^1.4",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to make that dev requirement dynamic?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because "doctrine/phpcr-odm:1.x" requires "doctrine/common:2.x", and "doctrine/common:2.x" requires "doctrine/persistence:1.x":

Problem 1
    - doctrine/common v2.9.0 requires doctrine/persistence ^1.0 -> satisfiable by doctrine/persistence[1.0.x-dev, 1.1.1, 1.1.x-dev, 1.2.0, 1.2.x-dev, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.x-dev, 1.4.x-dev, v1.0.0, v1.0.1, v1.1.0] but these conflict with your requirements or minimum-stability.
    - doctrine/common v2.10.0 requires doctrine/persistence ^1.1 -> satisfiable by doctrine/persistence[1.1.1, 1.1.x-dev, 1.2.0, 1.2.x-dev, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.x-dev, 1.4.x-dev, v1.1.0] but these conflict with your requirements or minimum-stability.
    - doctrine/common v2.11.0 requires doctrine/persistence ^1.1 -> satisfiable by doctrine/persistence[1.1.1, 1.1.x-dev, 1.2.0, 1.2.x-dev, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.x-dev, 1.4.x-dev, v1.1.0] but these conflict with your requirements or minimum-stability.
    - doctrine/common 2.13.3 requires doctrine/persistence ^1.3.3 -> satisfiable by doctrine/persistence[1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.x-dev, 1.4.x-dev] but these conflict with your requirements or minimum-stability.
    - doctrine/common 2.13.2 requires doctrine/persistence ^1.3.3 -> satisfiable by doctrine/persistence[1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.x-dev, 1.4.x-dev] but these conflict with your requirements or minimum-stability.
    - doctrine/common 2.13.1 requires doctrine/persistence ^1.3.3 -> satisfiable by doctrine/persistence[1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.x-dev, 1.4.x-dev] but these conflict with your requirements or minimum-stability.
    - doctrine/common 2.13.0 requires doctrine/persistence ^1.3.3 -> satisfiable by doctrine/persistence[1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.x-dev, 1.4.x-dev] but these conflict with your requirements or minimum-stability.
    - doctrine/common 2.12.0 requires doctrine/persistence ^1.1 -> satisfiable by doctrine/persistence[1.1.1, 1.1.x-dev, 1.2.0, 1.2.x-dev, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.x-dev, 1.4.x-dev, v1.1.0] but these conflict with your requirements or minimum-stability.
    - Conclusion: remove doctrine/persistence 2.0.0
    - doctrine/common v2.7.1 conflicts with doctrine/persistence[2.0.0].
    - doctrine/common v2.7.2 conflicts with doctrine/persistence[2.0.0].
    - doctrine/common v2.7.3 conflicts with doctrine/persistence[2.0.0].
    - doctrine/common v2.8.0 conflicts with doctrine/persistence[2.0.0].
    - doctrine/common v2.8.1 conflicts with doctrine/persistence[2.0.0].
    - doctrine/common v2.7.0 conflicts with doctrine/persistence[2.0.0].
    - Installation request for doctrine/persistence ^2.0 -> satisfiable by doctrine/persistence[2.0.0].
    - Installation request for doctrine/common ^2.7 -> satisfiable by doctrine/common[2.12.0, 2.13.0, 2.13.1, 2.13.2, 2.13.3, v2.10.0, v2.11.0, v2.7.0, v2.7.1, v2.7.2, v2.7.3, v2.8.0, v2.8.1, v2.9.0].

Copy link
Contributor

@greg0ire greg0ire Jun 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe allow ODM 2 and wait for this then: doctrine/mongodb-odm#2204 ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a new commit with the suggested approach.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry I've been confusing mongodb-odm and phpcr-odm… I don't think it makes sense to use one instead of of the other given that there are PHPCR namespaces in our tests.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we should make phpcr-odm compatible instead of removing the dependency

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we should make phpcr-odm compatible instead of removing the dependency

That would be great, but since the model implementation is not enforced to be specific; I'd like to focus this PR in make this package compatible with "doctrine/persistence:^2.x". Users using "doctrine/phpcr-odm" will be still able to use "doctrine/persistence:^1.x", while the users using other implementation would be able to leverage "doctrine/persistence:^2.x".
When "doctrine/phpcr-odm" reaches its compatibility with "doctrine/persistence:^2.x", we should revert the condition added here.

To be clear, if we don't make the dependency conditional in our tests, we aren't able to install "doctrine/persistence:^2.x" for other model managers aren't part of this conflict.

Copy link
Contributor

@greg0ire greg0ire Jun 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI I just created doctrine/phpcr-odm#812 to address deprecations, if it gets merged I will do another to add support for persistence 2 (which implies common 3)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

phpcr-odm 1.5.2 now has support for persistence 2 and common 3 :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @greg0ire

@phansys phansys marked this pull request as draft June 27, 2020 17:01
@phansys phansys force-pushed the doctrine_common branch from 8962eb7 to 860a742 Compare July 1, 2020 18:06
@phansys phansys marked this pull request as ready for review July 1, 2020 18:09
@phansys phansys requested a review from a team July 1, 2020 18:09
@jordisala1991 jordisala1991 merged commit 4f26ac0 into sonata-project:1.x Jul 1, 2020
@jordisala1991
Copy link
Member

Thank you @phansys

@phansys phansys deleted the doctrine_common branch July 1, 2020 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants