Skip to content

Commit 97cde39

Browse files
committed
Open 0.12-dev
1 parent f57366a commit 97cde39

File tree

7 files changed

+18
-19
lines changed

7 files changed

+18
-19
lines changed

.travis.yml

-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,3 @@ before_script:
1212
- if [ "$dependencies" = "highest" ]; then composer update --no-interaction; fi;
1313
script:
1414
- vendor/bin/phing
15-
- >
16-
wget https://github.com/maglnet/ComposerRequireChecker/releases/download/0.2.1/composer-require-checker.phar
17-
&& php composer-require-checker.phar check composer.json

build.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
>
8787
<arg value="analyse"/>
8888
<arg value="-l"/>
89-
<arg value="7"/>
89+
<arg value="8"/>
9090
<arg value="-c"/>
9191
<arg path="phpstan.neon"/>
9292
<arg path="src"/>

composer.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"prefer-stable": true,
88
"extra": {
99
"branch-alias": {
10-
"dev-master": "0.11-dev"
10+
"dev-master": "0.12-dev"
1111
},
1212
"phpstan": {
1313
"includes": [
@@ -17,16 +17,16 @@
1717
},
1818
"require": {
1919
"php": "~7.1",
20-
"phpstan/phpstan": "^0.11.6",
21-
"nikic/php-parser": "^4.0"
20+
"phpstan/phpstan": "^0.12",
21+
"nikic/php-parser": "^4.3"
2222
},
2323
"require-dev": {
2424
"consistence/coding-standard": "^3.7",
2525
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.4",
2626
"jakub-onderka/php-parallel-lint": "^1.0",
2727
"phing/phing": "^2.16.0",
28-
"phpstan/phpstan-strict-rules": "^0.11",
29-
"phpstan/phpstan-phpunit": "^0.11",
28+
"phpstan/phpstan-strict-rules": "^0.12",
29+
"phpstan/phpstan-phpunit": "^0.12",
3030
"phpunit/phpunit": "^7.1.3",
3131
"slevomat/coding-standard": "^4.5.2",
3232
"webmozart/assert": "^1.3.0"

phpcs.xml

+3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@
2323
@dataProvider,
2424
@requires
2525
"/>
26+
<property name="enableObjectTypeHint" value="false"/>
2627
</properties>
28+
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableParameterTypeHintSpecification"/>
29+
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableReturnTypeHintSpecification"/>
2730
</rule>
2831
<rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition"/>
2932
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowEqualOperators"/>

phpstan.neon

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,4 @@ includes:
77

88
parameters:
99
excludes_analyse:
10-
- */tests/*/data/*
11-
ignoreErrors:
12-
- '~^Parameter \#1 \$node \(.*\) of method .*Rule::processNode\(\) should be contravariant with parameter \$node \(PhpParser\\Node\) of method PHPStan\\Rules\\Rule::processNode\(\)$~'
10+
- tests/*/data/*

tests/Type/WebMozartAssert/AssertTypeSpecifyingExtensionTest.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
use PHPStan\Rules\Rule;
66

7+
/**
8+
* @extends \PHPStan\Testing\RuleTestCase<VariableTypeReportingRule>
9+
*/
710
class AssertTypeSpecifyingExtensionTest extends \PHPStan\Testing\RuleTestCase
811
{
912

@@ -138,11 +141,11 @@ public function testExtension(): void
138141
107,
139142
],
140143
[
141-
'Variable $aa is: PHPStan\Type\WebMozartAssert\Foo|string',
144+
'Variable $aa is: class-string<PHPStan\Type\WebMozartAssert\Foo>|PHPStan\Type\WebMozartAssert\Foo',
142145
110,
143146
],
144147
[
145-
'Variable $ab is: array<PHPStan\Type\WebMozartAssert\Foo>',
148+
'Variable $ab is: array', // should array<PHPStan\Type\WebMozartAssert\Foo>
146149
113,
147150
],
148151
[

tests/Type/WebMozartAssert/VariableTypeReportingRule.php

+3-5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
use PhpParser\Node;
66
use PHPStan\Analyser\Scope;
77

8+
/**
9+
* @implements \PHPStan\Rules\Rule<Node\Expr\Variable>
10+
*/
811
class VariableTypeReportingRule implements \PHPStan\Rules\Rule
912
{
1013

@@ -13,11 +16,6 @@ public function getNodeType(): string
1316
return Node\Expr\Variable::class;
1417
}
1518

16-
/**
17-
* @param \PhpParser\Node\Expr\Variable $node
18-
* @param \PHPStan\Analyser\Scope $scope
19-
* @return string[] errors
20-
*/
2119
public function processNode(Node $node, Scope $scope): array
2220
{
2321
if (!is_string($node->name)) {

0 commit comments

Comments
 (0)