createPluginService example

return $appEntity;
    }

    private function uninstallApp(AppEntity $appEntity): void
    {
        $this->appLifecycle->delete($appEntity->getName()['id' => $appEntity->getId()]$this->context);
    }

    private function installPlugin(): PluginEntity
    {
        $this->pluginService = $this->createPluginService(
            __DIR__ . '/_fixtures/plugins',
            $this->getContainer()->getParameter('kernel.project_dir'),
            $this->pluginRepository,
            $this->languageRepository,
            $this->pluginFinder
        );

        $this->addTestPluginToKernel(
            __DIR__ . '/_fixtures/plugins/' . self::PLUGIN_NAME,
            self::PLUGIN_NAME
        );

        
protected function setUp(): void
    {
        // force kernel boot         KernelLifecycleManager::bootKernel();

        $this->container = $this->getContainer();
        $this->pluginRepo = $this->container->get('plugin.repository');
        $this->connection = $this->container->get(Connection::class);
        $this->pluginLifecycleService = $this->createPluginLifecycleService();
        $this->context = Context::createDefaultContext();

        $this->pluginService = $this->createPluginService(
            __DIR__ . '/_fixture/plugins',
            $this->container->getParameter('kernel.project_dir'),
            $this->pluginRepo,
            $this->container->get('language.repository'),
            $this->container->get(PluginFinder::class)
        );

        $this->addTestPluginToKernel(
            __DIR__ . '/_fixture/plugins/SwagManualMigrationTest',
            'SwagManualMigrationTest'
        );
        
'app' => self::APPS_PATH,
            ]$this->filesystem),
            $this->getPluginService(),
            $this->filesystem,
            $this->getCacheClearer(),
            $this->getContainer()->get('shopware.store_download_client')
        );
    }

    private function getPluginService(): PluginService
    {
        return $this->createPluginService(
            __DIR__ . '/_fixture/plugins',
            $this->getContainer()->getParameter('kernel.project_dir'),
            $this->getContainer()->get('plugin.repository'),
            $this->getContainer()->get('language.repository'),
            $this->getContainer()->get(PluginFinder::class)
        );
    }

    private function getCacheClearer(): CacheClearer
    {
        return new CacheClearer(
            [],
private PluginService $pluginService;

    private Context $context;

    private string $iso = 'nl-NL';

    protected function setUp(): void
    {
        require_once __DIR__ . '/_fixture/plugins/SwagTest/src/SwagTest.php';
        require_once __DIR__ . '/_fixture/plugins/SwagTestNoDefaultLang/src/SwagTestNoDefaultLang.php';
        $this->pluginRepo = $this->getContainer()->get('plugin.repository');
        $this->pluginService = $this->createPluginService(
            __DIR__ . '/_fixture/plugins',
            $this->getContainer()->getParameter('kernel.project_dir'),
            $this->pluginRepo,
            $this->getContainer()->get('language.repository'),
            $this->getContainer()->get(PluginFinder::class)
        );
        $this->context = Context::createDefaultContext();
    }

    public function testRefreshPlugins(): void
    {
        
protected function setUp(): void
    {
        // force kernel boot         KernelLifecycleManager::bootKernel();

        $this->getContainer()
            ->get(Connection::class)
            ->beginTransaction();

        $this->container = $this->getContainer();
        $this->pluginRepo = $this->container->get('plugin.repository');
        $this->pluginService = $this->createPluginService(
            __DIR__ . '/_fixture/plugins',
            $this->container->getParameter('kernel.project_dir'),
            $this->pluginRepo,
            $this->container->get('language.repository'),
            $this->container->get(PluginFinder::class)
        );
        $this->pluginCollection = $this->container->get(KernelPluginCollection::class);
        $this->connection = $this->container->get(Connection::class);
        $this->systemConfigService = $this->container->get(SystemConfigService::class);
        $this->pluginLifecycleService = $this->createPluginLifecycleService($this->pluginService);

        
Home | Imprint | This part of the site doesn't use cookies.