Skip to content

Fix deprecations related to Symfony 8 and Twig 4#258

Open
maciazek wants to merge 3 commits intoKreyu:mainfrom
maciazek:fix/sf8
Open

Fix deprecations related to Symfony 8 and Twig 4#258
maciazek wants to merge 3 commits intoKreyu:mainfrom
maciazek:fix/sf8

Conversation

@maciazek
Copy link
Copy Markdown
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant