Skip to content

Missing provides in composer.json file #75

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

Closed
Taluu opened this issue Mar 13, 2017 · 4 comments · Fixed by #80
Closed

Missing provides in composer.json file #75

Taluu opened this issue Mar 13, 2017 · 4 comments · Fixed by #80

Comments

@Taluu
Copy link

Taluu commented Mar 13, 2017

Q A
Bug? yes and no
New Feature? yes and no
Version Latest

Actual Behavior

This package doesn't say it provides message factories (implementing php-http/message-factory-implementation). So if a package requires this implementation, it will not be installable, even though there are messages factories in this repository.

Expected Behavior

Stating that this package implements php-http/message-factory-implementation

Possible Solutions

Stating that this package implements php-http/message-factory-implementation

Even though it is also not technically correct as if one of these 3 factories can't be accessed (because their main vendor is not installed). Another solution would be to decouple these implementations into their own repositories (and stating then that it can implement said interface), or putting these in their client package (e.g for guzzle, putting its classes into the guzzle5 and guzzle6 adapters)

@xabbuh
Copy link
Member

xabbuh commented Mar 24, 2017

The best solution IMO would indeed be to move the "optional dependencies" into separate packages. But as that would be a BC break adding php-http/message-factory-implementation to the provide section looks like a reasonable solution to me.

@Nyholm
Copy link
Member

Nyholm commented Mar 24, 2017

Sorry for the delay, The php-http/message-factory-implementation is not a virtual package we have created.

Where do you need this? I code to the interface and let auto discovery fail if no factories are found.

@Taluu
Copy link
Author

Taluu commented Mar 24, 2017

Maybe then moving the "optionnal dependencies" to their own client / repos and leaving these here with a replace could do the trick too, in order to keep bc ?

@Nyholm I am needing it in Taluu/Behapi#12

So then should I remove the virtual dependency ? I thought requiring this virtual package could be useful in order to let people know that I need a factory

@dbu
Copy link
Contributor

dbu commented Mar 24, 2017

went on a hunt for this and found https://github.com/php-http/message-factory/blob/v0.2.0/README.md#usage - newer versions don't talk about this anymore. packagist has one package registered with the provide it seems: https://packagist.org/providers/php-http/message-factory-implementation

it looks like we decided to not model this with a virtual package.

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

Successfully merging a pull request may close this issue.

4 participants