-
Notifications
You must be signed in to change notification settings - Fork 5
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
Move 'nyholm/psr7' from require to suggest & require-dev #20
Comments
@qpautrat any chance you might have a look into this one as well? |
Hello @Doqnach 👋 ,
Yes you are right.
Unfortunately it is. So it is a bit more complicated than
In this case we need to inject a ResponseFactoryInterface inside the JsonApiFactory. |
The bundle should be able to work based on purely the So you could require-dev By having the bundle require the That concrete implementation should then be provided as a dependency-injection (e.g. the implementer can choose |
That is basically what I said. ;) I red a bit about it: A post from Matthias Noback. It suggets that I should not provide concrete implementation, but what happens if autowire is disabled ? I still must inject a |
Because of this I'm confused. |
We could force users to provide an alias in the configuration if autowiring is disabled or if they have multiple implementation of |
The bundle should not depend on autowiring internally, yeah. So anything that is used internally in method calls needs to be provided from the outside. So if (I didn't trace the code yet to see how & where yet, above is just the general stance how I see it) |
But in the same time So it confuses me. What is your thought about it @Doqnach ? I'm doing a PR pushing the second option and I will put you in review. |
Going by the article you mentioned before: |
I completely agree with you. |
Is the When an implementer requires |
#24 has been merged. Thank you ! |
Would it be possible to move the composer requirement for
nyholm/psr7
to require-dev and suggest?Right now the bundle orders an implementer to use
nyholm/psr7
as their PSR-7 implementation, even if they might want to use something else (likeguzzlehttp/psr7
).The bundle should work with both implementations right? There is no hard requirement for it being
nyholm/psr7
?The text was updated successfully, but these errors were encountered: