From 9f0da94dd5ad1d4a89b4e171c2a2fb4d39ecd9d2 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Mon, 3 Aug 2026 18:59:44 +0200 Subject: [PATCH] [Tests] Expect twig composer-based set in SetManagerTest rector-symfony added a `twig/composer-based.php` ComposerTriggeredSet constrained to `twig/twig >=1.12`, so it is now matched by every twig fixture project. --- tests/Set/SetManager/SetManagerTest.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/Set/SetManager/SetManagerTest.php b/tests/Set/SetManager/SetManagerTest.php index 0efe4ca78eb..55edca9c1d6 100644 --- a/tests/Set/SetManager/SetManagerTest.php +++ b/tests/Set/SetManager/SetManagerTest.php @@ -20,7 +20,7 @@ public function testMatchComposerTriggered(): void $setManager = $this->createSetManagerWithProjectDirectory(getcwd()); $twigComposerTriggeredSet = $setManager->matchComposerTriggered(SetGroup::TWIG); - $this->assertCount(7, $twigComposerTriggeredSet); + $this->assertCount(8, $twigComposerTriggeredSet); } /** @@ -43,13 +43,20 @@ public function testByVersion(string $projectDirectory, array $expectedSets): vo public static function provideInstalledTwigData(): Iterator { // here we cannot used features coming up in 2.4, as we only have 2.0 - yield [__DIR__ . '/Fixture/project-twig-20', [realpath(TwigSetList::TWIG_20)]]; + yield [ + __DIR__ . '/Fixture/project-twig-20', + [realpath(TwigSetList::COMPOSER_BASED), realpath(TwigSetList::TWIG_20)], + ]; - yield [__DIR__ . '/Fixture/project-twig-24', [realpath(TwigSetList::TWIG_20), realpath(TwigSetList::TWIG_24)]]; + yield [ + __DIR__ . '/Fixture/project-twig-24', + [realpath(TwigSetList::COMPOSER_BASED), realpath(TwigSetList::TWIG_20), realpath(TwigSetList::TWIG_24)], + ]; yield [ __DIR__ . '/Fixture/project-twig-127', - [realpath(TwigSetList::TWIG_112), realpath(TwigSetList::TWIG_127)]]; + [realpath(TwigSetList::COMPOSER_BASED), realpath(TwigSetList::TWIG_112), realpath(TwigSetList::TWIG_127)], + ]; } private function createSetManagerWithProjectDirectory(string $projectDirectory): SetManager