Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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%
......@@ -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 = '';
......
......@@ -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());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment