Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LockTransaction.php

function LockTransaction::setNonDevPackages

File

vendor/composer/composer/src/Composer/DependencyResolver/LockTransaction.php, line 81

Class

LockTransaction
@author Nils Adermann <naderman@naderman.de> @internal

Namespace

Composer\DependencyResolver

Code

public function setNonDevPackages(LockTransaction $extractionResult) : void {
    $packages = $extractionResult->getNewLockPackages(false);
    $this->resultPackages['dev'] = $this->resultPackages['non-dev'];
    $this->resultPackages['non-dev'] = [];
    foreach ($packages as $package) {
        foreach ($this->resultPackages['dev'] as $i => $resultPackage) {
            // TODO this comparison is probably insufficient, aliases, what about modified versions? I guess they aren't possible?
            if ($package->getName() === $resultPackage->getName()) {
                $this->resultPackages['non-dev'][] = $resultPackage;
                unset($this->resultPackages['dev'][$i]);
            }
        }
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal