Skip to content

Commit 25e1893

Browse files
committed
Fix php-parser deprecation
1 parent 3bc540b commit 25e1893

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

composer.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
"ext-hash": "*",
3434
"ext-zlib": "*",
3535
"ext-fileinfo": "*",
36-
"amphp/amp": "^3.1.0",
37-
"amphp/http-client": "^5.3.3",
38-
"amphp/websocket-client": "^2.0.1",
36+
"amphp/amp": "^3.1.1",
37+
"amphp/http-client": "^5.3.4",
38+
"amphp/websocket-client": "^2.0.2",
3939
"amphp/http": "^2.1.2",
4040
"amphp/socket": "^2.3.1",
4141
"amphp/dns": "^2.4.0",
@@ -50,13 +50,13 @@
5050
"danog/ipc": "^1.0.1",
5151
"amphp/log": "^2",
5252
"danog/loop": "^1.1.1",
53-
"phpseclib/phpseclib": "^3.0.46",
53+
"phpseclib/phpseclib": "^3.0.47",
5454
"amphp/redis": "^2.0.3",
5555
"psr/http-factory": "^1.1.0",
5656
"psr/log": "^3.0.2",
57-
"webmozart/assert": "^1.11",
57+
"webmozart/assert": "^1.12.1",
5858
"bacon/bacon-qr-code": "^3.0.1",
59-
"nikic/php-parser": "^5.5.0",
59+
"nikic/php-parser": "^5.6.2",
6060
"revolt/event-loop": "^1.0.7",
6161
"danog/async-orm": "^1.1.4",
6262
"danog/telegram-entities": "^1.0.5",
@@ -68,10 +68,10 @@
6868
"require-dev": {
6969
"ext-ctype": "*",
7070
"danog/phpdoc": "^0.1.24",
71-
"phpunit/phpunit": "^9.6.23",
71+
"phpunit/phpunit": "^9.6.29",
7272
"amphp/phpunit-util": "^3",
7373
"bamarni/composer-bin-plugin": "1.8.2",
74-
"symfony/yaml": "^6.4.23",
74+
"symfony/yaml": "^6.4.26",
7575
"revolt/event-loop-adapter-react": "^1.1.1",
7676
"dg/bypass-finals": "dev-master",
7777
"brianium/paratest": "^6.11.1",

src/Tools.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
use danog\DialogId\DialogId;
3737
use Fiber;
3838
use PhpParser\Node\Arg;
39+
use PhpParser\Node\DeclareItem;
3940
use PhpParser\Node\Expr\FuncCall;
4041
use PhpParser\Node\Expr\Include_;
4142
use PhpParser\Node\Expr\New_;
@@ -48,7 +49,6 @@
4849
use PhpParser\Node\Stmt\Class_;
4950
use PhpParser\Node\Stmt\ClassLike;
5051
use PhpParser\Node\Stmt\ClassMethod;
51-
use PhpParser\Node\Stmt\DeclareDeclare;
5252
use PhpParser\NodeFinder;
5353
use PhpParser\NodeTraverser;
5454
use PhpParser\NodeVisitor\NameResolver;
@@ -746,8 +746,8 @@ public static function validateEventHandlerClass(string $class): array
746746
}
747747
}
748748

749-
/** @var DeclareDeclare|null $declare */
750-
$declare = $finder->findFirstInstanceOf($code, DeclareDeclare::class);
749+
/** @var DeclareItem|null $declare */
750+
$declare = $finder->findFirstInstanceOf($code, DeclareItem::class);
751751
if ($declare === null
752752
|| $declare->key->name !== 'strict_types'
753753
|| !$declare->value instanceof LNumber

0 commit comments

Comments
 (0)