api-platform / core

The server component of API Platform: hypermedia and GraphQL APIs in minutes
https://api-platform.com
MIT License
2.42k stars 863 forks source link

Upgrade from 2.7.16 to 2.7.18 omits "operation" in JSONLD context #6364

Closed jkabat closed 4 months ago

jkabat commented 4 months ago

API Platform version(s) affected: 2.7.18

Description
As of now we cant upgrade to v3+. In 2.7.17/18 serialization/normalization had to changed - operations defined in DTO are not provided in JSONLD context anymore and so are impossible to be read in decorator.

#[ApiResource(
    types: ['https://schema.org/PostalAddress'],
    operations: [new Get(controller: 'ApiPlatform\Action\NotFoundAction', read: false, output: false)],
    normalizationContext: ['jsonld_embed_context' => true],
)]

We used JsonLdContextNormalizer to modify output based on "canRead" method of operation object.

Possible Solution
Lock the composer on 2.7.16

soyuka commented 4 months ago

Sorry 2.7 is not supported anymore as we didn't manage to collect enough funds to do so.