Skip to content

[Sets] Update SetManagerTest to the single Twig composer-based set - #8294

Closed
TomasVotruba wants to merge 1 commit into
mainfrom
update-set-manager-test-twig
Closed

[Sets] Update SetManagerTest to the single Twig composer-based set#8294
TomasVotruba wants to merge 1 commit into
mainfrom
update-set-manager-test-twig

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Follow-up to #8292, fixes the 4 SetManagerTest failures on main.

rectorphp/rector-symfony#1010 is merged, so TwigSetProvider now registers only its composer-based trigger. The per-version Twig sets were dropped there because every rule in them is already in config/sets/twig/composer-based.php, bound to the exact twig/twig version it needs — so a Twig 2.0 project still gets exactly the rules it got before, just from one set instead of three.

-        $this->assertCount(8, $twigComposerTriggeredSet);
+        $this->assertCount(1, $twigComposerTriggeredSet);

-        yield [
-            __DIR__ . '/Fixture/project-twig-20',
-            [realpath(TwigSetList::COMPOSER_BASED), realpath(TwigSetList::TWIG_20)],
-        ];
+        yield [__DIR__ . '/Fixture/project-twig-20', [realpath(TwigSetList::COMPOSER_BASED)]];

tests/Set green: 12 tests, 15 assertions.

rectorphp/rector-symfony#1010 trims TwigSetProvider to its composer-based trigger, as every rule of the per-version Twig sets is already in it, bound to the twig/twig version it needs.
@TomasVotruba

Copy link
Copy Markdown
Member Author

Folded into #8293, so that PR is green on its own.

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