Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": "^5.4.0",
"ocramius/package-versions": "^2.9",
"ondram/ci-detector": "^4.2",
"phpstan/phpdoc-parser": "^2.0",
"phpstan/phpdoc-parser": "^2.0.2",
"phpstan/phpstan": "^2.1.3",
"react/event-loop": "^1.5",
"react/promise": "^3.2",
Expand Down
1 change: 1 addition & 0 deletions preload-split-package.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@
require_once __DIR__ . '/../../../vendor/phpstan/phpdoc-parser/src/Ast/Node.php';
require_once __DIR__ . '/../../../vendor/phpstan/phpdoc-parser/src/Ast/NodeVisitor.php';
require_once __DIR__ . '/../../../vendor/phpstan/phpdoc-parser/src/Lexer/Lexer.php';
require_once __DIR__ . '/../../../vendor/phpstan/phpdoc-parser/src/Ast/Comment.php';
require_once __DIR__ . '/../../../vendor/phpstan/phpdoc-parser/src/Ast/NodeAttributes.php';
require_once __DIR__ . '/../../../vendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprNode.php';
require_once __DIR__ . '/../../../vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocTagValueNode.php';
Expand Down
1 change: 1 addition & 0 deletions preload.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Node.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/NodeVisitor.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Lexer/Lexer.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Comment.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/NodeAttributes.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocTagValueNode.php';
Expand Down
19 changes: 2 additions & 17 deletions src/DependencyInjection/LazyContainerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
use PHPStan\Analyser\ScopeFactory;
use PHPStan\Parser\Parser;
use PHPStan\PhpDoc\TypeNodeResolver;
use PHPStan\PhpDocParser\Parser\ConstExprParser;
use PHPStan\PhpDocParser\Parser\TypeParser;
use PHPStan\PhpDocParser\ParserConfig;
use PHPStan\Reflection\ReflectionProvider;
use Rector\Application\ChangedNodeScopeRefresher;
Expand Down Expand Up @@ -423,21 +421,6 @@ public function create(): RectorConfig
$rectorConfig->singleton(FileProcessor::class);
$rectorConfig->singleton(PostFileProcessor::class);

// phpdoc-parser
$rectorConfig->when(TypeParser::class)
->needs('$usedAttributes')
->give([
'lines' => true,
'indexes' => true,
]);

$rectorConfig->when(ConstExprParser::class)
->needs('$usedAttributes')
->give([
'lines' => true,
'indexes' => true,
]);

$rectorConfig->when(RectorNodeTraverser::class)
->needs('$rectors')
->giveTagged(RectorInterface::class);
Expand Down Expand Up @@ -682,11 +665,13 @@ static function (
->needs('$phpDocNodeVisitors')
->giveTagged(BasePhpDocNodeVisitorInterface::class);

// phpdoc-parser
$rectorConfig->singleton(
ParserConfig::class,
static fn (Container $container): ParserConfig => new ParserConfig([
'lines' => true,
'indexes' => true,
'comments' => true,
])
);

Expand Down