diff --git a/build/build-preload.php b/build/build-preload.php index c7c62f96787..e35185370f8 100755 --- a/build/build-preload.php +++ b/build/build-preload.php @@ -355,12 +355,7 @@ private function findPhpParserFilesAndSortThem(string $vendorDir): array } } - $fileInfos = array_values($fileInfos); - - $stmtsAwareInterface = new SplFileInfo(__DIR__ . '/../src/Contract/PhpParser/Node/StmtsAwareInterface.php'); - array_splice($fileInfos, 1, 0, [$stmtsAwareInterface]); - - return $fileInfos; + return array_values($fileInfos); } /** diff --git a/composer.json b/composer.json index 32935ef8124..14f0f766db6 100644 --- a/composer.json +++ b/composer.json @@ -121,23 +121,6 @@ "patches": { "illuminate/container": [ "https://raw.githubusercontent.com/rectorphp/vendor-patches/main/patches/illuminate-container-container-php.patch" - ], - "nikic/php-parser": [ - "https://raw.githubusercontent.com/rectorphp/vendor-patches/main/patches/nikic-php-parser-lib-phpparser-node-expr-closure-php.patch", - "https://raw.githubusercontent.com/rectorphp/vendor-patches/main/patches/nikic-php-parser-lib-phpparser-node-stmt-finally-php.patch", - "https://raw.githubusercontent.com/rectorphp/vendor-patches/main/patches/nikic-php-parser-lib-phpparser-node-stmt-function-php.patch", - "https://raw.githubusercontent.com/rectorphp/vendor-patches/main/patches/nikic-php-parser-lib-phpparser-node-stmt-do-php.patch", - "https://raw.githubusercontent.com/rectorphp/vendor-patches/main/patches/nikic-php-parser-lib-phpparser-node-stmt-catch-php.patch", - "https://raw.githubusercontent.com/rectorphp/vendor-patches/main/patches/nikic-php-parser-lib-phpparser-node-stmt-trycatch-php.patch", - "https://raw.githubusercontent.com/rectorphp/vendor-patches/main/patches/nikic-php-parser-lib-phpparser-node-stmt-for-php.patch", - "https://raw.githubusercontent.com/rectorphp/vendor-patches/main/patches/nikic-php-parser-lib-phpparser-node-stmt-classmethod-php.patch", - "https://raw.githubusercontent.com/rectorphp/vendor-patches/main/patches/nikic-php-parser-lib-phpparser-node-stmt-else-php.patch", - "https://raw.githubusercontent.com/rectorphp/vendor-patches/main/patches/nikic-php-parser-lib-phpparser-node-stmt-while-php.patch", - "https://raw.githubusercontent.com/rectorphp/vendor-patches/main/patches/nikic-php-parser-lib-phpparser-node-stmt-foreach-php.patch", - "https://raw.githubusercontent.com/rectorphp/vendor-patches/main/patches/nikic-php-parser-lib-phpparser-node-stmt-if-php.patch", - "https://raw.githubusercontent.com/rectorphp/vendor-patches/main/patches/nikic-php-parser-lib-phpparser-node-stmt-case-php.patch", - "https://raw.githubusercontent.com/rectorphp/vendor-patches/main/patches/nikic-php-parser-lib-phpparser-node-stmt-elseif-php.patch", - "https://raw.githubusercontent.com/rectorphp/vendor-patches/main/patches/nikic-php-parser-lib-phpparser-node-stmt-namespace-php.patch" ] }, "composer-exit-on-patch-failure": true, diff --git a/preload-split-package.php b/preload-split-package.php index da953d5a7e5..f0ca37624c2 100644 --- a/preload-split-package.php +++ b/preload-split-package.php @@ -26,7 +26,6 @@ function isPHPStanTestPreloaded(): bool } require_once __DIR__ . '/../../../vendor/nikic/php-parser/lib/PhpParser/Node.php'; -require_once __DIR__ . '/src/Contract/PhpParser/Node/StmtsAwareInterface.php'; require_once __DIR__ . '/../../../vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php'; require_once __DIR__ . '/../../../vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php'; require_once __DIR__ . '/../../../vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php'; diff --git a/preload.php b/preload.php index cecb0b90b4c..027b441e3b9 100644 --- a/preload.php +++ b/preload.php @@ -26,7 +26,6 @@ function isPHPStanTestPreloaded(): bool } require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node.php'; -require_once __DIR__ . '/src/Contract/PhpParser/Node/StmtsAwareInterface.php'; require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php'; require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php'; require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php'; diff --git a/src/Contract/PhpParser/Node/StmtsAwareInterface.php b/src/Contract/PhpParser/Node/StmtsAwareInterface.php deleted file mode 100644 index 646675a82a6..00000000000 --- a/src/Contract/PhpParser/Node/StmtsAwareInterface.php +++ /dev/null @@ -1,18 +0,0 @@ -getNodeTypes())) { - continue; - } - // already reported, skip if (in_array($rector::class, $reportedClasses, true)) { continue; } $reportedClasses[] = $rector::class; - - $this->symfonyStyle->warning(sprintf( - 'Rector rule "%s" uses StmtsAwareInterface that is now deprecated.%sUse "%s::%s" instead.%sSee %s for more', - $rector::class, - PHP_EOL, - NodeGroup::class, - 'STMTS_AWARE', - PHP_EOL . PHP_EOL, - 'https://github.com/rectorphp/rector-src/pull/7679' - )); } }