Skip to content

Commit

Permalink
Update phpdoc-parser to 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jun 9, 2022
1 parent 0b5253d commit ef8c7c3
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 19 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -25,7 +25,7 @@
"ondram/ci-detector": "^3.4.0",
"ondrejmirtes/better-reflection": "5.3.0.16",
"phpstan/php-8-stubs": "0.3.14",
"phpstan/phpdoc-parser": "1.5.1",
"phpstan/phpdoc-parser": "1.6.0",
"react/child-process": "^0.6.4",
"react/event-loop": "^1.2",
"react/http": "^1.1",
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions conf/bleedingEdge.neon
Expand Up @@ -14,3 +14,4 @@ parameters:
consistentConstructor: true
checkUnresolvableParameterTypes: true
readOnlyByPhpDoc: true
phpDocParserRequireWhitespaceBeforeDescription: true
4 changes: 4 additions & 0 deletions conf/config.neon
Expand Up @@ -39,6 +39,7 @@ parameters:
consistentConstructor: false
checkUnresolvableParameterTypes: false
readOnlyByPhpDoc: false
phpDocParserRequireWhitespaceBeforeDescription: false
fileExtensions:
- php
checkAdvancedIsset: false
Expand Down Expand Up @@ -239,6 +240,7 @@ parametersSchema:
consistentConstructor: bool()
checkUnresolvableParameterTypes: bool()
readOnlyByPhpDoc: bool()
phpDocParserRequireWhitespaceBeforeDescription: bool()
])
fileExtensions: listOf(string())
checkAdvancedIsset: bool()
Expand Down Expand Up @@ -453,6 +455,8 @@ services:

-
class: PHPStan\PhpDocParser\Parser\PhpDocParser
arguments:
requireWhitespaceBeforeDescription: %featureToggles.phpDocParserRequireWhitespaceBeforeDescription%

-
class: PHPStan\PhpDoc\PhpDocInheritanceResolver
Expand Down
14 changes: 3 additions & 11 deletions tests/PHPStan/Rules/PhpDoc/InvalidPhpDocTagValueRuleTest.php
Expand Up @@ -28,14 +28,6 @@ public function testRule(): void
'PHPDoc tag @param has invalid value (): Unexpected token "\n * ", expected type at offset 13',
25,
],
[
'PHPDoc tag @param has invalid value ($invalid): Unexpected token "$invalid", expected type at offset 24',
25,
],
[
'PHPDoc tag @param has invalid value ($invalid Foo): Unexpected token "$invalid", expected type at offset 43',
25,
],
[
'PHPDoc tag @param has invalid value (A & B | C $paramNameA): Unexpected token "|", expected variable at offset 72',
25,
Expand Down Expand Up @@ -76,10 +68,10 @@ public function testRule(): void
'PHPDoc tag @var has invalid value (\\\Foo|\Bar $test): Unexpected token "\\\\\\\Foo|\\\Bar", expected type at offset 9',
29,
],
/*[
'PHPDoc tag @var has invalid value ...',
[
'PHPDoc tag @var has invalid value (callable(int)): Unexpected token "(", expected TOKEN_HORIZONTAL_WS at offset 17',
59,
],*/
],
[
'PHPDoc tag @var has invalid value ((Foo|Bar): Unexpected token "*/", expected \')\' at offset 18',
62,
Expand Down

0 comments on commit ef8c7c3

Please sign in to comment.