Content-Length: 265989 | pFad | https://github.com/symfony/symfony/commit/b81a62c3382a07e7380b4d8cd5a627b89d7152ff

85 [DoctrineBridge] Revert deprecating by-{id} mapping of entities · symfony/symfony@b81a62c · GitHub
Skip to content

Commit b81a62c

Browse files
[DoctrineBridge] Revert deprecating by-{id} mapping of entities
1 parent 4d9fd2e commit b81a62c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,8 @@ private function getIdentifier(Request $request, MapEntity $options, ArgumentMet
156156

157157
return $id ?? ($options->stripNull ? false : null);
158158
}
159-
if ($request->attributes->has('id')) {
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');
161159

160+
if ($request->attributes->has('id')) {
162161
return $request->attributes->get('id') ?? ($options->stripNull ? false : null);
163162
}
164163

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/symfony/symfony/commit/b81a62c3382a07e7380b4d8cd5a627b89d7152ff

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy