webfactory / WebfactoryPolyglotBundle

Symfony bundle simplifying translations in Doctrine.
MIT License
3 stars 2 forks source link

Cannot install with doctrine/collections 1.0 #52

Closed tacman closed 3 months ago

tacman commented 4 months ago
symfony new --webapp polyglot-test && cd polyglot-test
composer require webfactory/polyglot-bundle
Running composer update webfactory/polyglot-bundle
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - webfactory/polyglot-bundle[1.0.0, ..., 1.2.0, 2.0.0, ..., 2.1.0] require doctrine/orm ~2.2 -> found doctrine/orm[2.2.0, ..., 2.19.3] but it conflicts with your root composer.json require (^3.1).
    - webfactory/polyglot-bundle[1.1.1, ..., 1.1.3] require php ^5.5 | ^7.0 -> your php version (8.3.4) does not satisfy that requirement.
    - webfactory/polyglot-bundle[2.1.1, ..., 2.2.0] require php ^7.2 -> your php version (8.3.4) does not satisfy that requirement.
    - webfactory/polyglot-bundle[2.3.0, ..., 2.4.0] require php ^7.2|8.0.*|8.1.* -> your php version (8.3.4) does not satisfy that requirement.
    - webfactory/polyglot-bundle[2.5.0, 3.0.0, ..., 3.2.0, 4.0.0] require doctrine/collections ^1.0 -> found doctrine/collections[v1.0, ..., 1.8.0] but the package is fixed to 2.2.1 (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.
    - Root composer.json requires webfactory/polyglot-bundle * -> satisfiable by webfactory/polyglot-bundle[1.0.0, ..., 1.2.0, 2.0.0, ..., 2.5.0, 3.0.0, 3.1.0, 3.1.1, 3.2.0, 4.0.0].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require webfactory/polyglot-bundle:*" to figure out if any version is installable, or "composer require webfactory/polyglot-bundle:^2.1" if you know which you need.
mpdude commented 4 months ago

Are you sure doctrine/collections 2.x will be enough to fix this? Or will we need ORM 3.x support as well?

tacman commented 4 months ago

I think we need to support all maintained versions, which for doctrine is now a bit broad. There's a way in github actions to set up a matrix, but I'm not sure exactly how to do that.

On Fri, Apr 5, 2024, 1:43 PM Matthias Pigulla @.***> wrote:

Are you sure doctrine/collections 2.x will be enough to fix this? Or will we need ORM 3.x support as well?

— Reply to this email directly, view it on GitHub https://github.com/webfactory/WebfactoryPolyglotBundle/issues/52#issuecomment-2040323523, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEXIQMIXNJ2OBK2FIROGRDY33PEVAVCNFSM6AAAAABFZEEF6CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBQGMZDGNJSGM . You are receiving this because you authored the thread.Message ID: @.***>

tacman commented 4 months ago

At a short-term solution, we could simply use "*" for doctrine packages, and let composer figure it out. Obviously, we need to be explicit eventually, but right now I can't install it at all in my Symfony 7 projects.

I guess I could remove doctrine, add this bundle, then add doctrine back, and hope that composer picks the right versions?

mpdude commented 4 months ago

Could you please re-check whether this is fixed with the 4.0.1 release of this bundle?

tacman commented 4 months ago

No, because of psr/log

    - webfactory/polyglot-bundle[dev-attribute-support, 3.0.0, ..., 3.2.0] require psr/log ^1.0 -> satisfiable by psr/log[1.0.0, ..., 1.1.4].
    - You can only install one version of a package, so only one of these can be installed: psr/log[1.0.0, ..., 1.1.4, 2.0.0, 3.0.0, 3.x-dev].
    - monolog/monolog[3.0.0-RC1, ..., 3.x-dev] require psr/log ^2.0 || ^3.0 -> satisfiable by psr/log[2.0.0, 3.0.0, 3.x-dev].
mpdude commented 3 months ago

Merged #55.

tacman commented 3 months ago

Wahoo, it installs! Can you publish 4.0.2 please?

mpdude commented 3 months ago

Released as 4.1.0 🚀

Thanks for bringing this forward!