Verified Commit 847ab04c authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3276187 by mondrake, catch: Since symfony/routing 6.1: Construction of...

Issue #3276187 by mondrake, catch: Since symfony/routing 6.1: Construction of "Symfony\Component\Routing\Exception\MissingMandatoryParametersException" with an exception message is deprecated, provide the route name and an array of missing parameters instead
parent 3b3e794a
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -32,5 +32,4 @@
%"PHPUnit\\TextUI\\DefaultResultPrinter".*is considered internal%

# Symfony 6.1 deprecations.
%Since symfony\/routing 6\.1: Construction of .*MissingMandatoryParametersException.* with an exception message is deprecated, provide the route name and an array of missing parameters instead%
%Since symfony\/routing 6\.1: The .*UrlMatcher::handleRouteRequirements\(\).* method will have a new .*routeParameters.* argument in version 7\.0, not defining it is deprecated%
+1 −1
Original line number Diff line number Diff line
@@ -178,7 +178,7 @@ protected function doGenerate(array $variables, array $defaults, array $tokens,

    // all params must be given
    if ($diff = array_diff_key($variables, $mergedParams)) {
      throw new MissingMandatoryParametersException(sprintf('Some mandatory parameters are missing ("%s") to generate a URL for route "%s".', implode('", "', array_keys($diff)), $name));
      throw new MissingMandatoryParametersException($name, array_keys($diff));
    }

    $url = '';
+1 −1
Original line number Diff line number Diff line
@@ -407,7 +407,7 @@ public function testUriRelationships() {
    $url_generator->expects($this->any())
      ->method('generateFromRoute')
      ->with($route_name_1)
      ->willThrowException(new MissingMandatoryParametersException());
      ->willThrowException(new MissingMandatoryParametersException($route_name_1, ['missing_parameter']));
    $this->assertEquals([], $entity->uriRelationships());
  }