Skip to content

Commit

Permalink
Merge pull request #26 from staabm/patch-1
Browse files Browse the repository at this point in the history
support phpstan 1.0; drop support for phpstan < 1.0
  • Loading branch information
moufmouf authored Nov 17, 2021
2 parents 1a1ae26 + 1ef7f7f commit 71bd8c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"require": {
"php": "^7.1 || ^8.0",
"phpstan/phpstan": "^0.10 | ^0.11 | ^0.12",
"phpstan/phpstan": "^1.0",
"thecodingmachine/safe": "^1.0"
},
"require-dev": {
Expand All @@ -36,7 +36,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
"dev-master": "1.1-dev"
},
"phpstan": {
"includes": [
Expand Down
7 changes: 5 additions & 2 deletions tests/Rules/CallMethodRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

namespace TheCodingMachine\Safe\PHPStan\Rules;

use PHPStan\Php\PhpVersion;
use PHPStan\Rules\FunctionCallParametersCheck;
use PHPStan\Rules\Methods\CallMethodsRule;
use PHPStan\Rules\NullsafeCheck;
use PHPStan\Rules\PhpDoc\UnresolvableTypeHelper;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Testing\RuleTestCase;
Expand All @@ -14,10 +17,10 @@ class CallMethodRuleTest extends RuleTestCase
protected function getRule(): Rule
{
$broker = $this->createBroker();
$ruleLevelHelper = new RuleLevelHelper($broker, true, true, true);
$ruleLevelHelper = new RuleLevelHelper($broker, true, true, true, false);
return new CallMethodsRule(
$broker,
new FunctionCallParametersCheck($ruleLevelHelper, true, true, true, true),
new FunctionCallParametersCheck($ruleLevelHelper, new NullsafeCheck(), new PhpVersion(PHP_VERSION_ID), new UnresolvableTypeHelper(), true, false, false, false),
$ruleLevelHelper,
true,
true
Expand Down

0 comments on commit 71bd8c1

Please sign in to comment.