-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Depend on "PHP and Xdebug" or "HHVM" #2940
Comments
This is not possible right now. It falls under the same category as php extensions reimplementing some php packages, ideally hhvm should have a way to say it replaces/provides ext-xdebug. |
I think currently as a work around you could solve this by also publishing two empty metapackages called php-code-coverage-dep-php-xdebug which requires php and xdebug and provides php-code-coverage-dep-platform and php-code-coverage-dep-hhvm which also provides php-code-coverage-dep-platform but requires hhvm, and then requiring only php-code-coverage-dep-platform. Although I'm unsure if this still works now that we've made the changes in #2690 - which is why I was a bit concerned if that was a good idea. Either way looks like we need to work out #751 somehow. |
Would a composer.json syntax like the following correctly model this issue?
This introduces a "platform-xy" conditional, which allows resolving packages only, I think it might be possible to work on the CompositeRepository ( If i'm not totally off-track with this idea, then this should provide "platform specific local packages". |
👍 on this. Sooner than later, we'll need to express: this package works on |
@Seldaek is that a "big" feature that need a lot of work ? Would you consider a pull request that address this issue ? |
I think to do it right and think of all the edge cases yes it's probably a lot of work. If you come up with something that works and doesn't introduce an insane amount of code I guess it might be merged, but I am not too warm to this feature I have to say because it sounds like opening pandora's box. Runtime checks can do pretty powerful things and replicating all that in composer.json sounds like it'll go into feature creep pretty quickly. |
Actually after some more thought, I don't really think this is gonna happen, as said above sure if someone comes up with a working and not insane solution we might reconsider but as such I would rather avoid it so closing. |
Is it possible, and if so, how, to express that a package depends on "PHP and Xdebug" or "HHVM"?
The use case for this is php-code-coverage which requires the Xdebug extension on standard PHP but no additional extension on HHVM.
The text was updated successfully, but these errors were encountered: