diff --git a/rules-tests/PHPUnit100/Rector/StmtsAwareInterface/WithConsecutiveRector/WithConsecutiveRectorTest.php b/rules-tests/PHPUnit100/Rector/StmtsAwareInterface/WithConsecutiveRector/WithConsecutiveRectorTest.php index 097384c5..99289ca0 100644 --- a/rules-tests/PHPUnit100/Rector/StmtsAwareInterface/WithConsecutiveRector/WithConsecutiveRectorTest.php +++ b/rules-tests/PHPUnit100/Rector/StmtsAwareInterface/WithConsecutiveRector/WithConsecutiveRectorTest.php @@ -25,4 +25,9 @@ public function provideConfigFilePath(): string { return __DIR__ . '/config/configured_rule.php'; } + + protected function provideComposerJsonFilePath(): string + { + return __DIR__ . '/config/composer.json'; + } } diff --git a/rules-tests/PHPUnit100/Rector/StmtsAwareInterface/WithConsecutiveRector/config/composer.json b/rules-tests/PHPUnit100/Rector/StmtsAwareInterface/WithConsecutiveRector/config/composer.json new file mode 100644 index 00000000..dbb29f91 --- /dev/null +++ b/rules-tests/PHPUnit100/Rector/StmtsAwareInterface/WithConsecutiveRector/config/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "phpunit/phpunit": "^10.0" + } +} diff --git a/rules-tests/PHPUnit50/Rector/StaticCall/GetMockRector/GetMockRectorTest.php b/rules-tests/PHPUnit50/Rector/StaticCall/GetMockRector/GetMockRectorTest.php index b4d3ed7c..194d99ca 100644 --- a/rules-tests/PHPUnit50/Rector/StaticCall/GetMockRector/GetMockRectorTest.php +++ b/rules-tests/PHPUnit50/Rector/StaticCall/GetMockRector/GetMockRectorTest.php @@ -25,4 +25,9 @@ public function provideConfigFilePath(): string { return __DIR__ . '/config/configured_rule.php'; } + + protected function provideComposerJsonFilePath(): string + { + return __DIR__ . '/config/composer.json'; + } } diff --git a/rules-tests/PHPUnit50/Rector/StaticCall/GetMockRector/config/composer.json b/rules-tests/PHPUnit50/Rector/StaticCall/GetMockRector/config/composer.json new file mode 100644 index 00000000..544ace6a --- /dev/null +++ b/rules-tests/PHPUnit50/Rector/StaticCall/GetMockRector/config/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "phpunit/phpunit": "^5.4" + } +} diff --git a/rules-tests/PHPUnit60/Rector/ClassMethod/ExceptionAnnotationRector/ExceptionAnnotationRectorTest.php b/rules-tests/PHPUnit60/Rector/ClassMethod/ExceptionAnnotationRector/ExceptionAnnotationRectorTest.php index 91f0dc2e..0867a882 100644 --- a/rules-tests/PHPUnit60/Rector/ClassMethod/ExceptionAnnotationRector/ExceptionAnnotationRectorTest.php +++ b/rules-tests/PHPUnit60/Rector/ClassMethod/ExceptionAnnotationRector/ExceptionAnnotationRectorTest.php @@ -25,4 +25,9 @@ public function provideConfigFilePath(): string { return __DIR__ . '/config/configured_rule.php'; } + + protected function provideComposerJsonFilePath(): string + { + return __DIR__ . '/config/composer.json'; + } } diff --git a/rules-tests/PHPUnit60/Rector/ClassMethod/ExceptionAnnotationRector/config/composer.json b/rules-tests/PHPUnit60/Rector/ClassMethod/ExceptionAnnotationRector/config/composer.json new file mode 100644 index 00000000..5a39722d --- /dev/null +++ b/rules-tests/PHPUnit60/Rector/ClassMethod/ExceptionAnnotationRector/config/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "phpunit/phpunit": "^5.2" + } +} diff --git a/rules-tests/PHPUnit60/Rector/MethodCall/DelegateExceptionArgumentsRector/DelegateExceptionArgumentsRectorTest.php b/rules-tests/PHPUnit60/Rector/MethodCall/DelegateExceptionArgumentsRector/DelegateExceptionArgumentsRectorTest.php index 7291914e..e1c99a8e 100644 --- a/rules-tests/PHPUnit60/Rector/MethodCall/DelegateExceptionArgumentsRector/DelegateExceptionArgumentsRectorTest.php +++ b/rules-tests/PHPUnit60/Rector/MethodCall/DelegateExceptionArgumentsRector/DelegateExceptionArgumentsRectorTest.php @@ -25,4 +25,9 @@ public function provideConfigFilePath(): string { return __DIR__ . '/config/configured_rule.php'; } + + protected function provideComposerJsonFilePath(): string + { + return __DIR__ . '/config/composer.json'; + } } diff --git a/rules-tests/PHPUnit60/Rector/MethodCall/DelegateExceptionArgumentsRector/config/composer.json b/rules-tests/PHPUnit60/Rector/MethodCall/DelegateExceptionArgumentsRector/config/composer.json new file mode 100644 index 00000000..5a39722d --- /dev/null +++ b/rules-tests/PHPUnit60/Rector/MethodCall/DelegateExceptionArgumentsRector/config/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "phpunit/phpunit": "^5.2" + } +} diff --git a/rules-tests/PHPUnit80/Rector/MethodCall/AssertEqualsParameterToSpecificMethodsTypeRector/AssertEqualsParameterToSpecificMethodsTypeRectorTest.php b/rules-tests/PHPUnit80/Rector/MethodCall/AssertEqualsParameterToSpecificMethodsTypeRector/AssertEqualsParameterToSpecificMethodsTypeRectorTest.php index c9ea3ad0..41b74210 100644 --- a/rules-tests/PHPUnit80/Rector/MethodCall/AssertEqualsParameterToSpecificMethodsTypeRector/AssertEqualsParameterToSpecificMethodsTypeRectorTest.php +++ b/rules-tests/PHPUnit80/Rector/MethodCall/AssertEqualsParameterToSpecificMethodsTypeRector/AssertEqualsParameterToSpecificMethodsTypeRectorTest.php @@ -25,4 +25,9 @@ public function provideConfigFilePath(): string { return __DIR__ . '/config/configured_rule.php'; } + + protected function provideComposerJsonFilePath(): string + { + return __DIR__ . '/config/composer.json'; + } } diff --git a/rules-tests/PHPUnit80/Rector/MethodCall/AssertEqualsParameterToSpecificMethodsTypeRector/config/composer.json b/rules-tests/PHPUnit80/Rector/MethodCall/AssertEqualsParameterToSpecificMethodsTypeRector/config/composer.json new file mode 100644 index 00000000..c2728973 --- /dev/null +++ b/rules-tests/PHPUnit80/Rector/MethodCall/AssertEqualsParameterToSpecificMethodsTypeRector/config/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "phpunit/phpunit": "^7.5" + } +} diff --git a/rules-tests/PHPUnit80/Rector/MethodCall/SpecificAssertContainsRector/SpecificAssertContainsRectorTest.php b/rules-tests/PHPUnit80/Rector/MethodCall/SpecificAssertContainsRector/SpecificAssertContainsRectorTest.php index b2657f5e..13f8aece 100644 --- a/rules-tests/PHPUnit80/Rector/MethodCall/SpecificAssertContainsRector/SpecificAssertContainsRectorTest.php +++ b/rules-tests/PHPUnit80/Rector/MethodCall/SpecificAssertContainsRector/SpecificAssertContainsRectorTest.php @@ -25,4 +25,9 @@ public function provideConfigFilePath(): string { return __DIR__ . '/config/configured_rule.php'; } + + protected function provideComposerJsonFilePath(): string + { + return __DIR__ . '/config/composer.json'; + } } diff --git a/rules-tests/PHPUnit80/Rector/MethodCall/SpecificAssertContainsRector/config/composer.json b/rules-tests/PHPUnit80/Rector/MethodCall/SpecificAssertContainsRector/config/composer.json new file mode 100644 index 00000000..c2728973 --- /dev/null +++ b/rules-tests/PHPUnit80/Rector/MethodCall/SpecificAssertContainsRector/config/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "phpunit/phpunit": "^7.5" + } +} diff --git a/rules-tests/PHPUnit80/Rector/MethodCall/SpecificAssertInternalTypeRector/SpecificAssertInternalTypeRectorTest.php b/rules-tests/PHPUnit80/Rector/MethodCall/SpecificAssertInternalTypeRector/SpecificAssertInternalTypeRectorTest.php index af9bae91..0fb0a45b 100644 --- a/rules-tests/PHPUnit80/Rector/MethodCall/SpecificAssertInternalTypeRector/SpecificAssertInternalTypeRectorTest.php +++ b/rules-tests/PHPUnit80/Rector/MethodCall/SpecificAssertInternalTypeRector/SpecificAssertInternalTypeRectorTest.php @@ -25,4 +25,9 @@ public function provideConfigFilePath(): string { return __DIR__ . '/config/configured_rule.php'; } + + protected function provideComposerJsonFilePath(): string + { + return __DIR__ . '/config/composer.json'; + } } diff --git a/rules-tests/PHPUnit80/Rector/MethodCall/SpecificAssertInternalTypeRector/config/composer.json b/rules-tests/PHPUnit80/Rector/MethodCall/SpecificAssertInternalTypeRector/config/composer.json new file mode 100644 index 00000000..c2728973 --- /dev/null +++ b/rules-tests/PHPUnit80/Rector/MethodCall/SpecificAssertInternalTypeRector/config/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "phpunit/phpunit": "^7.5" + } +} diff --git a/rules-tests/PHPUnit90/Rector/MethodCall/SpecificAssertContainsWithoutIdentityRector/SpecificAssertContainsWithoutIdentityRectorTest.php b/rules-tests/PHPUnit90/Rector/MethodCall/SpecificAssertContainsWithoutIdentityRector/SpecificAssertContainsWithoutIdentityRectorTest.php index ba2071a0..5982018b 100644 --- a/rules-tests/PHPUnit90/Rector/MethodCall/SpecificAssertContainsWithoutIdentityRector/SpecificAssertContainsWithoutIdentityRectorTest.php +++ b/rules-tests/PHPUnit90/Rector/MethodCall/SpecificAssertContainsWithoutIdentityRector/SpecificAssertContainsWithoutIdentityRectorTest.php @@ -25,4 +25,9 @@ public function provideConfigFilePath(): string { return __DIR__ . '/config/configured_rule.php'; } + + protected function provideComposerJsonFilePath(): string + { + return __DIR__ . '/config/composer.json'; + } } diff --git a/rules-tests/PHPUnit90/Rector/MethodCall/SpecificAssertContainsWithoutIdentityRector/config/composer.json b/rules-tests/PHPUnit90/Rector/MethodCall/SpecificAssertContainsWithoutIdentityRector/config/composer.json new file mode 100644 index 00000000..fa6d328e --- /dev/null +++ b/rules-tests/PHPUnit90/Rector/MethodCall/SpecificAssertContainsWithoutIdentityRector/config/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "phpunit/phpunit": "^9.0" + } +} diff --git a/rules/PHPUnit100/Rector/StmtsAwareInterface/WithConsecutiveRector.php b/rules/PHPUnit100/Rector/StmtsAwareInterface/WithConsecutiveRector.php index d3164d3e..1c10047c 100644 --- a/rules/PHPUnit100/Rector/StmtsAwareInterface/WithConsecutiveRector.php +++ b/rules/PHPUnit100/Rector/StmtsAwareInterface/WithConsecutiveRector.php @@ -44,7 +44,7 @@ final class WithConsecutiveRector extends AbstractRector implements ComposerPack */ public function provideComposerPackageConstraint(): ComposerPackageConstraint { - return new ComposerPackageConstraint('phpunit/phpunit', '>=10.0'); + return new ComposerPackageConstraint('phpunit/phpunit', '>=10.0 <12.0'); } public function __construct( diff --git a/rules/PHPUnit50/Rector/StaticCall/GetMockRector.php b/rules/PHPUnit50/Rector/StaticCall/GetMockRector.php index 95cb2949..8dbc7178 100644 --- a/rules/PHPUnit50/Rector/StaticCall/GetMockRector.php +++ b/rules/PHPUnit50/Rector/StaticCall/GetMockRector.php @@ -30,7 +30,7 @@ final class GetMockRector extends AbstractRector implements ComposerPackageConst */ public function provideComposerPackageConstraint(): ComposerPackageConstraint { - return new ComposerPackageConstraint('phpunit/phpunit', '>=5.4'); + return new ComposerPackageConstraint('phpunit/phpunit', '>=5.4 <8.0'); } public function __construct( diff --git a/rules/PHPUnit60/Rector/ClassMethod/ExceptionAnnotationRector.php b/rules/PHPUnit60/Rector/ClassMethod/ExceptionAnnotationRector.php index 57d09943..261b84f1 100644 --- a/rules/PHPUnit60/Rector/ClassMethod/ExceptionAnnotationRector.php +++ b/rules/PHPUnit60/Rector/ClassMethod/ExceptionAnnotationRector.php @@ -31,7 +31,7 @@ final class ExceptionAnnotationRector extends AbstractRector implements Composer */ public function provideComposerPackageConstraint(): ComposerPackageConstraint { - return new ComposerPackageConstraint('phpunit/phpunit', '>=5.2'); + return new ComposerPackageConstraint('phpunit/phpunit', '>=5.2 <11.0'); } /** diff --git a/rules/PHPUnit60/Rector/MethodCall/DelegateExceptionArgumentsRector.php b/rules/PHPUnit60/Rector/MethodCall/DelegateExceptionArgumentsRector.php index 1865f015..ef12cccd 100644 --- a/rules/PHPUnit60/Rector/MethodCall/DelegateExceptionArgumentsRector.php +++ b/rules/PHPUnit60/Rector/MethodCall/DelegateExceptionArgumentsRector.php @@ -28,7 +28,7 @@ final class DelegateExceptionArgumentsRector extends AbstractRector implements C */ public function provideComposerPackageConstraint(): ComposerPackageConstraint { - return new ComposerPackageConstraint('phpunit/phpunit', '>=5.2'); + return new ComposerPackageConstraint('phpunit/phpunit', '>=5.2 <8.0'); } /** diff --git a/rules/PHPUnit80/Rector/MethodCall/AssertEqualsParameterToSpecificMethodsTypeRector.php b/rules/PHPUnit80/Rector/MethodCall/AssertEqualsParameterToSpecificMethodsTypeRector.php index 27c9e547..92b905e5 100644 --- a/rules/PHPUnit80/Rector/MethodCall/AssertEqualsParameterToSpecificMethodsTypeRector.php +++ b/rules/PHPUnit80/Rector/MethodCall/AssertEqualsParameterToSpecificMethodsTypeRector.php @@ -30,7 +30,7 @@ final class AssertEqualsParameterToSpecificMethodsTypeRector extends AbstractRec */ public function provideComposerPackageConstraint(): ComposerPackageConstraint { - return new ComposerPackageConstraint('phpunit/phpunit', '>=7.5'); + return new ComposerPackageConstraint('phpunit/phpunit', '>=7.5 <11.0'); } public function __construct( diff --git a/rules/PHPUnit80/Rector/MethodCall/SpecificAssertContainsRector.php b/rules/PHPUnit80/Rector/MethodCall/SpecificAssertContainsRector.php index a1ddc2c2..a9e0e083 100644 --- a/rules/PHPUnit80/Rector/MethodCall/SpecificAssertContainsRector.php +++ b/rules/PHPUnit80/Rector/MethodCall/SpecificAssertContainsRector.php @@ -29,7 +29,7 @@ final class SpecificAssertContainsRector extends AbstractRector implements Compo */ public function provideComposerPackageConstraint(): ComposerPackageConstraint { - return new ComposerPackageConstraint('phpunit/phpunit', '>=7.5'); + return new ComposerPackageConstraint('phpunit/phpunit', '>=7.5 <11.0'); } /** diff --git a/rules/PHPUnit80/Rector/MethodCall/SpecificAssertInternalTypeRector.php b/rules/PHPUnit80/Rector/MethodCall/SpecificAssertInternalTypeRector.php index 9acd8b49..90843534 100644 --- a/rules/PHPUnit80/Rector/MethodCall/SpecificAssertInternalTypeRector.php +++ b/rules/PHPUnit80/Rector/MethodCall/SpecificAssertInternalTypeRector.php @@ -29,7 +29,7 @@ final class SpecificAssertInternalTypeRector extends AbstractRector implements C */ public function provideComposerPackageConstraint(): ComposerPackageConstraint { - return new ComposerPackageConstraint('phpunit/phpunit', '>=7.5'); + return new ComposerPackageConstraint('phpunit/phpunit', '>=7.5 <11.0'); } /** diff --git a/rules/PHPUnit90/Rector/MethodCall/SpecificAssertContainsWithoutIdentityRector.php b/rules/PHPUnit90/Rector/MethodCall/SpecificAssertContainsWithoutIdentityRector.php index 9f2f7544..0d878c4f 100644 --- a/rules/PHPUnit90/Rector/MethodCall/SpecificAssertContainsWithoutIdentityRector.php +++ b/rules/PHPUnit90/Rector/MethodCall/SpecificAssertContainsWithoutIdentityRector.php @@ -28,7 +28,7 @@ final class SpecificAssertContainsWithoutIdentityRector extends AbstractRector i */ public function provideComposerPackageConstraint(): ComposerPackageConstraint { - return new ComposerPackageConstraint('phpunit/phpunit', '>=9.0'); + return new ComposerPackageConstraint('phpunit/phpunit', '>=9.0 <11.0'); } /**