All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
2.1.1 - 2018-08-11
- Added
Nyholm\Psr7
to the list of factories detected automatically
2.1.0 - 2018-08-02
- New trait
HasResponseFactory
used by many middlewares that need to configure the PSR-17 response factory. - New trait
HasStreamFactory
used by many middlewares that need to configure the PSR-17 stream factory.
2.0.0 - 2018-08-01
- New methods added to
Factory
to return PSR-17 factories:getResponseFactory
,getServerRequestFactory
,getStreamFactory
andgetUriFactory
. - New method
Factory::setStrategies()
to configure the priority order of the Diactoros, Guzzle and Slim factories or register new classes. - Added a second argument to
Callablehandler
constructor to pass a response factory
- Exchanged abandoned
http-interop/http-factory
withpsr/http-factory
- Changed the signature of
Factory::createServerRequest()
to be aligned with PSR-17 - Changed the signature of
Factory::createStream()
to be aligned with PSR-17 - Changed the signature of
Factory::createResponse()
to be aligned with PSR-17
1.2.0 - 2018-07-17
- Updated
http-interop/http-factory
to0.4
1.1.0 - 2018-06-25
- Imported
HttpErrorException
from error handler middleware
1.0.0 - 2018-01-24
- Replaced
http-interop/http-server-middleware
withpsr/http-server-middleware
.
- Removed
Middlewares\Utils\Helpers
because contains just one helper and it's no longer needed.
0.14.0 - 2017-12-16
- New class
RequestHandlerContainer
implementing PSR-11 to resolve handlers in any format (classes, callables) and return PSR-15RequestHandlerInterface
instances. This can be used to resolve router handlers, for example.
- The signature of
CallableHandler
was simplified. Removed$resolver
and$arguments
in the constructor.
- Deleted all callable resolvers classes. Use the
RequestHandlerContainer
, or any other PSR-11 implementation.
0.13.0 - 2017-11-16
- The minimum PHP version supported is 7.0
- Replaced
http-interop/http-middleware
withhttp-interop/http-server-middleware
. - Changed
Middlewares\Utils\CallableHandler
signature. Now it is instantiable and can be used as middleware and server request handler.
Middlewares\Utils\CallableMiddleware
. UseMiddlewares\Utils\CallableHandler
instead.
0.12.0 - 2017-09-18
- Append
.dist
suffix to phpcs.xml and phpunit.xml files - Changed the configuration of phpcs and php_cs
- Upgraded phpunit to the latest version and improved its config file
- Updated
http-interop/http-middleware
to0.5
0.11.1 - 2017-05-06
Middlewares\Utils\CallableHandler
expects one of the following values returned by the callable:- A
Psr\Http\Message\ResponseInterface
null
or scalar- an object with
__toString
method implemented Otherwise, throws anUnexpectedValueException
- A
Middlewares\Helpers::fixContentLength
only modifies or removes theContent-Length
header, but does not add it if didn't exist previously.
0.11.0 - 2017-03-25
- New class
Middlewares\Utils\Helpers
with common helpers to manipulate PSR-7 messages - New helper
Middlewares\Utils\Helpers::fixContentLength
used to add/modify/remove theContent-Length
header of a http message.
- Updated
http-interop/http-factory
to0.3
0.10.1 - 2017-02-27
- Fixed changelog file
0.10.0 - 2017-02-27
- Replaced deprecated
container-interop
bypsr/contaienr
(PSR-11). Middlewares\Utils\Dispatcher
throws exceptions if the middlewares does not implementInterop\Http\ServerMiddleware\MiddlewareInterface
or does not return an instance ofPsr\Http\Message\ResponseInterface
.- Moved the default factories to
Middlewares\Utils\Factory
namespace. - Minor code improvements.
0.9.0 - 2017-02-05
- Callable resolves to create callables from various representations
Middlewares\Utils\CallableHandler::resolve
0.8.0 - 2016-12-22
- Updated
http-interop/http-middleware
to0.4
- Updated
friendsofphp/php-cs-fixer
to2.0
0.7.0 - 2016-12-06
- New static helper
Middlewares\Utils\Dispatcher::run
to create and dispatch a request easily
0.6.1 - 2016-12-06
- Ensure that the body of the serverRequest is writable and seekable.
0.6.0 - 2016-12-06
- ServerRequest factory
Middlewares\Utils\Dispatcher
acceptsClosure
as middleware components
Middlewares\Utils\Dispatcher
creates automatically a response if the stack is exhausted
0.5.0 - 2016-11-22
Middlewares\Utils\CallableMiddleware
class, to create middlewares from callablesMiddlewares\Utils\Dispatcher
class, to execute the middleware stack and return a response.
0.4.0 - 2016-11-13
- Updated
http-interop/http-factory
to0.2
0.3.1 - 2016-10-03
- Bug in CallableHandler that resolve to the declaring class of a method instead the final class.
0.3.0 - 2016-10-03
Middlewares\Utils\CallableHandler
class, allowing to resolve and execute callables safely.
0.2.0 - 2016-10-01
- Uri factory
- Response factory
- Stream factory