-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Support Composer v2 canonical settings #20201
Comments
Hi there, Get your issue fixed faster by creating a minimal reproduction. This means a repository dedicated to reproducing this issue with the minimal dependencies and config possible. Before we start working on your issue we need to know exactly what's causing the current behavior. A minimal reproduction helps us with this. To get started, please read our guide on creating a minimal reproduction. We may close the issue if you, or someone else, haven't created a minimal reproduction within two weeks. If you need more time, or are stuck, please ask for help or more time in a comment. Good luck, The Renovate team |
It seems we'll need to make registryStrategy configurable (at least internally) |
I have created a minimal reproduction repository here: https://github.com/adamj88/renovate-issue-20201 |
Reproduction forked to https://github.com/renovate-reproductions/20201 |
How are you running Renovate?
Self-hosted
If you're self-hosting Renovate, tell us what version of Renovate you run.
34.188
If you're self-hosting Renovate, select which platform you are using.
gitlab.com
If you're self-hosting Renovate, tell us what version of the platform you run.
No response
Was this something which used to work for you, and then stopped?
I never saw this working
Describe the bug
The Packagist data source currently uses a
registryStrategy
ofhunt
as defined here:renovate/lib/modules/datasource/packagist/index.ts
Line 33 in 64fee7e
This searches registryUrls in order and then chooses the first matching registry selecting the relevant version to install, however, this is contrary to how Composer 2 handles its repositories priorities as detailed here: https://getcomposer.org/doc/articles/repository-priorities.md
In Composer 2 with the canonical options, it would be more saying, for repositories (registries) marked canonical true (which is the default) then use the
hunt
strategy maintaining their order, but if the package is not found in those then scan the canonical false with themerge
strategy.An example can be seen when searching for the
facebook/facebook-for-magento2
package with the following configuration incomposer.json
(note: auth tokens required for repo.magento.com):Where we have the following packages available:
In the debug output in the logs below 1.4.4 is returned from repo.magento.com where as installing with composer would yield 1.4.6 from packagist.org.
A previous discussion for this issue can be found here: #20181
Relevant debug logs
Logs
Have you created a minimal reproduction repository?
Please see: https://github.com/adamj88/renovate-issue-20201
The text was updated successfully, but these errors were encountered: