Skip to content

Commit 97e3d54

Browse files
minor symfony#54814 [DoctrineBridge] fix test (xabbuh)
This PR was merged into the 7.1 branch. Discussion ---------- [DoctrineBridge] fix test | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT Commits ------- d7a119c fix test
2 parents c3615e6 + d7a119c commit 97e3d54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ private function getIdentifier(Request $request, MapEntity $options, ArgumentMet
157157
return $id ?? ($options->stripNull ? false : null);
158158
}
159159
if ($request->attributes->has('id')) {
160-
trigger_deprecation('symfony/doctrine-bridge', '7.2', '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(), $argument->getControllerName());
160+
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');
161161

162162
return $request->attributes->get('id') ?? ($options->stripNull ? false : null);
163163
}
@@ -178,7 +178,7 @@ private function getCriteria(Request $request, MapEntity $options, ObjectManager
178178

179179
return $criteria;
180180
} elseif (null === $mapping) {
181-
trigger_deprecation('symfony/doctrine-bridge', '7.2', 'Relying on auto-mapping for Doctrine entities is deprecated for argument $%s of "%s": declare the identifier using either the #[MapEntity] attribute or mapped route parameters.', $argument->getName(), $argument->getControllerName());
181+
trigger_deprecation('symfony/doctrine-bridge', '7.1', 'Relying on auto-mapping for Doctrine entities is deprecated for argument $%s of "%s": declare the identifier using either the #[MapEntity] attribute or mapped route parameters.', $argument->getName(), method_exists($argument, 'getControllerName') ? $argument->getControllerName() : 'n/a');
182182
$mapping = $request->attributes->keys();
183183
}
184184

0 commit comments

Comments
 (0)