Skip to content

Commit e0e88ed

Browse files
authored
Bump phpdoc-parser 2.0.2 and regenerate preload.php (#6744)
* Bump phpdoc-parser 2.0.2 and regenerate preload.php * upgrade config
1 parent d4af0ff commit e0e88ed

File tree

4 files changed

+5
-18
lines changed

4 files changed

+5
-18
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"nikic/php-parser": "^5.4.0",
2424
"ocramius/package-versions": "^2.9",
2525
"ondram/ci-detector": "^4.2",
26-
"phpstan/phpdoc-parser": "^2.0",
26+
"phpstan/phpdoc-parser": "^2.0.2",
2727
"phpstan/phpstan": "^2.1.3",
2828
"react/event-loop": "^1.5",
2929
"react/promise": "^3.2",

preload-split-package.php

+1
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@
264264
require_once __DIR__ . '/../../../vendor/phpstan/phpdoc-parser/src/Ast/Node.php';
265265
require_once __DIR__ . '/../../../vendor/phpstan/phpdoc-parser/src/Ast/NodeVisitor.php';
266266
require_once __DIR__ . '/../../../vendor/phpstan/phpdoc-parser/src/Lexer/Lexer.php';
267+
require_once __DIR__ . '/../../../vendor/phpstan/phpdoc-parser/src/Ast/Comment.php';
267268
require_once __DIR__ . '/../../../vendor/phpstan/phpdoc-parser/src/Ast/NodeAttributes.php';
268269
require_once __DIR__ . '/../../../vendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprNode.php';
269270
require_once __DIR__ . '/../../../vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocTagValueNode.php';

preload.php

+1
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@
264264
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Node.php';
265265
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/NodeVisitor.php';
266266
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Lexer/Lexer.php';
267+
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Comment.php';
267268
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/NodeAttributes.php';
268269
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprNode.php';
269270
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocTagValueNode.php';

src/DependencyInjection/LazyContainerFactory.php

+2-17
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
use PHPStan\Analyser\ScopeFactory;
1313
use PHPStan\Parser\Parser;
1414
use PHPStan\PhpDoc\TypeNodeResolver;
15-
use PHPStan\PhpDocParser\Parser\ConstExprParser;
16-
use PHPStan\PhpDocParser\Parser\TypeParser;
1715
use PHPStan\PhpDocParser\ParserConfig;
1816
use PHPStan\Reflection\ReflectionProvider;
1917
use Rector\Application\ChangedNodeScopeRefresher;
@@ -423,21 +421,6 @@ public function create(): RectorConfig
423421
$rectorConfig->singleton(FileProcessor::class);
424422
$rectorConfig->singleton(PostFileProcessor::class);
425423

426-
// phpdoc-parser
427-
$rectorConfig->when(TypeParser::class)
428-
->needs('$usedAttributes')
429-
->give([
430-
'lines' => true,
431-
'indexes' => true,
432-
]);
433-
434-
$rectorConfig->when(ConstExprParser::class)
435-
->needs('$usedAttributes')
436-
->give([
437-
'lines' => true,
438-
'indexes' => true,
439-
]);
440-
441424
$rectorConfig->when(RectorNodeTraverser::class)
442425
->needs('$rectors')
443426
->giveTagged(RectorInterface::class);
@@ -682,11 +665,13 @@ static function (
682665
->needs('$phpDocNodeVisitors')
683666
->giveTagged(BasePhpDocNodeVisitorInterface::class);
684667

668+
// phpdoc-parser
685669
$rectorConfig->singleton(
686670
ParserConfig::class,
687671
static fn (Container $container): ParserConfig => new ParserConfig([
688672
'lines' => true,
689673
'indexes' => true,
674+
'comments' => true,
690675
])
691676
);
692677

0 commit comments

Comments
 (0)