Skip to content

Commit a36871b

Browse files
committed
Fix support for Slev V8.16
1 parent 89f58c2 commit a36871b

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

PhpCollective/Sniffs/Commenting/DisallowShorthandNullableTypeHintSniff.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ protected function fixInvalidTagValueNode(InvalidTagValueNode $invalidNode): ?Ph
140140
false,
141141
$rest,
142142
'',
143+
false,
143144
);
144145
}
145146

PhpCollective/Traits/CommentingTrait.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
use PHPStan\PhpDocParser\Parser\PhpDocParser;
2323
use PHPStan\PhpDocParser\Parser\TokenIterator;
2424
use PHPStan\PhpDocParser\Parser\TypeParser;
25+
use PHPStan\PhpDocParser\ParserConfig;
2526

2627
/**
2728
* Common functionality around commenting.
@@ -38,13 +39,15 @@ protected static function getValueNode(string $tagName, string $tagComment): Php
3839
{
3940
static $phpDocParser;
4041
if (!$phpDocParser) {
41-
$constExprParser = new ConstExprParser();
42-
$phpDocParser = new PhpDocParser(new TypeParser($constExprParser), $constExprParser);
42+
$config = new ParserConfig(usedAttributes: []);
43+
$constExprParser = new ConstExprParser($config);
44+
$phpDocParser = new PhpDocParser($config, new TypeParser($config, $constExprParser), $constExprParser);
4345
}
4446

4547
static $phpDocLexer;
4648
if (!$phpDocLexer) {
47-
$phpDocLexer = new Lexer();
49+
$config = new ParserConfig(usedAttributes: []);
50+
$phpDocLexer = new Lexer($config);
4851
}
4952

5053
return $phpDocParser->parseTagValue(new TokenIterator($phpDocLexer->tokenize($tagComment)), $tagName);

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
],
2424
"require": {
2525
"php": ">=8.1",
26-
"slevomat/coding-standard": "^8.14.1",
26+
"slevomat/coding-standard": "^8.16.0",
2727
"squizlabs/php_codesniffer": "^3.8.0"
2828
},
2929
"require-dev": {

0 commit comments

Comments
 (0)