Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 5350b19

Browse files
committed
Remove second, boolean "has" argument in Dispatch and Middleware listeners
Not necessary with shipped, stable versions of zend-servicemanager.
1 parent 751f5b4 commit 5350b19

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

CHANGELOG.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@ All notable changes to this project will be documented in this file, in reverse
8080
`Zend\ModuleManager\Listener\ServiceListener` instance before retrieving and
8181
bootstrapping the `Application` instance; this ensure it is fully
8282
configured at that time.
83-
- [#38](https://github.com/zendframework/zend-mvc/pull/38) Ensure middleware
84-
tests against abstract factories
85-
- zend-servicemanager v3 modified the behavior of has() to not search abstract
86-
factories by default. You can force it to do so by passing an optional
87-
second argument, a boolean flag, with a value of boolean true.
8883

8984
## 2.6.4 - TBD
9085

src/DispatchListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function onDispatch(MvcEvent $e)
8585

8686

8787
// Query abstract controllers, too!
88-
if (! $controllerManager->has($controllerName, true)) {
88+
if (! $controllerManager->has($controllerName)) {
8989
$return = $this->marshalControllerNotFoundEvent($application::ERROR_CONTROLLER_NOT_FOUND, $controllerName, $e, $application);
9090
return $this->complete($return, $e);
9191
}

src/MiddlewareListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function onDispatch(MvcEvent $event)
4848
$serviceManager = $application->getServiceManager();
4949
$middlewareName = is_string($middleware) ? $middleware : get_class($middleware);
5050

51-
if (is_string($middleware) && $serviceManager->has($middleware, true)) {
51+
if (is_string($middleware) && $serviceManager->has($middleware)) {
5252
$middleware = $serviceManager->get($middleware);
5353
}
5454
if (! is_callable($middleware)) {

0 commit comments

Comments
 (0)