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

carbonphp/carbon-doctrine-types 3.1.0 conflicts with doctrine/dbal 3.7.2 #2903

Closed
glennjacobs opened this issue Dec 15, 2023 · 3 comments
Closed

Comments

@glennjacobs
Copy link

When trying to install another package I get the following issue...

carbonphp/carbon-doctrine-types 3.1.0 conflicts with doctrine/dbal 3.7.2

It seems that the latest version of carbonphp/carbon-doctrine-types has been updated to only support doctrine/dbal 4.0 and above. But from what I can see doctrine/dbal doesn't have a stable v4 release yet.

Should this package have its composer.json file updated to specify the carbonphp/carbon-doctrine-types version?

E.g. in composer.json

change

    "carbonphp/carbon-doctrine-types": "*",

to something like...

    "carbonphp/carbon-doctrine-types": "^2.1",
@kylekatarnls
Copy link
Collaborator

Hello

* allows both 2 and 3, and composer is supposed to pick the one that matches your dbal version.

Did you add carbon first then doctrine later? As you may need -W composer option if so.

@glennjacobs
Copy link
Author

Yes, that's the issue. Carbon was already locked on a version and it prevented the package from being installed without -w. I figured it would be a better user experience if * wasn't used to avoid this requirement.

@kylekatarnls
Copy link
Collaborator

No, narrowing the compatibility range will only make more convenient your use case and make install impossible for anyone actually asking for dbal:^4@dev it's perfectly valid, it's not because it's not stable that we should disallow it, plus some day it will be stable and then we would have no reason to prevent user from using a lower version of carbon since it would actually work.

Also carbonphp/carbon-doctrine-types v1 is needed for older version.

You can simply add "carbonphp/carbon-doctrine-types": "^2.1", to your own composer.json.

The whole point of carbonphp/carbon-doctrine-types is to allow users to mix the carbon version they want with the dbal version they want.

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

2 participants