File tree 6 files changed +13
-4
lines changed
src/Symfony/Component/Translation
6 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,10 @@ jobs:
128
128
echo SYMFONY_REQUIRE=">=$([ '${{ matrix.mode }}' = low-deps ] && echo 4.4 || echo $SYMFONY_VERSION)" >> $GITHUB_ENV
129
129
[[ "${{ matrix.mode }}" = *-deps ]] && mv composer.json.phpunit composer.json || true
130
130
131
+ if [[ "${{ matrix.mode }}" = low-deps ]]; then
132
+ echo SYMFONY_PHPUNIT_REQUIRE="nikic/php-parser:^4.16" >> $GITHUB_ENV
133
+ fi
134
+
131
135
- name : Install dependencies
132
136
run : |
133
137
echo "::group::composer update"
Original file line number Diff line number Diff line change 140
140
"league/uri" : " ^6.5|^7.0" ,
141
141
"masterminds/html5" : " ^2.7.2" ,
142
142
"monolog/monolog" : " ^1.25.1|^2" ,
143
+ "nikic/php-parser" : " ^4.16|^5.0" ,
143
144
"nyholm/psr7" : " ^1.0" ,
144
145
"pda/pheanstalk" : " ^4.0" ,
145
146
"php-http/discovery" : " ^1.15" ,
Original file line number Diff line number Diff line change @@ -39,7 +39,11 @@ public function __construct(
39
39
throw new \LogicException (sprintf ('You cannot use "%s" as the "nikic/php-parser" package is not installed. Try running "composer require nikic/php-parser". ' , static ::class));
40
40
}
41
41
42
- $ this ->parser = (new ParserFactory ())->create (ParserFactory::PREFER_PHP7 );
42
+ if (method_exists (ParserFactory::class, 'createForHostVersion ' )) {
43
+ $ this ->parser = (new ParserFactory ())->createForHostVersion ();
44
+ } else {
45
+ $ this ->parser = (new ParserFactory ())->create (ParserFactory::PREFER_PHP7 );
46
+ }
43
47
}
44
48
45
49
public function extract (iterable |string $ resource , MessageCatalogue $ catalogue ): void
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public function enterNode(Node $node): ?Node
42
42
return null ;
43
43
}
44
44
45
- $ parts = $ className ->parts ;
45
+ $ parts = $ className ->getParts () ;
46
46
$ isConstraintClass = false ;
47
47
48
48
foreach ($ parts as $ part ) {
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public function enterNode(Node $node): ?Node
34
34
return null ;
35
35
}
36
36
37
- if (!\in_array ('TranslatableMessage ' , $ className ->parts , true )) {
37
+ if (!\in_array ('TranslatableMessage ' , $ className ->getParts () , true )) {
38
38
return null ;
39
39
}
40
40
Original file line number Diff line number Diff line change 22
22
"symfony/translation-contracts" : " ^2.5|^3.0"
23
23
},
24
24
"require-dev" : {
25
- "nikic/php-parser" : " ^4.13 " ,
25
+ "nikic/php-parser" : " ^4.16|^5.0 " ,
26
26
"symfony/config" : " ^5.4|^6.0" ,
27
27
"symfony/console" : " ^5.4|^6.0" ,
28
28
"symfony/dependency-injection" : " ^5.4|^6.0" ,
You can’t perform that action at this time.
0 commit comments