Merge "Pass "services" through from coreRoutes.json to ObjectFactory"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 25 Sep 2019 15:48:02 +0000 (15:48 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 25 Sep 2019 15:48:02 +0000 (15:48 +0000)
includes/Rest/Router.php

index 6821d89..6dfcf3c 100644 (file)
@@ -276,8 +276,7 @@ class Router {
                $request->setPathParams( array_map( 'rawurldecode', $match['params'] ) );
                $spec = $match['userData'];
                $objectFactorySpec = array_intersect_key( $spec,
-                       // @todo ObjectFactory supports more keys than this.
-                       [ 'factory' => true, 'class' => true, 'args' => true ] );
+                       [ 'factory' => true, 'class' => true, 'args' => true, 'services' => true ] );
                /** @var $handler Handler (annotation for PHPStorm) */
                $handler = $this->objectFactory->createObject( $objectFactorySpec );
                $handler->init( $this, $request, $spec, $this->responseFactory );