From 55e9cadc4e8c855a3615d5bf752435a691cb3986 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Thu, 9 Dec 2021 17:07:01 -0600 Subject: [PATCH] Use the VersionYamlParser when parsing the version.yaml file --- modules/system/classes/PluginBase.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/system/classes/PluginBase.php b/modules/system/classes/PluginBase.php index a2d23e9da..25f001073 100644 --- a/modules/system/classes/PluginBase.php +++ b/modules/system/classes/PluginBase.php @@ -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; }