Fix deprecations related to Symfony 8 and Twig 4#258
Open
maciazek wants to merge 3 commits intoKreyu:mainfrom
Open
Fix deprecations related to Symfony 8 and Twig 4#258maciazek wants to merge 3 commits intoKreyu:mainfrom
maciazek wants to merge 3 commits intoKreyu:mainfrom
Conversation
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.
Hi,
When I tried to update my demo app to Symfony 8, I've found some more deprecations:
1. User Deprecated: Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.
This one is related to Number and Money columns. In Symfony 7.3, new setOptions() method was introduced, and in Symfony 8.0 defining nested options via setDefault() method was removed. To maintain compatibility with Symfony <7.3, I used "method_exists" to check if the new setOptions() method is present or not.
More info: https://symfony.com/doc/current/components/options_resolver.html#nested-options
2. Since twig/twig 3.15: As the "??" infix operator will change its precedence in the next major version, add explicit parentheses to avoid behavior change in "@KreyuDataTable/themes/bootstrap_5.html.twig" at line 890.
This one is related to the changes in operator precedence in the upcoming Twig 4 (which is not released yet), but I think it would be good to have it fixed already.
More info: https://twig.symfony.com/doc/3.x/templates.html#operators
For testing, I created test/sf8 branch in demo app.