comparison core/lib/Drupal/Core/Controller/ControllerResolver.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children af1871eacc83
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
78 } 78 }
79 79
80 return $callable; 80 return $callable;
81 } 81 }
82 82
83
84 /** 83 /**
85 * {@inheritdoc} 84 * {@inheritdoc}
86 */ 85 */
87 public function getController(Request $request) { 86 public function getController(Request $request) {
88 if (!$controller = $request->attributes->get('_controller')) { 87 if (!$controller = $request->attributes->get('_controller')) {
127 126
128 /** 127 /**
129 * {@inheritdoc} 128 * {@inheritdoc}
130 */ 129 */
131 protected function doGetArguments(Request $request, $controller, array $parameters) { 130 protected function doGetArguments(Request $request, $controller, array $parameters) {
131 // Note this duplicates the deprecation message of
132 // Symfony\Component\HttpKernel\Controller\ControllerResolver::getArguments()
133 // to ensure it is removed in Drupal 9.
134 @trigger_error(sprintf('%s is deprecated as of 8.6.0 and will be removed in 9.0. Inject the "http_kernel.controller.argument_resolver" service instead.', __METHOD__, ArgumentResolverInterface::class), E_USER_DEPRECATED);
132 $attributes = $request->attributes->all(); 135 $attributes = $request->attributes->all();
133 $raw_parameters = $request->attributes->has('_raw_variables') ? $request->attributes->get('_raw_variables') : []; 136 $raw_parameters = $request->attributes->has('_raw_variables') ? $request->attributes->get('_raw_variables') : [];
134 $arguments = []; 137 $arguments = [];
135 foreach ($parameters as $param) { 138 foreach ($parameters as $param) {
136 if (array_key_exists($param->name, $attributes)) { 139 if (array_key_exists($param->name, $attributes)) {