Changelog History
Page 1
-
v3.3.0 Changes
October 20, 20203.3.0 - 2020-10-20
โ Added
- ๐ #13 Adds support for PHP 8
๐ Changed
- #8 As the
NotFoundHandler
is technically a request handler, we are moving it to theHandler
namespace with only implementing theRequestHandlerInterface
instead of theMiddlewareInterface
.
๐ Deprecated
- ๐ #8 Marking
NotFoundHandler
in theMiddleware
namespace as deprecated in favor of the newNotFoundHandler
in theHandler
namespace.
๐ Release Notes for 3.3.0
3.3.0
- Total issues resolved: 0
- Total pull requests resolved: 2
- Total contributors: 2
โจ Enhancement,hacktoberfest-accepted
- ๐ 13: feat: add PHP 8 support thanks to @alexraputa
โจ Enhancement
-
v3.2.2 Changes
March 29, 2020โ Added
- Nothing.
๐ Changed
- Nothing.
๐ Deprecated
- Nothing.
โ Removed
- Nothing.
๐ Fixed
- ๐ Fixed
replace
version constraint in composer.json so repository can be used as replacement ofzendframework/zend-stratigility:^3.2.0
.
-
v3.2.1 Changes
January 07, 2020โ Added
- Nothing.
๐ Changed
- Nothing.
๐ Deprecated
- Nothing.
โ Removed
- Nothing.
๐ Fixed
- ๐ Fixes all legacy proxying function definitions to add missing return statements.
-
v3.2.0 Changes
June 12, 2019โ Added
- Nothing.
๐ Changed
- zendframework/zend-stratigility#186 adds a safeguard to middleware pipes to prevent them from being called multiple times within the same middleware. As an example, consider the following middleware:
public function process( ServerRequestInterface $request, RequestHandlerInterface $handler ) : Response Interface { $session = $request->getAttribute('session'); if (! $session) { $response = $handler->handle($request); } // Inject another attribute before handling $response = $handler->handle($request->withAttribute( 'sessionWasEnabled', true ); return $response; }
When using Stratigility, the
$handler
is an instance ofLaminas\Stratigility\Next
, which encapsulates the middleware pipeline and advances through it on each call tohandle()
.The example demonstrates a subtle error: the response from the first conditional should have been returned, but wasn't, which has led to invoking the handler a second time. This scenario can have unexpected behaviors, including always returning a "not found" response, or returning a response from a handler that was not supposed to execute (as an earlier middleware already returned early in the original call).
These bugs are hard to locate, as calling
handle()
is a normal part of any middleware, and multiple conditional calls to it are a standard workflow.With this new version,
Next
will pass a clone of itself to the next middleware in the pipeline, and unset its own internal pipeline queue. Any subsequent requests tohandle()
within the same scope will therefore result in the exceptionLaminas\Stratigility\Exception\MiddlewarePipeNextHandlerAlreadyCalledException
.If you depended on calling
$handler->handle()
multiple times in succession within middleware, we recommend that you compose the specific pipeline(s) and/or handler(s) you wish to call as class dependencies.๐ Deprecated
- Nothing.
โ Removed
- Nothing.
๐ Fixed
- Nothing.
-
v3.2.0.p2
March 23, 2020 -
v3.1.0 Changes
February 06, 2019โ Added
- zendframework/zend-stratigility#178 adds the class
Laminas\Stratigility\EmptyPipelineHandler
, which raises anEmptyPipelineException
when it handles an incoming request. It's primary purpose is for use in theMiddlewarePipe
as a fallback handler duringhandle()
operations.
๐ Changed
๐ zendframework/zend-stratigility#178 provides some performance improvements to
MiddlewarePipe::handle()
by having it create an instance ofEmptyPipelineHandler
to use as a fallback handler when it callsprocess()
on itself. This prevents cloning of the pipeline in this scenario, which is used when it acts as an application entrypoint.๐ zendframework/zend-stratigility#185 removes the "final" declaration from the
ErrorHandler
class, to allow more easily mocking it for testing.
๐ Deprecated
- Nothing.
โ Removed
- Nothing.
๐ Fixed
- Nothing.
- zendframework/zend-stratigility#178 adds the class
-
v3.1.0.p2
March 23, 2020 -
v3.0.3 Changes
February 06, 2019โ Added
- ๐ zendframework/zend-stratigility#184 adds support for PHP 7.3.
๐ Changed
- Nothing.
๐ Deprecated
- Nothing.
โ Removed
- Nothing.
๐ Fixed
- Nothing.
-
v3.0.3.p2
March 23, 2020 -
v3.0.2 Changes
July 24, 2018โ Added
- Nothing.
๐ Changed
- Nothing.
๐ Deprecated
- Nothing.
โ Removed
- ๐ zendframework/zend-stratigility#177 removes a conditional from
Laminas\Stratigility\Middleware\ErrorHandler
that can never be reached.
๐ Fixed
- Nothing.