only in patch2:
unchanged:
--- a/core/lib/Drupal/Core/Routing/Enhancer/ParamConversionEnhancer.php
+++ b/core/lib/Drupal/Core/Routing/Enhancer/ParamConversionEnhancer.php
@@ -2,12 +2,12 @@
 
 namespace Drupal\Core\Routing\Enhancer;
 
+use Drupal\Core\Http\InputBag;
 use Drupal\Core\ParamConverter\ParamConverterManagerInterface;
 use Drupal\Core\ParamConverter\ParamNotConvertedException;
 use Drupal\Core\Routing\EnhancerInterface;
 use Drupal\Core\Routing\RouteObjectInterface;
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
-use Symfony\Component\HttpFoundation\ParameterBag;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpKernel\Event\ExceptionEvent;
 use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@@ -53,7 +53,8 @@ public function enhance(array $defaults, Request $request) {
    * @param array $defaults
    *   The route defaults array.
    *
-   * @return \Symfony\Component\HttpFoundation\ParameterBag
+   * @return \Drupal\Core\Http\InputBag
+   *   Returns a container for key/value pairs based.
    */
   protected function copyRawVariables(array $defaults) {
     /** @var \Symfony\Component\Routing\Route $route */
@@ -66,7 +67,7 @@ protected function copyRawVariables(array $defaults) {
     foreach (array_intersect_key($defaults, $variables) as $key => $value) {
       $raw_variables[$key] = $value;
     }
-    return new ParameterBag($raw_variables);
+    return new InputBag($raw_variables);
   }
 
   /**
