Skip to content

Commit 23d83de

Browse files
committed
fix(load): load plugins immediately on install
fixes #17
1 parent 0065781 commit 23d83de

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/NuonicPluginInstaller.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
namespace NuonicPluginInstaller;
66

77
use Doctrine\DBAL\Connection;
8+
use NuonicPluginInstaller\Action\RefreshAction;
89
use Shopware\Core\Framework\Plugin;
10+
use Shopware\Core\Framework\Plugin\Context\ActivateContext;
911
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
1012
use Symfony\Component\Config\FileLocator;
1113
use Symfony\Component\Config\Loader\DelegatingLoader;
@@ -47,4 +49,14 @@ public function uninstall(UninstallContext $uninstallContext): void
4749
$connection->executeStatement('DROP TABLE IF EXISTS nuonic_available_opensource_plugin_translation');
4850
$connection->executeStatement('DROP TABLE IF EXISTS nuonic_available_opensource_plugin');
4951
}
52+
53+
public function activate(ActivateContext $activateContext): void
54+
{
55+
$this->getRefreshAction()->execute($activateContext->getContext());
56+
}
57+
58+
private function getRefreshAction(): RefreshAction
59+
{
60+
return $this->container->get(RefreshAction::class);
61+
}
5062
}

0 commit comments

Comments
 (0)