In #2870194: Ensure that process-isolated tests can use Symfony's PHPunit bridge to catch usages of deprecated code certain frequently encountered deprecation messages were suppressed.

This included two messages from HttpKernel which happen on every request:

'As of 3.1 an Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface is used to resolve arguments. In 4.0 the $argumentResolver becomes the Symfony\Component\HttpKernel\Controller\ArgumentResolver if no other is provided instead of using the $resolver argument.'

'Symfony\Component\HttpKernel\Controller\ControllerResolver::getArguments is deprecated as of 3.1 and will be removed in 4.0. Implement the Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface and inject it in the HttpKernel instead.'

Comments

grahamC created an issue. See original summary.

grahamc’s picture

Status: Active » Needs review
StatusFileSize
new3.58 KB

Extracted @tim.plunkett's fix from #2870194-51: Ensure that process-isolated tests can use Symfony's PHPunit bridge to catch usages of deprecated code which seems to take care of the two HttpKernel messages.

edit: this could potentially be improved upon by using \Symfony\Component\HttpKernel\Controller\ArgumentResolver instead of implementing getArguments()

dawehner’s picture

+++ b/core/lib/Drupal/Core/Controller/ControllerResolver.php
@@ -168,4 +169,23 @@ protected function doGetArguments(Request $request, $controller, array $paramete
+   * @todo Consider using \Symfony\Component\HttpKernel\Controller\ArgumentResolver instead.
+   */

Do you mind creating an issue about that, so we don't forget to come back later?

dawehner’s picture

alexpott’s picture

Status: Needs review » Closed (duplicate)

Merged this into #2912169: Inject the argument resolver into HttpKernel::__construct. Let's make this a dupe of that one.

esod’s picture

Reroll the patch for Drupal 8.5.8 (and possibly 8.5.7).

esod’s picture

Status: Closed (duplicate) » Needs review
alexpott’s picture

Status: Needs review » Closed (duplicate)

@esod just wondering why you re-opened this issue? This is resolved in 8.6.x and onwards by #2912169: Inject the argument resolver into HttpKernel::__construct and 8.5.x only receives security security support. Going to mark this closed duplicated since as far as I can see it is. If it is not please re-open against 8.7.x as deprecations only need to be fixed the next dev release.

esod’s picture

@alexpott The original patch for this issue doesn't apply to Drupal 8.5.8. We're using this patch and are on Drupal 8.5 so I needed to reroll it.

As you say, the issue is resolved in 8.6.x and we've removed the patch from our 8.6 build.

Closed status is fine. We still need the rerolled patch and I guessed others might as well. That's why I posted the reroll here.

If I'm not mistaken, changing the issue's status to Needs review allowed for the patch to be tested.