doctrine-rest
doctrine-rest copied to clipboard
Migrate actions to PSR-15
In order to standardize package to PHP standards we must migrate our actions to PSR-15 https://www.php-fig.org/psr/psr-15
Single action must implement RequestHandlerInterface
(after implementing #8 ).
Each action\request handler must have single responsibility of fetching the data (single\collection) and provide the resource in the response.
Before invoking the request handler server should run group of middleware that will extend the request with attributes, like filter
, include
, sort
. etc. This attributes can be used by request handler in order to prepare data fetching queries.
Packages provides PSR-15 interfaces: https://github.com/php-fig/http-server-handler https://github.com/php-fig/http-server-middleware