Skip to content

Commit

Permalink
refactor: use dependency injection for PluginInstaller
Browse files Browse the repository at this point in the history
  • Loading branch information
jsantos42 committed Oct 11, 2024
1 parent 5a23e0d commit 20b148e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions plugins/CorePluginsAdmin/Commands/InstallPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ protected function doExecute(): int
*/
private function installPlugin(string $pluginName): void
{
$marketplaceClient = StaticContainer::getContainer()->make('Piwik\Plugins\Marketplace\Api\Client');
$pluginInstaller = new PluginInstaller($marketplaceClient);
$pluginInstaller = StaticContainer::get(PluginInstaller::class);
$pluginInstaller->installOrUpdatePluginFromMarketplace($pluginName);

$pluginManager = Manager::getInstance();
Expand Down

0 comments on commit 20b148e

Please sign in to comment.