mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-08 17:35:36 +08:00
Implement caching for config file parsing to improve performance
This commit is contained in:
@@ -64,7 +64,7 @@ class Registry
|
||||
}
|
||||
$data = match (pathinfo($registry_file, PATHINFO_EXTENSION)) {
|
||||
'json' => json_decode($yaml, true),
|
||||
'yaml', 'yml' => Yaml::parse($yaml),
|
||||
'yaml', 'yml' => extension_loaded('yaml') ? yaml_parse($yaml) : Yaml::parse($yaml),
|
||||
default => throw new RegistryException("Unsupported registry file format: {$registry_file}"),
|
||||
};
|
||||
if (!is_array($data)) {
|
||||
|
||||
Reference in New Issue
Block a user