Repository navigation
Conversation
`Cva::apply()` grew its class list with `[...$classes, ...$more]` for each recipe, compound variant and default variant, which copied the whole list each time. It now collects the lists and merges them once with `array_merge()`. This is a small gain: 1218-1230 -> 1163-1173 ns per call on a button recipe with 3 variants, 3 sizes and 2 compound variants.
| * Add a way to mark a `Twig\Markup` instance as safe for some escaping strategies only | ||
| * Make `Environment::getExtension()` return the runtime of an extension class registered with `AttributeExtension` | ||
| * Make `Environment::getRuntime()` fall back to the registered extension of the same class | ||
| * Speed up merging the class lists in `html_cva()` recipes |
Contributor
There was a problem hiding this comment.
in all similar PRs we can drop these lines IMHO
Contributor
Author
There was a problem hiding this comment.
We alreay have Speed up ... entries in the changelog, but on the other hand they produce conflicts every time after a merge... 😅
nicolas-grekas
approved these changes
Nov 15, 2026
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.
Cva::apply()grew its class list with[...$classes, ...$more]for each recipe, compound variant and default variant, which copied the whole list each time.It now collects the lists and merges them once with
array_merge().This is a small gain: 1218-1230 -> 1163-1173 ns per call on a button recipe with 3 variants, 3 sizes and 2 compound variants.