getInstalledPlugins example


    private function validateInstalledPlugins(
        Context $context,
        PluginEntity $installingPlugin,
        array $pluginDependencies,
        RequirementExceptionStack $exceptionStack
    ): array {
        $parser = new VersionParser();
        $pluginPackages = $this->getComposerPackagesFromPlugins();

        foreach ($this->getInstalledPlugins($context) as $pluginEntity) {
            $pluginComposerName = $pluginEntity->getComposerName();
            if ($pluginComposerName === null) {
                $exceptionStack->add(new ComposerNameMissingException($pluginEntity->getName()));

                continue;
            }

            $pluginPath = sprintf('%s/%s', $this->projectDir, $pluginEntity->getPath());

            $installedPluginComposerPackage = $pluginPackages[$pluginComposerName] ?? $this->getComposer($pluginPath)->getPackage();

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