Skip to content

Commit

Permalink
[PHPStan] Set compatible with upcoming PHPStan 1.6.x with set NodeCon…
Browse files Browse the repository at this point in the history
…nectingVisitor tags (#2014)

* [PHPStan] Set compatible with upcoming PHPStan 1.6.x with set NodeConnectingVisitor tags

* update phpstan 1.6.x-dev and conditional tags

* try require phpstan/phpstan:1.6.x-dev in packages_tests workflow

* remove ->tag call as register in PHPStan conditionalTags

* clean up tweak packages-tests
  • Loading branch information
samsonasik authored Apr 15, 2022
1 parent c7e4530 commit 91b8573
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/target-repository/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
"require": {
"php": "^7.2|^8.0",
"phpstan/phpstan": "^1.5.5"
"phpstan/phpstan": "^1.5.6"
},
"autoload": {
"files": [
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"nikic/php-parser": "^4.13.2",
"ondram/ci-detector": "^4.1",
"phpstan/phpdoc-parser": "^1.4.4",
"phpstan/phpstan": "^1.5.5",
"phpstan/phpstan": "^1.5.6",
"phpstan/phpstan-phpunit": "^1.0",
"psr/log": "^2.0",
"react/child-process": "^0.6.4",
Expand Down
4 changes: 4 additions & 0 deletions config/phpstan/static-reflection.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ parameters:
featureToggles:
disableRuntimeReflectionProvider: false

conditionalTags:
PhpParser\NodeVisitor\NodeConnectingVisitor:
phpstan.parser.richParserNodeVisitor: true

This comment has been minimized.

Copy link
@TomasVotruba

TomasVotruba Apr 18, 2022

Member

This is failing with Rector as a dependency:

image

It should be probably nested under parameters. I'll check

This comment has been minimized.

Copy link
@samsonasik

samsonasik Apr 18, 2022

Author Member

that's when PHPStan is < 1.5.6, the conditionalTags is supported since PHPStan 1.5.6, so first is update both phpstan to 1.5.6 first. that's why the requirement is updated to PHPStan ^1.5.6.

I tried using rector as dependency and it is working ok, its is ok e2e as well for global install https://github.com/rectorphp/rector/runs/6062419222?check_suite_focus=true

This comment has been minimized.

Copy link
@TomasVotruba

TomasVotruba Apr 18, 2022

Member

I see. So the 0.12.21 release is ok?

This comment has been minimized.

Copy link
@samsonasik

samsonasik Apr 18, 2022

Author Member
services:
- Rector\NodeTypeResolver\Reflection\BetterReflection\RectorBetterReflectionSourceLocatorFactory
- Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocator\IntermediateSourceLocator
Expand Down

0 comments on commit 91b8573

Please sign in to comment.