We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c30b163 + 3abb3a1 commit 5f3251eCopy full SHA for 5f3251e
app/Services/ModulesService.php
@@ -1165,12 +1165,12 @@ public function enable( string $namespace ): array|JsonResponse
1165
*/
1166
try {
1167
$code = file_get_contents( $module[ 'index-file' ] );
1168
- $parser = ( new ParserFactory )->create( ParserFactory::PREFER_PHP7 );
+ $parser = ( new ParserFactory )->createForNewestSupportedVersion();
1169
$parser->parse( $code );
1170
1171
foreach ( $module[ 'providers' ] as $provider ) {
1172
$code = file_get_contents( base_path( 'modules' ) . DIRECTORY_SEPARATOR . $provider );
1173
1174
1175
}
1176
} catch ( Error $error ) {
0 commit comments