Merge branch '1.8' of github.com:getgrav/grav into 1.8

This commit is contained in:
Andy Miller 2024-10-26 15:25:11 +01:00
commit 42c0682dd8
No known key found for this signature in database
GPG Key ID: 9F2CF38AEBDB0AE0

View File

@ -57,6 +57,14 @@ class PluginCommandLoader implements CommandLoaderInterface
$command = new $command_class();
if ($command instanceof Command) {
$this->commands[$command->getName()] = $command;
// If the command has an alias, add that as a possible command name.
$aliases = $this->commands[$command->getName()]->getAliases();
if (isset($aliases)) {
foreach ($aliases as $alias) {
$this->commands[$alias] = $command;
}
}
}
}
}