Skip to content
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

Drop require for psr-7 message implementation #46

Closed

Conversation

Xerkus
Copy link
Member

@Xerkus Xerkus commented May 7, 2023

Q A
Documentation no
Bugfix no
BC Break no
New Feature no
RFC no
QA yes

Description

Dependency on PSR-7 message implementation meta-package is superfluous. If no implementation provided this package will not be in incomplete state.

@Xerkus Xerkus added the dependencies Pull requests that update a dependency file label May 7, 2023
@Xerkus Xerkus added this to the 2.7.0 milestone May 7, 2023
@weierophinney
Copy link
Member

@Xerkus I completely disagree.

When we depend on an implementation package, it provides a signal to the person installing/requiring it that they need addiitional dependencies in order to consume it. They then get the error when attempting to install this package, instead of when testing or attempting to run the application that uses the package. The latter is much harder to diagnose, and is completely prevented by having the requirement on an implementation package.

I'm going to remove the milestone from this so we can discuss further before making a final decision.

@weierophinney weierophinney removed this from the 2.7.0 milestone May 10, 2023
@Xerkus
Copy link
Member Author

Xerkus commented May 10, 2023

My reasoning here is that nothing creates requests or responses, there is no functionality that indirectly depends on implementation actually being present.

What happens if no implementation is present? Nothing. If there is no response provided by something else then this package has nothing to do.

Same with other middleware components. It might depend on response factory to create response but unless something else provided request. With no request object provided by something else the component is simply not used.

Case in point: we do not require implementation to be provided for mezzio-helpers: https://github.com/mezzio/mezzio-helpers/blob/5.16.x/composer.json#L37 No not for mezzio-router https://github.com/mezzio/mezzio-router/blob/3.17.x/composer.json#L37

Requiring implementation only makes sense for mezzio or http runner... waaait a second. I did this on a wrong terminal window in wrong repo and did not realize since I used gh cli to create PR as well.

@Xerkus Xerkus closed this May 11, 2023
@Xerkus Xerkus deleted the feature/drop-require-psr-implementation branch May 11, 2023 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants