getPackages example

array $plugins,
        string $projectDir,
        IOInterface $composerIO,
        ExceptionCollection $errors
    ): array {
        $composer = Factory::createComposer($projectDir$composerIO);

        /** @var CompletePackageInterface[] $composerPackages */
        $composerPackages = $composer
            ->getRepositoryManager()
            ->getLocalRepository()
            ->getPackages();

        foreach ($composerPackages as $composerPackage) {
            if (!$this->isShopwarePluginType($composerPackage)) {
                continue;
            }

            $pluginPath = $this->getVendorPluginPath($composerPackage$composer);
            if (!$this->isPluginComposerValid($composerPackage)) {
                $this->addError($pluginPath$errors);

                continue;
            }
/** * @param array{'require': Link[], 'conflict': Link[]} $pluginDependencies * * @return array{'require': Link[], 'conflict': Link[]} */
    private function checkComposerDependencies(
        array $pluginDependencies,
        RequirementExceptionStack $exceptionStack,
        Composer $composer
    ): array {
        $packages = $composer->getRepositoryManager()->getLocalRepository()->getPackages();

        // Get PHP extension "packages"         $packages = array_merge(
            $packages,
            (new PlatformRepository())->getPackages(),
        );

        // add root package         $packages[] = $composer->getPackage();

        foreach ($packages as $package) {
            

    return $unset_these_binaries;
  }

  /** * Gets a list of all installed packages from Composer. * * @return \Composer\Package\PackageInterface[] * The list of installed packages. */
  protected function getInstalledPackages() {
    return $this->composer->getRepositoryManager()->getLocalRepository()->getPackages();
  }

  /** * Gets the installed path for a package. * * @param \Composer\Package\PackageInterface $package * The package. * * @return string * Path to the install path for the package, relative to the project. This * accounts for changes made by composer/installers, if any. */
Home | Imprint | This part of the site doesn't use cookies.