This patch rebases and fixes the patch introduced with #162.
Internally, it modifies how the RequestTrait works to ensure that the HTTP method is always valid; this allows removal of duplicated code in the ServerRequest, as well as a conditional and exception from the request serializer.
Considering PSR-17 requires an HTTP method to its various request factories, this brings Diactoros in line with that proposed spec.
This patch rebases and fixes the patch introduced with #162.
Internally, it modifies how the
RequestTrait
works to ensure that the HTTP method is always valid; this allows removal of duplicated code in theServerRequest
, as well as a conditional and exception from the request serializer.Considering PSR-17 requires an HTTP method to its various request factories, this brings Diactoros in line with that proposed spec.