Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[6.3] non-existent resolver Symfony\Bridge\Doctrine\ArgumentResolver\EntityValueResolver #50081

Closed
@PhilETaylor

Description

@PhilETaylor

Symfony version(s) affected

6.3.x-dev

Description

I had a fully working 6.2 app and I upgraded to 6.3.x-dev as a test.

My controller has some new (and working in 6.2) MapEntity attributes like

 #[MapEntity(mapping: [
            'location_id' => 'id',
        ])] Locations $location,

Since [HttpKernel] Introduce pinnable value resolvers with #[ValueResolver] and #[AsPinnedValueResolver] #48992 was merged I now get this error

ScreenShot-2023-04-20-18 06 50

Sorry way beyond me...

Ping @MatTheCat

How to reproduce

Here is a reproducer - https://github.com/PhilETaylor/mapentity_reproducer

To create this reproducer I did

  • composer create-project symfony/skeleton bug_app
  • change composer.json to allow 6.3.x and dev stability
  • composer require orm
  • composer require symfony/maker-bundle --dev
  • use maker bundle to create a controller - edit the controller to add the MapEntity
  • use maker bundle to create an entity
  • symfony serve
  • go to http://127.0.0.1:8000/bug - you can see the error there

Possible Solution

Pay @MatTheCat some sponsorship... incoming.... Edit: No sponsor button :-(

Additional Context

I can "fix" this for my own purposes with this in services.php so maybe its a tagging issue?

$services->set(\Symfony\Bridge\Doctrine\ArgumentResolver\EntityValueResolver::class)
        ->tag('doctrine.orm.entity_value_resolver');

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions