Skip to content

revisit controllers/routes and add MapEntity where necessary #744

@asdfzdfj

Description

@asdfzdfj

follow up of #738

more info: doctrine/DoctrineBundle#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 #738 (comment)

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 #738 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendBackend related issues and pull requestsenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions