laminas / laminas-httphandlerrunner

Execute PSR-15 RequestHandlerInterface instances and emit responses they generate.
https://docs.laminas.dev/laminas-httphandlerrunner/
BSD 3-Clause "New" or "Revised" License
63 stars 20 forks source link

Move `EmitterInterface` into another project #51

Closed ericfortmeyer closed 1 year ago

ericfortmeyer commented 1 year ago

RFC

Q A
Proposed Version(s) 3.0.0
BC Break? Yes

Goal

Allow users to use implementations of EmitterInterface without requiring laminas-httphandlerrunner be installed.

Background,

Note: There are several forks of laminas-httphandlerrunner (See non-exhaustive list) some of which contain only a copy of EmitterInterface

Considerations

Users will have to implement the interface from PHP Contrib instead of [laminas/laminas-httphandlerrunner](https://github.com/laminas/laminas-httphandlerrunner/). Since the interface will not change, users will only need to composer require php-contrib/http-emitter or composer require laminas/http-emitter, then update the use statements in their projects.

Proposal(s)

I am proposing that EmitterInterface be moved either to PHP Contrib or to a separate project in laminas.

Appendix

List of Copies of EmitterInterface

Ocramius commented 1 year ago

I disagree: the emitter is possibly the most important functionality of this package, which doesn't drag in any more dependencies than what is necessary for it to work.

Implementing the interface from this package is very much the correct way forward, IMO.

Ocramius commented 1 year ago

Closing here meanwhile: the EmitterInterface is effectively the center of this package, and splitting this package further doesn't bring any advantage, as further splitting is just dilution, given there are no transitive dependencies dragged in from here.