Skip to content

v3.3.8: Embedded subresources no longer denormalizing #6465

@paullallier

Description

@paullallier

API Platform version(s) affected: 3.3.8 (works in 3.3.7)

Description
I've got a PUT endpoint like this:
Screenshot 2024-07-12 at 13 06 18

I'm having trouble with the embedded /accounts/{id} IRI in 3.3.8, which I think relates to the changes to IriConverter in #6451.

In 3.3.7, it pulls the account entity from the database fine. In 3.3.8, it fails on this check, which was added in that PR, I think.
https://github.com/ili101/api-platform-core/blob/14cc145ce646fe4a799652f5b451d0140076cf18/src/Symfony/Routing/IriConverter.php#L81

At that point, my $context points to the Tax entity, but it would still find the GET operation for the Account entity in 3.3.7. Now it complains that I have an IRI for the wrong type of resource instead.

I suspect this might be an edge case that the tests are missing? (Or I'm using API-P in an unusual way again...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions