Skip to content

Commit

Permalink
minor #54814 [DoctrineBridge] fix test (xabbuh)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nicolas-grekas committed May 2, 2024
2 parents c3615e6 + d7a119c commit 97e3d54
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -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.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());
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');

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

return $criteria;
} elseif (null === $mapping) {
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());
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');
$mapping = $request->attributes->keys();
}

Expand Down

0 comments on commit 97e3d54

Please sign in to comment.