fix(jsonld): reset gen_id configuration#7263
Merged
Merged
Conversation
soyuka
commented
Jun 30, 2025
|
|
||
| if (true === ($context['output']['gen_id'] ?? true) && true === ($context['force_iri_generation'] ?? true) && $iri = $this->iriConverter->getIriFromResource($object, UrlGeneratorInterface::ABS_PATH, $context['operation'] ?? null, $context)) { | ||
| $operation = $context['operation'] ?? null; | ||
| if (true === ($context['output']['gen_id'] ?? true) && true === ($context['force_iri_generation'] ?? true) && $iri = $this->iriConverter->getIriFromResource($object, $operation?->getUrlGenerationStrategy() ?? UrlGeneratorInterface::ABS_PATH, $operation, $context)) { |
Member
Author
There was a problem hiding this comment.
this is probably not a necessary patch but it's probably better then the previous code
soyuka
commented
Jun 30, 2025
| } | ||
|
|
||
| unset($context['iri'], $context['uri_variables'], $context['item_uri_template'], $context['force_resource_class']); | ||
| unset($context['iri'], $context['uri_variables'], $context['item_uri_template'], $context['force_resource_class'], $context['output']['gen_id']); |
Member
Author
There was a problem hiding this comment.
this should probably reset the gen_id context between child context generation
Member
Author
|
Didn't meant to merge this, its back at #7264 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I failed reproducing the users bc breaks, I think I isolated the behavior though, @norkunas @GSadee may you please check this patch and tell me if it solves your issues? Also would it be possible to have a look at my test fixtures and let me know how your configuration differs from my test?