mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Use the VersionYamlParser when parsing the version.yaml file
This commit is contained in:
parent
8dc65fb61f
commit
55e9cadc4e
@ -432,7 +432,13 @@ class PluginBase extends ServiceProviderBase
|
||||
|
||||
$versionFile = $this->getPluginPath() . '/updates/version.yaml';
|
||||
|
||||
if (!File::isFile($versionFile) || !($versionInfo = Yaml::parse(file_get_contents($versionFile))) || !is_array($versionInfo)) {
|
||||
if (
|
||||
!File::isFile($versionFile) ||
|
||||
!($versionInfo = Yaml::withProcessor(new VersionYamlProcessor, function ($yaml) use ($versionFile) {
|
||||
return $yaml->parseFile($versionFile);
|
||||
})) ||
|
||||
!is_array($versionInfo)
|
||||
) {
|
||||
return $this->version = (string) VersionManager::NO_VERSION_VALUE;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user