Skip to content
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

[TwigBridge][TwigBundle] Drop support for Twig 2 #51626

Merged
merged 1 commit into from Sep 11, 2023

Conversation

derrabus
Copy link
Member

Q A
Branch? 7.0
Bug fix? no
New feature? yes
Deprecations? no
Tickets N/A
License MIT
Doc PR N/A

Let's make our lives easier and only support one major version of Twig in the future. Upgrading projects from Twig 2 to 3 shouldn't be much trouble anyway.

@derrabus derrabus added TwigBundle RFC RFC = Request For Comments (proposals about features that you want to be discussed) TwigBridge labels Sep 11, 2023
@carsonbot carsonbot changed the title Drop support for Twig 2 [TwigBridge][TwigBundle] Drop support for Twig 2 Sep 11, 2023
@carsonbot carsonbot added this to the 7.0 milestone Sep 11, 2023
Copy link
Member

@stof stof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changelog file must be updated

@derrabus
Copy link
Member Author

The changelog file must be updated

Done for TwigBundle and TwigBridge. Not sure if I need to do that for the other bundles/components as well.

@stof
Copy link
Member

stof commented Sep 11, 2023

@derrabus I think it is OK as is.

@@ -25,7 +25,7 @@
"symfony/http-kernel": "^6.4|^7.0",
"symfony/process": "^6.4|^7.0",
"symfony/uid": "^6.4|^7.0",
"twig/twig": "^2.13|^3.0.4"
"twig/twig": "^3.0.4"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this add the conflict rule ?

Copy link
Member Author

@derrabus derrabus Sep 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure. It didn't have one before and I don't know why that is.

Copy link
Member

@GromNaN GromNaN Sep 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code that depends on twig is very robust.

if (!empty($f['class']) && (is_subclass_of($f['class'], 'Twig\Template') || is_subclass_of($f['class'], 'Twig_Template')) && method_exists($f['class'], 'getDebugInfo')) {

@nicolas-grekas
Copy link
Member

Thank you @derrabus.

@nicolas-grekas nicolas-grekas merged commit 0839d5a into symfony:7.0 Sep 11, 2023
5 of 9 checks passed
@derrabus derrabus deleted the drop/twig-2 branch September 11, 2023 16:51
@fabpot fabpot mentioned this pull request Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature RFC RFC = Request For Comments (proposals about features that you want to be discussed) Status: Reviewed TwigBridge TwigBundle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants