Skip to content

[Sets] Remove TwigSetProvider - #1015

Merged
TomasVotruba merged 1 commit into
mainfrom
remove-twig-set-provider
Aug 5, 2026
Merged

[Sets] Remove TwigSetProvider#1015
TomasVotruba merged 1 commit into
mainfrom
remove-twig-set-provider

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Alternative to #1014: instead of ignoring the deprecated set objects in TwigSetProvider, drop the provider itself. It was the last SetProviderInterface implementation left here, after #1010 and #1012 removed the Symfony ones.

The provider only carried the Twig composer-based.php set, whose rules already declare their own twig/twig constraint - so nothing is lost by removing the ComposerTriggeredSet wrapper:

per-version set covered in config/sets/twig/composer-based.php
twig112.php RenameClassRector, twig/twig >=1.12 <1.40
twig127.php RenameMethodRector, twig/twig >=1.27
twig134.php SimpleFunctionAndFilterRector, bound to twig/twig 1.34
twig140.php, twig24.php, twig-underscore-to-namespace.php RenameClassRector, twig/twig >=1.40
twig20.php same >=1.40 rename, as both underscore names lead to the same namespaced class
twig30.php AddReturnTypeDeclarationRector, twig/twig >=3.0

The 184 renames of twig-underscore-to-namespace.php were diffed entry by entry against the >=1.40 block; the only one not carried over is 'Twig_Tests_EnvironmentTest_Extension' => 'Twig\Tests\EnvironmentTest\Extensio', a class from Twig's own test suite with a truncated target name.

The per-version sets and the TwigSetList constants stay as they are, so anyone registering them by hand is unaffected.

@TomasVotruba
TomasVotruba merged commit 0b27abd into main Aug 5, 2026
7 checks passed
@TomasVotruba
TomasVotruba deleted the remove-twig-set-provider branch August 5, 2026 12:18
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.

1 participant