Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[TwigBundle] Deprecate base_template_class option #54657

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 2, 2024

Conversation

Steveb-p
Copy link
Contributor

Q A
Branch? 7.1
Bug fix? no
New feature? no
Deprecations? yes
Issues
License MIT

According to https://github.com/twigphp/Twig/blob/3.x/CHANGELOG#L222, base_template_class option has been removed from Twig 3.0.

Symfony still allows to pass this configuration option via https://github.com/symfony/symfony/blob/7.1/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php#L132, but there is of course no effect.

I think it would be good to deprecate it and prepare it's removal in 8.x? Since Symfony 7.x requires Twig 3.x.

@xabbuh
Copy link
Member

xabbuh commented Apr 18, 2024

The deprecation should be documented in UPRADE-7.1.md and in the changelog file of TwigBundle though.

@Steveb-p
Copy link
Contributor Author

Steveb-p commented Apr 18, 2024

The deprecation should be documented in UPRADE-7.1.md and in the changelog file of TwigBundle though.

I will follow up with this shortly 😅 I just need to check how they are usually done :)

@carsonbot carsonbot changed the title Deprecate Twig Bundle base_template_class option [TwigBundle] Deprecate Twig Bundle base_template_class option Apr 19, 2024
@OskarStark OskarStark changed the title [TwigBundle] Deprecate Twig Bundle base_template_class option [TwigBundle] Deprecate base_template_class option Apr 19, 2024
@fabpot
Copy link
Member

fabpot commented May 2, 2024

Thank you @Steveb-p.

@fabpot fabpot merged commit 4c84578 into symfony:7.1 May 2, 2024
6 of 10 checks passed
@Steveb-p Steveb-p deleted the patch-1 branch May 2, 2024 10:03
@derrabus
Copy link
Member

derrabus commented May 2, 2024

The tests needed a little adjustment: #54810

nicolas-grekas added a commit that referenced this pull request May 2, 2024
…e_class (derrabus)

This PR was merged into the 7.1 branch.

Discussion
----------

[TwigBundle] Fix deprecation warnings about base_template_class

| Q             | A
| ------------- | ---
| Branch?       | 7.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | Follows #54657
| License       | MIT

Since #54657, TwigBundle uses its own deprecated option in non-legacy tests. This PR fixes this by testing that option and the triggered deprecation message in a separate test.

Commits
-------

10d48cd [TwigBundle] Fix deprecation warnings about base_template_class
@fabpot fabpot mentioned this pull request May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants