Skip to content

Commit b532a5b

Browse files
authored
build(deps): Upgrade to PHP-Parser v5 (#1025)
1 parent 6ebbe53 commit b532a5b

File tree

102 files changed

+875
-892
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+875
-892
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"fidry/console": "^0.6.10",
2222
"fidry/filesystem": "^1.1",
2323
"jetbrains/phpstorm-stubs": "^2024.1",
24-
"nikic/php-parser": "^4.12",
24+
"nikic/php-parser": "^5.0",
2525
"symfony/console": "^6.4 || ^7.0",
2626
"symfony/filesystem": "^6.4 || ^7.0",
2727
"symfony/finder": "^6.4 || ^7.0",

composer.lock

+12-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fixtures/set027-laravel/scoper.inc.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static function (string $filePath, string $prefix, string $contents): string {
2525
}
2626

2727
return str_replace(
28-
'$component = \'\\\\Illuminate\\\\Console\\\\View\\\\Components\\\\\' . ucfirst($method);',
28+
'$component = \'\\Illuminate\\Console\\View\\Components\\\\\' . ucfirst($method);',
2929
'$component = \'\\\\'.$prefix.'\\\\Illuminate\\\\Console\\\\View\\\\Components\\\\\' . ucfirst($method);',
3030
$contents,
3131
);

phpstan.neon.dist

-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ parameters:
1010
path: 'src/Patcher/SymfonyPatcher.php'
1111
- message: '#Parameter \#1 \$nodes of method PhpParser\\NodeTraverserInterface::traverse\(\) expects array\<PhpParser\\Node\>, array\<PhpParser\\Node\\Stmt\>\|null given\.#'
1212
path: 'src/Scoper/PhpScoper.php'
13-
- message: '#UseStmtName::getUseStmtAliasAndType\(\) should return#'
14-
path: 'src/PhpParser/UseStmtName.php'
1513
- message: '#UseStmtManipulator::getOriginalName\(\) should return#'
1614
path: 'src/PhpParser/NodeVisitor/UseStmt/UseStmtManipulator.php'
1715
- message: '#IdentifierResolver::resolveIdentifier\(\) should return#'

specs/class-const/global-scope-single-level.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Command {}
5656
class Command
5757
{
5858
}
59-
\class_alias('Humbug\\Command', 'Command', \false);
59+
\class_alias('Humbug\Command', 'Command', \false);
6060
\Command::MAIN_CONST;
6161
}
6262

specs/class-const/global-scope-two-level-with-single-level-use-and-alias.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class Foo
153153
class Bar
154154
{
155155
}
156-
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
156+
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
157157
namespace Humbug;
158158
159159
use Humbug\Foo as X;

specs/class-const/global-scope-two-level-with-single-level-use.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class Foo
162162
class Bar
163163
{
164164
}
165-
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
165+
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
166166
namespace Humbug;
167167
168168
use Humbug\Foo;
@@ -205,7 +205,7 @@ class Foo
205205
class Bar
206206
{
207207
}
208-
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
208+
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
209209
namespace Humbug;
210210
211211
use Humbug\Foo;

specs/class-const/global-scope-two-level.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class Command {}
9191
class Command
9292
{
9393
}
94-
\class_alias('Humbug\\PHPUnit\\Command', 'PHPUnit\\Command', \false);
94+
\class_alias('Humbug\PHPUnit\Command', 'PHPUnit\Command', \false);
9595
namespace Humbug;
9696
9797
\Humbug\PHPUnit\Command::MAIN_CONST;
@@ -122,7 +122,7 @@ class Command {}
122122
class Command
123123
{
124124
}
125-
\class_alias('Humbug\\PHPUnit\\Command', 'PHPUnit\\Command', \false);
125+
\class_alias('Humbug\PHPUnit\Command', 'PHPUnit\Command', \false);
126126
namespace Humbug;
127127
128128
\Humbug\PHPUnit\Command::MAIN_CONST;

specs/class-const/namespace-scope-two-level-with-single-level-use-and-alias.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class Foo
153153
class Bar
154154
{
155155
}
156-
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
156+
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
157157
namespace Humbug\A;
158158
159159
use Humbug\Foo as X;

specs/class-const/namespace-scope-two-level-with-single-level-use.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class Foo
162162
class Bar
163163
{
164164
}
165-
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
165+
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
166166
namespace Humbug\X;
167167
168168
use Humbug\Foo;
@@ -205,7 +205,7 @@ class Foo
205205
class Bar
206206
{
207207
}
208-
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
208+
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
209209
namespace Humbug\X;
210210
211211
use Humbug\Foo;

specs/class-const/namespace-scope-two-level.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class Command {}
9191
class Command
9292
{
9393
}
94-
\class_alias('Humbug\\X\\PHPUnit\\Command', 'X\\PHPUnit\\Command', \false);
94+
\class_alias('Humbug\X\PHPUnit\Command', 'X\PHPUnit\Command', \false);
9595
namespace Humbug\X;
9696
9797
PHPUnit\Command::MAIN_CONST;
@@ -176,7 +176,7 @@ class Command {}
176176
class Command
177177
{
178178
}
179-
\class_alias('Humbug\\PHPUnit\\Command', 'PHPUnit\\Command', \false);
179+
\class_alias('Humbug\PHPUnit\Command', 'PHPUnit\Command', \false);
180180
namespace Humbug\X;
181181
182182
\Humbug\PHPUnit\Command::MAIN_CONST;

specs/class-static-prop/global-scope-single-level.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Command {}
5656
class Command
5757
{
5858
}
59-
\class_alias('Humbug\\Command', 'Command', \false);
59+
\class_alias('Humbug\Command', 'Command', \false);
6060
\Command::$mainStaticProp;
6161
}
6262

specs/class-static-prop/global-scope-two-level-with-single-level-use-and-alias.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class Foo
153153
class Bar
154154
{
155155
}
156-
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
156+
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
157157
namespace Humbug;
158158
159159
use Humbug\Foo as X;

specs/class-static-prop/global-scope-two-level-with-single-level-use.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class Foo
162162
class Bar
163163
{
164164
}
165-
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
165+
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
166166
namespace Humbug;
167167
168168
use Humbug\Foo;
@@ -205,7 +205,7 @@ class Foo
205205
class Bar
206206
{
207207
}
208-
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
208+
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
209209
namespace Humbug;
210210
211211
use Humbug\Foo;

specs/class-static-prop/global-scope-two-level.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class Command {}
9191
class Command
9292
{
9393
}
94-
\class_alias('Humbug\\PHPUnit\\Command', 'PHPUnit\\Command', \false);
94+
\class_alias('Humbug\PHPUnit\Command', 'PHPUnit\Command', \false);
9595
namespace Humbug;
9696
9797
\Humbug\PHPUnit\Command::$mainStaticProp;
@@ -122,7 +122,7 @@ class Command {}
122122
class Command
123123
{
124124
}
125-
\class_alias('Humbug\\PHPUnit\\Command', 'PHPUnit\\Command', \false);
125+
\class_alias('Humbug\PHPUnit\Command', 'PHPUnit\Command', \false);
126126
namespace Humbug;
127127
128128
\Humbug\PHPUnit\Command::$mainStaticProp;

specs/class-static-prop/namespace-scope-two-level-with-single-level-use-and-alias.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class Foo
153153
class Bar
154154
{
155155
}
156-
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
156+
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
157157
namespace Humbug\A;
158158
159159
use Humbug\Foo as X;

specs/class-static-prop/namespace-scope-two-level-with-single-level-use.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class Foo
162162
class Bar
163163
{
164164
}
165-
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
165+
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
166166
namespace Humbug\X;
167167
168168
use Humbug\Foo;
@@ -205,7 +205,7 @@ class Foo
205205
class Bar
206206
{
207207
}
208-
\class_alias('Humbug\\Foo\\Bar', 'Foo\\Bar', \false);
208+
\class_alias('Humbug\Foo\Bar', 'Foo\Bar', \false);
209209
namespace Humbug\X;
210210
211211
use Humbug\Foo;

specs/class-static-prop/namespace-scope-two-level.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class Command {}
9191
class Command
9292
{
9393
}
94-
\class_alias('Humbug\\X\\PHPUnit\\Command', 'X\\PHPUnit\\Command', \false);
94+
\class_alias('Humbug\X\PHPUnit\Command', 'X\PHPUnit\Command', \false);
9595
namespace Humbug\X;
9696
9797
PHPUnit\Command::$mainStaticProp;
@@ -122,7 +122,7 @@ class Command {}
122122
class Command
123123
{
124124
}
125-
\class_alias('Humbug\\PHPUnit\\Command', 'PHPUnit\\Command', \false);
125+
\class_alias('Humbug\PHPUnit\Command', 'PHPUnit\Command', \false);
126126
namespace Humbug\X;
127127
128128
\Humbug\PHPUnit\Command::$mainStaticProp;

0 commit comments

Comments
 (0)