diff --git a/src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php b/src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php index d2ee05b42ce1d..cd04081515478 100644 --- a/src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php +++ b/src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php @@ -157,7 +157,7 @@ private function getIdentifier(Request $request, MapEntity $options, ArgumentMet return $id ?? ($options->stripNull ? false : null); } if ($request->attributes->has('id')) { - trigger_deprecation('symfony/doctrine-bridge', '7.1', 'Relying on auto-mapping for Doctrine entities is deprecated for argument $%s of "%s": declare the mapping using either the #[MapEntity] attribute or mapped route parameters.', $argument->getName(), method_exists($argument, 'getControllerName') ? $argument->getControllerName() : 'n/a'); + trigger_deprecation('symfony/doctrine-bridge', '7.1', 'Relying on parameter "{id}" in route definitions is deprecated for Doctrine entities, use "{%s}" instead for controller "%s".', $argument->getName(), method_exists($argument, 'getControllerName') ? $argument->getControllerName() : 'n/a'); return $request->attributes->get('id') ?? ($options->stripNull ? false : null); }