mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Remove Psalm prefix to match psalm plugin skeleton composer.json
cc @weirdan - ran into this when trying to install a plugin
This commit is contained in:
parent
695f37e6c8
commit
dede120fde
@ -57,6 +57,8 @@ class DisableCommand extends Command
|
||||
|
||||
$plugin_list = ($this->plugin_list_factory)($current_dir, $config_file_path);
|
||||
|
||||
$plugin_name = null;
|
||||
|
||||
try {
|
||||
/** @psalm-suppress MixedAssignment */
|
||||
$plugin_name = $i->getArgument('pluginName');
|
||||
@ -64,7 +66,7 @@ class DisableCommand extends Command
|
||||
|
||||
$plugin_class = $plugin_list->resolvePluginClass($plugin_name);
|
||||
} catch (InvalidArgumentException $e) {
|
||||
$io->error('Unknown plugin class');
|
||||
$io->error('Unknown plugin class ' . $plugin_name);
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
@ -57,6 +57,8 @@ class EnableCommand extends Command
|
||||
|
||||
$plugin_list = ($this->plugin_list_factory)($current_dir, $config_file_path);
|
||||
|
||||
$plugin_name = null;
|
||||
|
||||
try {
|
||||
/** @psalm-suppress MixedAssignment */
|
||||
$plugin_name = $i->getArgument('pluginName');
|
||||
@ -64,7 +66,7 @@ class EnableCommand extends Command
|
||||
|
||||
$plugin_class = $plugin_list->resolvePluginClass($plugin_name);
|
||||
} catch (InvalidArgumentException $e) {
|
||||
$io->error('Unknown plugin class');
|
||||
$io->error('Unknown plugin class ' . $plugin_name);
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ class ComposerLock
|
||||
|
||||
/**
|
||||
* @param mixed $package
|
||||
* @psalm-assert-if-true array{type:'psalm-plugin',name:string,extra:array{psalm:array{pluginClass:string}}}
|
||||
* @psalm-assert-if-true array{type:'psalm-plugin',name:string,extra:array{pluginClass:string}}
|
||||
* $package
|
||||
*/
|
||||
public function isPlugin($package): bool
|
||||
@ -26,8 +26,8 @@ class ComposerLock
|
||||
&& is_string($package['name'])
|
||||
&& isset($package['type'])
|
||||
&& $package['type'] === 'psalm-plugin'
|
||||
&& isset($package['extra']['psalm']['pluginClass'])
|
||||
&& is_string($package['extra']['psalm']['pluginClass']);
|
||||
&& isset($package['extra']['pluginClass'])
|
||||
&& is_string($package['extra']['pluginClass']);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -38,7 +38,7 @@ class ComposerLock
|
||||
$pluginPackages = $this->getAllPluginPackages();
|
||||
$ret = [];
|
||||
foreach ($pluginPackages as $package) {
|
||||
$ret[$package['name']] = $package['extra']['psalm']['pluginClass'];
|
||||
$ret[$package['name']] = $package['extra']['pluginClass'];
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
@ -60,7 +60,7 @@ class ComposerLock
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<mixed,array{name:string,type:string,extra:array{psalm:array{pluginClass:string}}}>
|
||||
* @return array<mixed,array{name:string,type:string,extra:array{pluginClass:string}}>
|
||||
*/
|
||||
private function getAllPluginPackages(): array
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user