Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): Upgrade to PHP-Parser v5 #1025

Merged
merged 6 commits into from
May 5, 2024
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 @@ -21,7 +21,7 @@
"fidry/console": "^0.6.10",
"fidry/filesystem": "^1.1",
"jetbrains/phpstorm-stubs": "^2024.1",
"nikic/php-parser": "^4.12",
"nikic/php-parser": "^5.0",
"symfony/console": "^6.4 || ^7.0",
"symfony/filesystem": "^6.4 || ^7.0",
"symfony/finder": "^6.4 || ^7.0",
Expand Down
22 changes: 12 additions & 10 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion fixtures/set027-laravel/scoper.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ static function (string $filePath, string $prefix, string $contents): string {
}

return str_replace(
'$component = \'\\\\Illuminate\\\\Console\\\\View\\\\Components\\\\\' . ucfirst($method);',
'$component = \'\\Illuminate\\Console\\View\\Components\\\\\' . ucfirst($method);',
'$component = \'\\\\'.$prefix.'\\\\Illuminate\\\\Console\\\\View\\\\Components\\\\\' . ucfirst($method);',
$contents,
);
Expand Down
2 changes: 0 additions & 2 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ parameters:
path: 'src/Patcher/SymfonyPatcher.php'
- message: '#Parameter \#1 \$nodes of method PhpParser\\NodeTraverserInterface::traverse\(\) expects array\<PhpParser\\Node\>, array\<PhpParser\\Node\\Stmt\>\|null given\.#'
path: 'src/Scoper/PhpScoper.php'
- message: '#UseStmtName::getUseStmtAliasAndType\(\) should return#'
path: 'src/PhpParser/UseStmtName.php'
- message: '#UseStmtManipulator::getOriginalName\(\) should return#'
path: 'src/PhpParser/NodeVisitor/UseStmt/UseStmtManipulator.php'
- message: '#IdentifierResolver::resolveIdentifier\(\) should return#'
Expand Down
2 changes: 1 addition & 1 deletion specs/class-const/global-scope-single-level.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Command {}
class Command
{
}
\class_alias('Humbug\\Command', 'Command', \false);
\class_alias('Humbug\Command', 'Command', \false);
\Command::MAIN_CONST;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class Foo
class Bar
{
}
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
namespace Humbug;

use Humbug\Foo as X;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class Foo
class Bar
{
}
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
namespace Humbug;

use Humbug\Foo;
Expand Down Expand Up @@ -205,7 +205,7 @@ class Foo
class Bar
{
}
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
namespace Humbug;

use Humbug\Foo;
Expand Down
4 changes: 2 additions & 2 deletions specs/class-const/global-scope-two-level.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Command {}
class Command
{
}
\class_alias('Humbug\\PHPUnit\\Command', 'PHPUnit\\Command', \false);
\class_alias('Humbug\PHPUnit\Command', 'PHPUnit\Command', \false);
namespace Humbug;

\Humbug\PHPUnit\Command::MAIN_CONST;
Expand Down Expand Up @@ -122,7 +122,7 @@ class Command {}
class Command
{
}
\class_alias('Humbug\\PHPUnit\\Command', 'PHPUnit\\Command', \false);
\class_alias('Humbug\PHPUnit\Command', 'PHPUnit\Command', \false);
namespace Humbug;

\Humbug\PHPUnit\Command::MAIN_CONST;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class Foo
class Bar
{
}
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
namespace Humbug\A;

use Humbug\Foo as X;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class Foo
class Bar
{
}
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
namespace Humbug\X;

use Humbug\Foo;
Expand Down Expand Up @@ -205,7 +205,7 @@ class Foo
class Bar
{
}
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
namespace Humbug\X;

use Humbug\Foo;
Expand Down
4 changes: 2 additions & 2 deletions specs/class-const/namespace-scope-two-level.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Command {}
class Command
{
}
\class_alias('Humbug\\X\\PHPUnit\\Command', 'X\\PHPUnit\\Command', \false);
\class_alias('Humbug\X\PHPUnit\Command', 'X\PHPUnit\Command', \false);
namespace Humbug\X;

PHPUnit\Command::MAIN_CONST;
Expand Down Expand Up @@ -176,7 +176,7 @@ class Command {}
class Command
{
}
\class_alias('Humbug\\PHPUnit\\Command', 'PHPUnit\\Command', \false);
\class_alias('Humbug\PHPUnit\Command', 'PHPUnit\Command', \false);
namespace Humbug\X;

\Humbug\PHPUnit\Command::MAIN_CONST;
Expand Down
2 changes: 1 addition & 1 deletion specs/class-static-prop/global-scope-single-level.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Command {}
class Command
{
}
\class_alias('Humbug\\Command', 'Command', \false);
\class_alias('Humbug\Command', 'Command', \false);
\Command::$mainStaticProp;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class Foo
class Bar
{
}
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
namespace Humbug;

use Humbug\Foo as X;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class Foo
class Bar
{
}
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
namespace Humbug;

use Humbug\Foo;
Expand Down Expand Up @@ -205,7 +205,7 @@ class Foo
class Bar
{
}
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
namespace Humbug;

use Humbug\Foo;
Expand Down
4 changes: 2 additions & 2 deletions specs/class-static-prop/global-scope-two-level.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Command {}
class Command
{
}
\class_alias('Humbug\\PHPUnit\\Command', 'PHPUnit\\Command', \false);
\class_alias('Humbug\PHPUnit\Command', 'PHPUnit\Command', \false);
namespace Humbug;

\Humbug\PHPUnit\Command::$mainStaticProp;
Expand Down Expand Up @@ -122,7 +122,7 @@ class Command {}
class Command
{
}
\class_alias('Humbug\\PHPUnit\\Command', 'PHPUnit\\Command', \false);
\class_alias('Humbug\PHPUnit\Command', 'PHPUnit\Command', \false);
namespace Humbug;

\Humbug\PHPUnit\Command::$mainStaticProp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class Foo
class Bar
{
}
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
namespace Humbug\A;

use Humbug\Foo as X;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class Foo
class Bar
{
}
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
namespace Humbug\X;

use Humbug\Foo;
Expand Down Expand Up @@ -205,7 +205,7 @@ class Foo
class Bar
{
}
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
namespace Humbug\X;

use Humbug\Foo;
Expand Down
4 changes: 2 additions & 2 deletions specs/class-static-prop/namespace-scope-two-level.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Command {}
class Command
{
}
\class_alias('Humbug\\X\\PHPUnit\\Command', 'X\\PHPUnit\\Command', \false);
\class_alias('Humbug\X\PHPUnit\Command', 'X\PHPUnit\Command', \false);
namespace Humbug\X;

PHPUnit\Command::$mainStaticProp;
Expand Down Expand Up @@ -122,7 +122,7 @@ class Command {}
class Command
{
}
\class_alias('Humbug\\PHPUnit\\Command', 'PHPUnit\\Command', \false);
\class_alias('Humbug\PHPUnit\Command', 'PHPUnit\Command', \false);
namespace Humbug\X;

\Humbug\PHPUnit\Command::$mainStaticProp;
Expand Down
Loading
Loading