diff --git a/CHANGELOG.md b/CHANGELOG.md index bc7829aa..a49d5c0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ For a full diff see [`2.4.0...main`][2.4.0...main]. - Added rule error identifiers ([#875]), by [@localheinz] +### Changed + +- Removed dependency on `nikic/php-parser` ([#878]), by [@localheinz] + ## [`2.4.0`][2.4.0] For a full diff see [`2.3.0...2.4.0`][2.3.0...2.4.0]. @@ -528,6 +532,7 @@ For a full diff see [`362c7ea...0.1.0`][362c7ea...0.1.0]. [#862]: https://github.com/ergebnis/phpstan-rules/pull/862 [#872]: https://github.com/ergebnis/phpstan-rules/pull/872 [#875]: https://github.com/ergebnis/phpstan-rules/pull/875 +[#878]: https://github.com/ergebnis/phpstan-rules/pull/878 [@enumag]: https://github.com/enumag [@ergebnis]: https://github.com/ergebnis diff --git a/composer-require-checker.json b/composer-require-checker.json index eccb3ff8..9db59de4 100644 --- a/composer-require-checker.json +++ b/composer-require-checker.json @@ -1,5 +1,25 @@ { "symbol-whitelist": [ + "PhpParser\\Comment\\Doc", + "PhpParser\\Node", + "PhpParser\\Node\\Expr\\Closure", + "PhpParser\\Node\\Expr\\ConstFetch", + "PhpParser\\Node\\Expr\\ErrorSuppress", + "PhpParser\\Node\\Expr\\Eval_", + "PhpParser\\Node\\Expr\\FuncCall", + "PhpParser\\Node\\Expr\\Isset_", + "PhpParser\\Node\\Identifier", + "PhpParser\\Node\\Name", + "PhpParser\\Node\\NullableType", + "PhpParser\\Node\\Param", + "PhpParser\\Node\\Scalar\\LNumber", + "PhpParser\\Node\\Stmt\\Class_", + "PhpParser\\Node\\Stmt\\ClassMethod", + "PhpParser\\Node\\Stmt\\Declare_", + "PhpParser\\Node\\Stmt\\Function_", + "PhpParser\\Node\\Stmt\\InlineHTML", + "PhpParser\\Node\\Stmt\\Switch_", + "PhpParser\\Node\\UnionType", "PHPStan\\Analyser\\Scope", "PHPStan\\Node\\FileNode", "PHPStan\\Reflection\\ClassReflection", diff --git a/composer.json b/composer.json index 32c88625..ef243211 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,6 @@ "require": { "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "ext-mbstring": "*", - "nikic/php-parser": "^4.2.3 || ^5.0.0", "phpstan/phpstan": "^1.10.21" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 5e257e6a..4344e246 100644 --- a/composer.lock +++ b/composer.lock @@ -4,64 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5c6f7d4a1f8a81b5c7c2e910b4b36c05", + "content-hash": "d6c110b8a356663f195c72e503ebd549", "packages": [ - { - "name": "nikic/php-parser", - "version": "v4.19.4", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "715f4d25e225bc47b293a8b997fe6ce99bf987d2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/715f4d25e225bc47b293a8b997fe6ce99bf987d2", - "reference": "715f4d25e225bc47b293a8b997fe6ce99bf987d2", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.1" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.19.4" - }, - "time": "2024-09-29T15:01:53+00:00" - }, { "name": "phpstan/phpstan", "version": "1.12.9", @@ -2725,6 +2669,64 @@ }, "time": "2024-08-07T15:39:19+00:00" }, + { + "name": "nikic/php-parser", + "version": "v5.3.1", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b", + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1" + }, + "time": "2024-10-08T18:51:32+00:00" + }, { "name": "phar-io/manifest", "version": "2.0.4", @@ -6419,14 +6421,14 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "ext-mbstring": "*" }, - "platform-dev": [], + "platform-dev": {}, "platform-overrides": { "php": "8.1.26" },