Closed
Conversation
…xtension` to track modification of runtime classes
This PR was merged into the 3.x branch. Discussion ---------- Fix typo in the docs Commits ------- f2f03d7 Fix typos in the docs
This PR was merged into the 3.x branch. Discussion ---------- Use spl_object_id() instead of spl_object_hash() Small performance tweak. Commits ------- 51bf2ca Use spl_object_id() instead of spl_object_hash()
This PR was merged into the 3.x branch. Discussion ---------- Add `getLastModified()` to extensions Give to extensions the ability to set a last modification date for cache invalidation. ### Runtime Currently, the cache is not invalidated when the signature of a runtime method is modified. This is an issue for templates that use named arguments, as argument names have an impact on the generated class. With this change, extensions using runtime classes can compute a modification date by including the files on which they depend. By default, the `AbstractExtension` checks if there is a file for the runtime class with the same name of the This is the convention applied in [Symfony](https://github.com/symfony/symfony/tree/7.3/src/Symfony/Bridge/Twig/Extension) and Twig Extra: `MarkdownExtension` has `MarkdownRuntime`. ### Attribute Contributing to #3916. The extension class that will get the configuration from attributes will be able to track the classes having attributes to find the last modification date of all this classes. ### ~BC break~ ~In Twig 4.0, the method `getLastModified` will be added to `ExtensionInterface`. It is extremely rare to implement this interface without extending `AbstractExtension`. So adding this method to the interface shouldn't be a problem as the base class has an implementation.~ Commits ------- d8fe3bd Add `LastModifiedExtensionInterface` and implementation in `AbstractExtension` to track modification of runtime classes
This PR was merged into the 3.x branch. Discussion ---------- Add a note on the types locality For your information `@drjayvee` `@ruudk` Commits ------- e7ae984 Add a note on the types locality
Co-authored-by: Fabien Potencier <fabien@potencier.org>
This PR was merged into the 3.x branch. Discussion ---------- Add invoke filter Adds a new filter `invoke`, to invoke arrow functions and other php callables. See the discussion here: #4378 (comment) Commits ------- 3e93e91 Finish the work c4fd25f fix indentation dacbe51 Apply suggestions from code review 2b95bd6 typo 09c30c3 fix merge d58ac9a docs and changelog edecc13 typehint instead of checkArrow f271158 checkArrow, typehints 8b43275 invoke filter
This PR was merged into the 3.x branch. Discussion ---------- Fix constant() behavior when used with ?? The fix is broader than just this bug. Basically, it happens when we clone a Node for which an referenced Node will be modified later on. Commits ------- a998723 Fix constant() behavior when used with ??
This PR was merged into the 3.x branch. Discussion ---------- Fix CS Commits ------- 76062c8 Fix CS
…` (Kocal) This PR was merged into the 3.x branch. Discussion ---------- Improve documentation examples for `enum` and `enum_cases` It may be obvious, but I first thought initializing an BackendEnum with a specific value could be possible with `enum(FQCN, value)`, but it does not, it always returns the first case instance (if exists). Instead, `enum(FQCN).from(value)` must be used, and I think it's worth to improve `enum()` examples. Commits ------- def4abb Improve documentation examples for `enum` and `enum_cases`
This PR was merged into the 3.x branch. Discussion ---------- Bump minimum Commonmark requirement All previous versions have security issues Commits ------- 8f97076 Bump minimum Commonmark requirement
This PR was merged into the 3.x branch. Discussion ---------- Fix intl test Let's try to make it less fragile. Commits ------- 41bfb6b Fix intl test
This PR was squashed before being merged into the 3.x branch. Discussion ---------- Introduce registerUndefinedTestCallback This is similar to `registerUndefinedFilterCallback` and `registerUndefinedFunctionCallback` Commits ------- cc12df9 Introduce registerUndefinedTestCallback
Before this fix, the generated Template code had quotes around the index (integer) parameter value.
This PR was merged into the 3.x branch. Discussion ---------- Compile 'index' with repr (not string) in EmbedNode Before this PR, the generated Template code had quotes around the index (integer) parameter value. Commits ------- e4d7915 Compile 'index' with repr (not string) in EmbedNode
This PR was merged into the 3.x branch. Discussion ---------- [Doc] Tweaks in the escaping article AS you can see in the redenred page (https://twig.symfony.com/doc/3.x/filters/escape.html) the tip about `html_attr` contains some uneeded line breaks. This also tweaks another explanation to make it more clear. Commits ------- 50327b5 [Doc] Tweaks in the escaping article
Missing `fruits` variable declaration.
This PR was merged into the 3.x branch. Discussion ---------- Update replace.rst Missing `fruits` variable declaration. Commits ------- df3a281 Update replace.rst
This PR was merged into the 3.x branch. Discussion ---------- Update inky_to_html.rst: Updating link Page: https://twig.symfony.com/doc/3.x/filters/inky_to_html.html Commits ------- b9a4e04 Update inky_to_html.rst: Updating link
This PR was merged into the 3.x branch. Discussion ---------- Fix array typehint for $variants in HtmlExtension This PR corrects the array typehint for the `$variants` parameter in the `HtmlExtension::htmlCva` method. It was missing a closing angle bracket (`>`). Commits ------- 64c87ee Fix array typehint for $variants in HtmlExtension
…uiluz) This PR was merged into the 3.x branch. Discussion ---------- Allow Symfony 8 packages in Twig extra packages I'm testing the upcoming Symfony 8 in some apps, and I have some issues with some Twig extra packages that don't allow installing Symfony 8 packages. Commits ------- 9a8a1dc Allow Symfony 8 packages in Twig extra packages
This PR was merged into the 3.x branch. Discussion ---------- Add caution note for random function usage See https://www.php.net/manual/en/function.array-rand.php and https://www.php.net/manual/en/function.mt-rand.php. Users should know that the Twig function is a convenience feature, but unusable e.g. for serious gaming/gambling apps due to the potential predictability and limited value range. Commits ------- 02c5a4b Add caution note for random function usage
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.
No description provided.