Skip to content

[RFC]: Laminas/Http Request still required for Router::match #72

@marcelthole

Description

@marcelthole

RFC

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

Goal

The Laminas Router component still requires the laminas/http Package. The goal is to have a clear Interface that could be used for the match Method without guessing the required methods

Background

https://github.com/laminas/laminas-router/blob/ec4b33834199bcf04c1b90b98c10f53c9e77e046/src/Http/TreeRouteStack.php#L298C1-L302C10

the getUri Method is only available in the laminas/http Request.

The same problem exists for other Route Implementations.

https://github.com/laminas/laminas-router/blob/ec4b33834199bcf04c1b90b98c10f53c9e77e046/src/Http/Method.php#L93C1-L97C10

If i want to use laminas-router without laminas-http i need to create a new class that will implement the stdlib RequestInterface and also need to check the whole Laminas-Router code to collect all necessary methods that will be called via method_exists

Proposal(s)

  • Use a PSR Request Interface instead of the Laminas Stdlib RequestInterface?
  • Provide a LaminasRouter Request Interface with all required Methods and provide an Mapper that will convert a Laminas stdLib Request / Psr Request to a LaminasRouterRequest

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions