mbin icon indicating copy to clipboard operation
mbin copied to clipboard

revisit controllers/routes and add MapEntity where necessary

Open asdfzdfj opened this issue 1 year ago • 1 comments

follow up of #738

more info: https://github.com/doctrine/DoctrineBundle/pull/1762

the least that needed to be done is go over used controllers and routes, see if they used this auto mapping way to map entity into params, and add #[MapEntity] where necessary, so that in the end doctrine.orm.controller_resolver.auto_mapping could finally be disabled, by setting it to false

(or perhaps work backward by disable auto mapper first, check which endpoint(s) broke, then add #[MapEntity] as necessary)


Actually if I read the documentation correctly, there is a good reason why Symfony is trying to disabled automapper by default. Maybe we should set it to false (default soon) as well as use the MapEntity configuration options instead.

In the next Symfony major release this automapper option will be set to false by default for a good reason after all.

Meaning I would like to see this option to be set to false and use MapEntity

Originally posted by @melroy89 in https://github.com/MbinOrg/mbin/issues/738#issuecomment-2084846184

Set to false and use MapEntity: https://symfony.com/doc/current/doctrine.html#mapentity-options. Which is the purpose from Symfony to deprecate this auto mapping.

Originally posted by @melroy89 in https://github.com/MbinOrg/mbin/pull/738#discussion_r1584472650

asdfzdfj avatar Apr 30 '24 11:04 asdfzdfj

This issue is stale because it has been open 50 days with no activity. Remove stale label or comment or this will be closed in 6 days.

github-actions[bot] avatar Jul 07 '24 02:07 github-actions[bot]