Ocramius/ProxyManager

breaking change on 2.9.0 - composer-runtime-api:2.0

douglasjam opened this issue · 4 comments

The latest 2.9.0 introduced a dependency on composer-runtime-api:2.0.

Shouldn't this be considered a breaking change? Composer 2 is still in the alpha phase.

I currently use doctrine/mongodb-odm and they locked on "ocramius/proxy-manager": "^2.2"

I could fix the proxyManager version in my composer.lock, but this will affect IMO 99% of the users of this library.
Can't this dependency wait for Ocramius/ProxyManager 3.0?

Heya,

Dependency upgrades, if not affecting the API of a package, are not BC breaks.

See also https://github.com/semver/semver/blob/d460299638d3d2af6fcf809285dc6a469e15742a/semver.md#what-should-i-do-if-i-update-my-own-dependencies-without-changing-the-public-api

Major versions of dependencies will be bumped as they come up, as long as the API of this package stays unaffected.

I currently use doctrine/mongodb-odm and they locked on "ocramius/proxy-manager": "^2.2"

ocramius/proxy-manager:^2.2 is compatible with composer/composer:^1, so you should just be able to composer update to a compatible set of dependencies? Did you run composer update from an incompatible environment?

See also Ocramius/PackageVersions#105 (comment) about correct composer update usage.

Indeed, I was used to run install/update with --ignore-platform-reqs parameter from outside my docker (production-like) due to ssh-keys. Now this won't be possible anymore, but it's fine.

Thank you for sharing and explaining the semantic versioning.

After release 2.9.0 my CI pipelines started to fail.

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - Installation request for ocramius/proxy-manager 2.9.1 -> satisfiable by ocramius/proxy-manager[2.9.1].
    - ocramius/proxy-manager 2.9.1 requires composer-runtime-api ^2.0.0 -> no matching package found.
  Problem 2
    - ocramius/proxy-manager 2.9.1 requires composer-runtime-api ^2.0.0 -> no matching package found.
    - doctrine/migrations 3.0.1 requires ocramius/proxy-manager ^2.0.2 -> satisfiable by ocramius/proxy-manager[2.9.1].
    - Installation request for doctrine/migrations 3.0.1 -> satisfiable by doctrine/migrations[3.0.1].
Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

This change forces me to use composer v2 in Symfony 5.1 projects, but since I also work on Symfony 4 projects I was forced to juggle between composer v1 and composer v2 all day long. A nightmare.

To people having this problem, I solved it fixing the version of proxy-manager to v2.8:

$ composer require ocramius/proxy-manager:2.8.*

It might not be a breaking change by definition, but it's a pain in the ass.

Installation request for ocramius/proxy-manager 2.9.1

That means that you explicitly requested 2.9.1, probably by doing composer update on a system that runs composer/composer:2.0.

Seems similar to Ocramius/PackageVersions#105 (comment)

Possibly a composer.lock hygiene issue - check the link above to see if something is managed incorrectly in your pipeline/project.