99designs / http-signatures-php

Sign and verify PSR-7 HTTP messages in PHP.
MIT License
44 stars 32 forks source link

Consider PSR-7 Request instead of Symfony Request. #9

Closed pda closed 8 years ago

pda commented 9 years ago

@mtibben says:

@pda: you may want to consider using PSR7 Request rather than Symfony Requests for that lib

http://www.php-fig.org/psr/psr-7/

That PSR-7 page describes a Psr\Http\Message\RequestInterface. Maybe worth noting it also says:

An HTTP client MUST ignore the values of Uri::getPath() and Uri::getQuery(), and instead use the value returned by getRequestTarget(), which defaults to concatenating these two values.


Also, I regret not wrapping whatever request object in a locally-defined interface, making issues like https://github.com/99designs/http-signatures-php/pull/8 much harder to solve. So a breaking change version of this library would probably introduce a new Message interface with a SymfonyReqestMessage and PSR7RequestMessage implementation.

vinkla commented 8 years ago

:+1:

navitronic commented 8 years ago

3.0 does exactly this.