Provide rules in the composer.json are wrong #2
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The
composer.json
currently providespsr/cache
andpsr/simple-cache
, while also requiring them. This is wrong.psr/cache
is the package containing the definition for PSR interfaces, and this code is definitely not provided in this package.The actual provide rules should be
psr/cache-implementation
andpsr/simple-cache-implementation
.Providing the wrong package while also requiring it creates issues with Composer 2, because the solver will consider that installing
psr/cache
is not necessary as it is already provided (Composer 1 still installs the package in that case, as it does not respectprovide
rules when a package actually exist with this name).See https://github.com/composer/composer/issues/9316 for a report on such issue (on a different PSR package) and https://github.com/composer/composer/issues/9311 which discusses adding a validation rule to catch the common mistake (which would have caught it here).
Note that I tried forking the repo and sending a pull request with the fix directly, but that triggered a 500 error.
Thanks! I don't I've seen clear documentation on the
provides
section. I'll have a look and push out a new tag soon.I probably have this done incorrectly on a few other packages too, so great to know.
500 on the fork, or the PR?
I believe this commit, and the newest tag should resolve the issue:
624e0efd97
Can you verify, @stof?
On the creation of the fork
this commit indeed fixes it.