Skip to content

Commit 5f3251e

Browse files
committed
Merge branch 'v5.0.x'
2 parents c30b163 + 3abb3a1 commit 5f3251e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/Services/ModulesService.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1165,12 +1165,12 @@ public function enable( string $namespace ): array|JsonResponse
11651165
*/
11661166
try {
11671167
$code = file_get_contents( $module[ 'index-file' ] );
1168-
$parser = ( new ParserFactory )->create( ParserFactory::PREFER_PHP7 );
1168+
$parser = ( new ParserFactory )->createForNewestSupportedVersion();
11691169
$parser->parse( $code );
11701170

11711171
foreach ( $module[ 'providers' ] as $provider ) {
11721172
$code = file_get_contents( base_path( 'modules' ) . DIRECTORY_SEPARATOR . $provider );
1173-
$parser = ( new ParserFactory )->create( ParserFactory::PREFER_PHP7 );
1173+
$parser = ( new ParserFactory )->createForNewestSupportedVersion();
11741174
$parser->parse( $code );
11751175
}
11761176
} catch ( Error $error ) {

0 commit comments

Comments
 (0)