Skip to content

Commit b26ac80

Browse files
committed
Test dev phpdoc/parser
1 parent 0b5253d commit b26ac80

File tree

5 files changed

+19
-20
lines changed

5 files changed

+19
-20
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"ondram/ci-detector": "^3.4.0",
2626
"ondrejmirtes/better-reflection": "5.3.0.16",
2727
"phpstan/php-8-stubs": "0.3.14",
28-
"phpstan/phpdoc-parser": "1.5.1",
28+
"phpstan/phpdoc-parser": "1.6.x-dev",
2929
"react/child-process": "^0.6.4",
3030
"react/event-loop": "^1.2",
3131
"react/http": "^1.1",

composer.lock

Lines changed: 10 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

conf/bleedingEdge.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ parameters:
1414
consistentConstructor: true
1515
checkUnresolvableParameterTypes: true
1616
readOnlyByPhpDoc: true
17+
phpDocParserRequireWhitespaceBeforeDescription: true

conf/config.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ parameters:
3939
consistentConstructor: false
4040
checkUnresolvableParameterTypes: false
4141
readOnlyByPhpDoc: false
42+
phpDocParserRequireWhitespaceBeforeDescription: false
4243
fileExtensions:
4344
- php
4445
checkAdvancedIsset: false
@@ -239,6 +240,7 @@ parametersSchema:
239240
consistentConstructor: bool()
240241
checkUnresolvableParameterTypes: bool()
241242
readOnlyByPhpDoc: bool()
243+
phpDocParserRequireWhitespaceBeforeDescription: bool()
242244
])
243245
fileExtensions: listOf(string())
244246
checkAdvancedIsset: bool()
@@ -453,6 +455,8 @@ services:
453455

454456
-
455457
class: PHPStan\PhpDocParser\Parser\PhpDocParser
458+
arguments:
459+
requireWhitespaceBeforeDescription: %featureToggles.phpDocParserRequireWhitespaceBeforeDescription%
456460

457461
-
458462
class: PHPStan\PhpDoc\PhpDocInheritanceResolver

tests/PHPStan/Rules/PhpDoc/InvalidPhpDocTagValueRuleTest.php

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,6 @@ public function testRule(): void
2828
'PHPDoc tag @param has invalid value (): Unexpected token "\n * ", expected type at offset 13',
2929
25,
3030
],
31-
[
32-
'PHPDoc tag @param has invalid value ($invalid): Unexpected token "$invalid", expected type at offset 24',
33-
25,
34-
],
35-
[
36-
'PHPDoc tag @param has invalid value ($invalid Foo): Unexpected token "$invalid", expected type at offset 43',
37-
25,
38-
],
3931
[
4032
'PHPDoc tag @param has invalid value (A & B | C $paramNameA): Unexpected token "|", expected variable at offset 72',
4133
25,
@@ -76,10 +68,10 @@ public function testRule(): void
7668
'PHPDoc tag @var has invalid value (\\\Foo|\Bar $test): Unexpected token "\\\\\\\Foo|\\\Bar", expected type at offset 9',
7769
29,
7870
],
79-
/*[
80-
'PHPDoc tag @var has invalid value ...',
71+
[
72+
'PHPDoc tag @var has invalid value (callable(int)): Unexpected token "(", expected TOKEN_HORIZONTAL_WS at offset 17',
8173
59,
82-
],*/
74+
],
8375
[
8476
'PHPDoc tag @var has invalid value ((Foo|Bar): Unexpected token "*/", expected \')\' at offset 18',
8577
62,

0 commit comments

Comments
 (0)