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

Dependency Rewrite does not work if packagist.org is not involved #6

Closed
boesing opened this issue Jan 6, 2020 · 2 comments
Closed

Comments

@boesing
Copy link
Member

boesing commented Jan 6, 2020

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.

@boesing
Copy link
Member Author

boesing commented Jan 14, 2020

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 boesing closed this as completed Jan 14, 2020
@michalbundyra
Copy link
Member

@boesing Composer 1.9.2 has been just released.

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