Skip to content

Commit 4a04b40

Browse files
lookymanondrejmirtes
authored andcommitted
Replaced some requirements with conflicts
1 parent b308ad4 commit 4a04b40

7 files changed

+11
-8
lines changed

composer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"require": {
1313
"php": "~7.1",
1414
"phpstan/phpstan": "^0.10",
15-
"phpunit/phpunit": "^7.0",
1615
"nikic/php-parser": "^4.0"
1716
},
1817
"require-dev": {
@@ -22,7 +21,11 @@
2221
"phing/phing": "^2.16.0",
2322
"phpstan/phpstan-strict-rules": "^0.10",
2423
"satooshi/php-coveralls": "^1.0",
25-
"slevomat/coding-standard": "^4.5.2"
24+
"slevomat/coding-standard": "^4.5.2",
25+
"phpunit/phpunit": "^7.0"
26+
},
27+
"conflict": {
28+
"phpunit/phpunit": "<7.0"
2629
},
2730
"autoload": {
2831
"psr-4": {

src/Rules/PHPUnit/AssertRuleHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class AssertRuleHelper
1111

1212
public static function isMethodOrStaticCallOnTestCase(Node $node, Scope $scope): bool
1313
{
14-
$testCaseType = new ObjectType(\PHPUnit\Framework\TestCase::class);
14+
$testCaseType = new ObjectType('PHPUnit\Framework\TestCase');
1515
if ($node instanceof Node\Expr\MethodCall) {
1616
$calledOnType = $scope->getType($node->var);
1717
} elseif ($node instanceof Node\Expr\StaticCall) {

src/Type/PHPUnit/Assert/AssertMethodTypeSpecifyingExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function setTypeSpecifier(TypeSpecifier $typeSpecifier): void
2424

2525
public function getClass(): string
2626
{
27-
return \PHPUnit\Framework\TestCase::class;
27+
return 'PHPUnit\Framework\TestCase';
2828
}
2929

3030
public function isMethodSupported(

src/Type/PHPUnit/Assert/AssertStaticMethodTypeSpecifyingExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function setTypeSpecifier(TypeSpecifier $typeSpecifier): void
2424

2525
public function getClass(): string
2626
{
27-
return \PHPUnit\Framework\Assert::class;
27+
return 'PHPUnit\Framework\Assert';
2828
}
2929

3030
public function isStaticMethodSupported(

src/Type/PHPUnit/CreateMockDynamicReturnTypeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class CreateMockDynamicReturnTypeExtension implements \PHPStan\Type\DynamicMetho
2626

2727
public function getClass(): string
2828
{
29-
return \PHPUnit\Framework\TestCase::class;
29+
return 'PHPUnit\Framework\TestCase';
3030
}
3131

3232
public function isMethodSupported(MethodReflection $methodReflection): bool

src/Type/PHPUnit/GetMockBuilderDynamicReturnTypeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class GetMockBuilderDynamicReturnTypeExtension implements \PHPStan\Type\DynamicM
1515

1616
public function getClass(): string
1717
{
18-
return \PHPUnit\Framework\TestCase::class;
18+
return 'PHPUnit\Framework\TestCase';
1919
}
2020

2121
public function isMethodSupported(MethodReflection $methodReflection): bool

src/Type/PHPUnit/MockBuilderDynamicReturnTypeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function setBroker(Broker $broker): void
2525

2626
public function getClass(): string
2727
{
28-
$testCase = $this->broker->getClass(\PHPUnit\Framework\TestCase::class);
28+
$testCase = $this->broker->getClass('PHPUnit\Framework\TestCase');
2929
$mockBuilderType = ParametersAcceptorSelector::selectSingle(
3030
$testCase->getNativeMethod('getMockBuilder')->getVariants()
3131
)->getReturnType();

0 commit comments

Comments
 (0)