Dependency Rewrite does not work if packagist.org is not involved
boesing opened this issue · comments
Bug Report
Q | A |
---|---|
Version(s) | 1.0.0 |
Summary
Gonna update this as the outdated part below this report was due to a misconfiguration of satis.
However, I've pointed out, that private packagists packages.json
provides the information for lazy providers
. Those lazy providers are not properly resolved by @composer.
Ive created a pull request in composer/composer#8516 which solves the issue in resolving package names for private packagist.
Current behavior
With {"packagist.org": false}
in the repositories
property of composer.json
, the DependencyRewriterPlugin
does not properly overwrite the package
property in the install
operation if an external repository provides a packages.json
with a providers-lazy-url
property.
How to reproduce
Only with private packagist on-premise installation. Therefore not possible to reproduce without that.
NOTE If you remove {"packagist.org": false}
, the migration works as expected.
Expected behavior
laminas/laminas-escaper
is being installed instead of zendframework/zend-escaper
.
Outdated bug repot
Hey guys, as already talked about this on slack, I was finally able to reproduce the whole thing with satis.
I found out, that, if packagist.org
is explicitly excluded in composer.json
, something is wrong with the dependency resolver of composer (or at least it behaves different).
Actually, I did not found the issue in composer as I am not able to debug this without more insights which probably takes too long to achieve. Probably you guys already got some debugging stuff prepared somewhere or we can delegate this directly to @composer.
I prepared 2 repositories on github.
https://github.com/boesing/laminas-migration-base - mimics a project which has to get migrated (I already "executed" the migration script)
https://github.com/boesing/laminas-migration-testing - an "external" library which requires old zendframework
packages
You can find a README.md with a step-by-step guide to reproduce the different behavior.
This problem will be fixed in the next composer patch version.
If you want to proceed now, just update composer to the latest snapshot
and run your migration. You can re-set your composer.
$ composer self-update --snapshot
$ laminas-migration migrate
$ composer install
$ composer self-update --stable
@boesing Composer 1.9.2 has been just released.