Skip to content

Commit 1e12013

Browse files
authored
Register composer-based set in PHPUnitSetProvider (#748)
1 parent 1a823c1 commit 1e12013

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

‎composer.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"phpstan/phpstan-webmozart-assert": "^2.0",
1414
"phpunit/phpunit": "^13.2",
1515
"rector/jack": "^1.0",
16-
"rector/rector-src": "dev-main",
16+
"rector/rector-src": "dev-composer-triggered-set-version-constraint as dev-main",
1717
"rector/swiss-knife": "^2.4",
1818
"symplify/easy-coding-standard": "^13.2",
1919
"symplify/phpstan-extensions": "^12.0",

‎src/Set/SetProvider/PHPUnitSetProvider.php‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,15 @@ public function provide(): array
8989
__DIR__ . '/../../../config/sets/phpunit130.php'
9090
),
9191

92+
// applies to any installed PHPUnit version, the rules and configuration inside are bound
93+
// to the exact version they are available from
94+
new ComposerTriggeredSet(
95+
SetGroup::PHPUNIT,
96+
'phpunit/phpunit',
97+
'>=4.0',
98+
__DIR__ . '/../../../config/sets/composer-based.php'
99+
),
100+
92101
new Set(SetGroup::PHPUNIT, 'Code Quality', __DIR__ . '/../../../config/sets/phpunit-code-quality.php'),
93102

94103
new Set(

0 commit comments

Comments
 (0)