Skip to content

Implement prs-7 request/response handling #162

@Hikariii

Description

@Hikariii

At the moment this library does a lot of request parsing and response handling on it's own.
This issue proposes moving to psr-7 for request/response handling.

Bypass and/or resolve current and possible future issues:

There is a standard, please use it:

Up until last year here was a lot of different request/response handling going on within different frameworks. Since psr-7 a lot of frameworks have moved to prs-7 for their response/request handling.
Just check https://mwop.net/blog/2015-01-26-psr-7-by-example.html and how this is a great standard for handling this.

Increase interoperability and collaboration:

Using psr-7 internally would greatly improve the integration in different frameworks and would make it a lot easier to write middleware around php-saml. Requests and responses could be interpreted and returned in a standardized psr-7 way, clear for everyone who uses it.

Provide backwards compatibility layer for old-style usage:

To provide a form of backwards compatibility the library could provide it's own utility to create and resolve psr-7 requests and responses for usage outside of a framework. I actually forsee that most of the implementations will actually use this library within a framework and do not need this layer, but it's still nice to have and be able to use this library in a stand-alone way.

Requires a lot of refactoring

This is probably something for a 3.* version, because it will change the outer api.
Internally it will probably be quite some work to upgrade this, but it will definitely improve adoption and ease of use for this library within the context of bigger applications.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions