Skip to content

Document the backward compatibility promise - #4975

Open
fabpot wants to merge 1 commit into
twigphp:3.xfrom
fabpot:backward-compatibility-promise
Open

fabpot wants to merge 1 commit into
twigphp:3.xfrom
fabpot:backward-compatibility-promise

Conversation

@fabpot

@fabpot fabpot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Comment on lines +58 to +61
The reference is how Twig behaves, not how the documentation describes it. When
they disagree, the documentation is wrong and gets fixed. Only when the
documented behavior is the one Twig intended is Twig fixed instead, which can
change the output of Twig templates relying on the previous behavior.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This feels harder to read than it could/should

Especially the

is the one Twig intended is Twig fixed instead

documented behavior is the one Twig intended is Twig fixed instead, which can
change the output of Twig templates relying on the previous behavior.

The promise does not cover:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think i would move the "does not cover" near the "does cover" and would precise the edge cases after both

Comment on lines +139 to +146
Deprecated Code
~~~~~~~~~~~~~~~

When a class, a method or an extension point is going to be removed or
changed, Twig deprecates it in a minor release and triggers a deprecation
notice when your code uses it. The :doc:`deprecated features <deprecated>` page
lists all deprecations with their replacement; fix them before upgrading to the
next major release.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Duplicates lines 70/81 ?

@wachterjohannes

Copy link
Copy Markdown

Nice addition. Two things beyond @smnandre's comments:

The paragraph "the documentation is wrong and gets fixed... Twig is fixed instead" can excuse any bugfix as a "doc fix". Needs a tighter scope or one example.

Node classes are covered, tree shape is not. True but abstract. One small example would fix that.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants