Skip to content

Conversation

@patdunlavey
Copy link
Collaborator

See #392 for 1.2.0 PR

  • Moved twig context alter hook inside the render context to avoid potential cache 'leakage' errors.

…text to avoid potential cache 'leakage' errors.
Copy link
Member

@DiegoPino DiegoPino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small change. Not a biggie but just bc in the future executeInRenderContext might change signature and not return an empty array. Thanks

// In case someone decided to wipe the original context?
// We bring it back!
$context = $context + $original_context;
$cacheabledata = [];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@patdunlavey can you keep please $cacheabledata = []; in line 281?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid I don't understand. Restoring it to a position before $this->renderer->executeInRenderContext will simply result in it being overwritten, and putting it after will clobber the result of $this->renderer->executeInRenderContext, and putting it inside the inline function does nothing that I can see.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind. I've gone ahead and updated the issue branch with the change as requested (and as I understand it).

@DiegoPino DiegoPino merged commit d0c337c into esmero:1.3.0 Dec 15, 2023
@DiegoPino DiegoPino added bug Something isn't working Twig Twig template processing metadata Meta(l) data external bug It is not us, it is them Custom Entities labels Dec 15, 2023
@DiegoPino DiegoPino added this to the 1.3.0 milestone Dec 15, 2023
@patdunlavey patdunlavey deleted the ISSUE-207-1.3 branch December 15, 2023 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Custom Entities external bug It is not us, it is them metadata Meta(l) data Twig Twig template processing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants