Skip to content

Commit

Permalink
don't leave empty plugins node to avoid old schema violation
Browse files Browse the repository at this point in the history
  • Loading branch information
weirdan committed Jul 12, 2018
1 parent d3ae2af commit 140bf35
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Psalm/PluginManager/ConfigFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ public function removePlugin(string $plugin_class): void
break;
}
}
if (!$config_xml->plugins->children()->count()) {
// avoid breaking old psalm binaries, whose schema did not allow empty plugins
unset($config_xml->plugins[0]);
}

$config_xml->asXML($this->path);
}
Expand Down

0 comments on commit 140bf35

Please sign in to comment.