-
Notifications
You must be signed in to change notification settings - Fork 49
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
Auto require package I do not need #236
Comments
The role of the plugin is to provide some nice DX so that e.g. this line works out of the box: If you don't want that behavior, you should disable the plugin by running: composer config allow-plugins.php-http/discovery false |
We have more than 100 projects use petrel/opentelemetry package, it's not easy to inform all user add config in their project composer.json conf |
I don't think there is a solution that belongs to the This means that to me, only the root package can know how to solve this. One way is to disable the plugin. You could very well document that in the readme of your private package. If people don't read it, it's not a big deal either. They'd just get a maybe-unused dep. The alternative, but I would reserve it to the root package also, would be to build on #232 so that when all interfaces required to provide a virtual |
Each package that implements Can we do like this ? |
I thought about that, but there are two issues:
|
Your concerns are reasonable. Well, I don’t have a better solution to this problem either. |
Thanks. I created #237 to keep track of the proposal in #236 (comment) |
See #239 ;) |
PHP version: x.y.z (hint:
php --version
)PHP 7.4.11 (cli) (built: Mar 4 2022 15:04:46) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
Description
My project need a private package petrel/opentelemetry, this package require open-telemetry/opentelemetry version 0.0.17
open-telemetry/opentelemetry require php-http/discovery, php-http/async-client-implementation, psr/http-factory-implementation
In my project ready have private package petrel/http-client provide php-http/async-client-implementation and psr/http-factory-implementation
But when I run composer update, this packages will add to my project automatic, and change my composer.json
I think the problem is php-http/discovery do not check private provide packge.
Any idea to fix this problem? I can only change petrel/opentelemetry, can not change open-telemetry/opentelemetry
Thank you
The text was updated successfully, but these errors were encountered: