diff --git a/core/lib/Drupal/Core/Controller/ControllerResolver.php b/core/lib/Drupal/Core/Controller/ControllerResolver.php index 9ae9788..f7e9c5a 100644 --- a/core/lib/Drupal/Core/Controller/ControllerResolver.php +++ b/core/lib/Drupal/Core/Controller/ControllerResolver.php @@ -110,7 +110,7 @@ protected function doGetArguments(Request $request, $controller, array $paramete // values in a special request attribute ('_raw'). If a controller argument // has a type hint, we pass it the upcasted object, otherwise we pass it // the original, raw value. - if ($request->attributes->has('_raw') && $raw = $request->attributes->get('_raw')->all()) { + if ($request->attributes->has(':raw') && $raw = $request->attributes->get(':raw')->all()) { foreach ($parameters as $parameter) { // Use the raw value if a parameter has no typehint. if (!$parameter->getClass() && isset($raw[$parameter->name])) { diff --git a/core/lib/Drupal/Core/ParamConverter/ParamConverterManager.php b/core/lib/Drupal/Core/ParamConverter/ParamConverterManager.php index c1d4b67..ed94cd4 100644 --- a/core/lib/Drupal/Core/ParamConverter/ParamConverterManager.php +++ b/core/lib/Drupal/Core/ParamConverter/ParamConverterManager.php @@ -81,7 +81,7 @@ public function enhance(array $defaults, Request $request) { // Keep the copies the raw values of things that were converted. $backup = array_intersect_key($backup, array_flip($converted)); - $defaults['_raw'] = new ParameterBag($backup); + $defaults[':raw'] = new ParameterBag($backup); // Check if all upcasting yielded a result. // If an upcast value is NULL do a 404. diff --git a/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php b/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php index 4633076..a1db7e8 100644 --- a/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php +++ b/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php @@ -65,7 +65,7 @@ public function testGetArguments() { $request = new \Symfony\Component\HttpFoundation\Request(array(), array(), array( 'entity' => $mock_entity, 'user' => $mock_account, - '_raw' => new ParameterBag(array('entity' => 1, 'user' => 1)), + ':raw' => new ParameterBag(array('entity' => 1, 'user' => 1)), )); $arguments = $this->controllerResolver->getArguments($request, $controller);