diff --git a/composer.json b/composer.json index f08db62..d9962b9 100644 --- a/composer.json +++ b/composer.json @@ -12,10 +12,10 @@ "require": { "php": "^7.1 || ^8.0", "phpstan/phpstan": "^1.0", - "thecodingmachine/safe": "^1.0" + "thecodingmachine/safe": "^1.0 || ^2.0" }, "require-dev": { - "phpunit/phpunit": "^7.5.2", + "phpunit/phpunit": "^7.5.2 || ^8.0", "php-coveralls/php-coveralls": "^2.1", "squizlabs/php_codesniffer": "^3.4" }, diff --git a/tests/Rules/CallMethodRuleTest.php b/tests/Rules/CallMethodRuleTest.php index 1836b31..4b8e362 100644 --- a/tests/Rules/CallMethodRuleTest.php +++ b/tests/Rules/CallMethodRuleTest.php @@ -5,6 +5,7 @@ use PHPStan\Php\PhpVersion; use PHPStan\Rules\FunctionCallParametersCheck; use PHPStan\Rules\Methods\CallMethodsRule; +use PHPStan\Rules\Methods\MethodCallCheck; use PHPStan\Rules\NullsafeCheck; use PHPStan\Rules\PhpDoc\UnresolvableTypeHelper; use PHPStan\Rules\Rule; @@ -16,14 +17,11 @@ class CallMethodRuleTest extends RuleTestCase { protected function getRule(): Rule { - $broker = $this->createBroker(); - $ruleLevelHelper = new RuleLevelHelper($broker, true, true, true, false); + $reflectionProvider = $this->createReflectionProvider(); + $ruleLevelHelper = new RuleLevelHelper($reflectionProvider, true, true, true, false); return new CallMethodsRule( - $broker, - new FunctionCallParametersCheck($ruleLevelHelper, new NullsafeCheck(), new PhpVersion(PHP_VERSION_ID), new UnresolvableTypeHelper(), true, false, false, false), - $ruleLevelHelper, - true, - true + new MethodCallCheck($reflectionProvider, $ruleLevelHelper, true, true), + new FunctionCallParametersCheck($ruleLevelHelper, new NullsafeCheck(), new PhpVersion(PHP_VERSION_ID), new UnresolvableTypeHelper(), true, false, false, false) ); }