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 newer version of league/uri #960

Closed
Fabian-Hofer-Mastertent opened this issue Oct 5, 2023 · 4 comments
Closed

Use newer version of league/uri #960

Fabian-Hofer-Mastertent opened this issue Oct 5, 2023 · 4 comments

Comments

@Fabian-Hofer-Mastertent
Copy link

Payum references ^6.4 of the "league/uri" package.
If you use a newer version of symfony the symfony-package "symfony/html-sanitizer" references "^6.5|^7.0" so composer cannot resolve the requirements and won't let me install the package.

Is there a possibility that you change the "league/uri" package version in the near future?

Or do you know any other possibilities to make payum work for newer versions of symfony?

Thank you

@pierredup
Copy link
Member

@Fabian-Hofer-Mastertent Those constraints should resolve fine. Since ^6.4 means version >=6.4.0 && < 7.0.0, and symfony/html-sanitizer requires ^6.5 (which means any version greater than or equal to 6.5.0, and less than 7.0.0), it means you should be able to at least install any of version 6.5 to 6.8. Can you share the error from composer where it fails to install, then I can have a look

@Fabian-Hofer-Mastertent
Copy link
Author

Thank you for checking my issue @pierredup
Maybe I'm getting composer wrong but ^6.4 means to me that composer can use every version inside the 6.4 range (6.4.1, 6.4.2...) but not above. smyonfy/html-snaitizer requires every version inside the 6.5 range and inside the 7.0 range.
To make Payum allow the 7.0 range, there should be ^6.4|^7.0 as version range in the payum composer.json.

this is the error I'm getting:

`Your requirements could not be resolved to an installable set of packages.

Problem 1
- payum/core[1.7.2, ..., 1.7.3] require league/uri ^6.4 -> found league/uri[6.4.0, ..., 6.8.0] but the package is fixed to 7.3.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- payum/payum-bundle[2.5.0, ..., 2.5.2] require payum/core ^1.7.2 -> satisfiable by payum/core[1.7.2, 1.7.3].
- Root composer.json requires payum/payum-bundle ^2.5 -> satisfiable by payum/payum-bundle[2.5.0, 2.5.1, 2.5.2].`

@pierredup
Copy link
Member

^6.4 means to me that composer can use every version inside the 6.4 range (6.4.1, 6.4.2...) but not above

^6.4 means anything from 6.4.0 upwards, but less than 7.0.0. So that would include 6.5 as well.

payum/core[1.7.2, ..., 1.7.3] require league/uri ^6.4 -> found league/uri[6.4.0, ..., 6.8.0] but the package is fixed to 7.3.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

This error means that you already have version 7.3.0 installed, but this is not compatible with payum because it requires versions below 7.0.
The fix is to include league/uri as part of the update (it will then be downgraded to the latest 6.x version).

composer require paym/core --no-update
composer update payum/core -W

The -W flag means to include all dependencies in the update. You can also explicitly list the package as part of the update command

composer update payum/core league/uri -W

@Fabian-Hofer-Mastertent
Copy link
Author

Fabian-Hofer-Mastertent commented Oct 9, 2023

Thank you @pierredup
You pointed me in the right direction.
I endet up with the following commands:

composer require payum/payum-bundle league/uri php-http/guzzle7-adapter --no-update composer update --with-all-dependencies

Composer downgraded league/uri to 6.8.0 and everything works fine

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