Skip to content

Use the json-streamer PropertyValueTransformerInterface and tag on Symfony 8.1+ - #8784

Open
tacman wants to merge 1 commit into
api-platform:mainfrom
tacman:fix/json-streamer-property-value-transformer
Open

tacman wants to merge 1 commit into
api-platform:mainfrom
tacman:fix/json-streamer-property-value-transformer

Conversation

@tacman

@tacman tacman commented Nov 2, 2026

Copy link
Copy Markdown
Contributor
Q A
Branch? main
Tickets n/a
License MIT

symfony/json-streamer 8.1 deprecates ValueTransformerInterface and the json_streamer.value_transformer tag in favor of PropertyValueTransformerInterface and json_streamer.property_value_transformer. On a Symfony 8.2 app each container build reports, for IriValueTransformer, TypeValueTransformer and ContextValueTransformer:

  • the deprecated tag on api_platform.jsonld.json_streamer.write.value_transformer.{iri,type,context}
  • the three classes implementing the deprecated interface

Changes:

  • the three JSON-LD transformers implement a new internal ApiPlatform\JsonLd\JsonStreamer\ValueTransformer\PropertyValueTransformerInterface, declared to extend Symfony's PropertyValueTransformerInterface when it exists and the legacy ValueTransformerInterface otherwise
  • json_streamer/common.php picks the tag (and the tagged_locator tag) the same way, so the ^7.4 || ^8.0 constraint still holds

JsonStreamerTransformerPass already merges both tags, so it needs no change.

Checked on an app with symfony/json-streamer 8.2.x-dev: the six deprecations above are gone and a JSON-LD collection request returns 200. I haven't run the test suite or tested against 7.4.

🤖 Generated with Claude Code

symfony/json-streamer 8.1 deprecates ValueTransformerInterface and the
"json_streamer.value_transformer" tag in favor of
PropertyValueTransformerInterface and "json_streamer.property_value_transformer".
The JSON-LD transformers now implement a local interface that extends the new
Symfony one when it exists and the legacy one otherwise, and the tag is picked
the same way, so 7.4 keeps working.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant