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

Breadcrumb

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

function Transaction::moveUninstallsToFront

Removals of packages should be executed before installations in case two packages resolve to the same path (due to custom installers)

Parameters

OperationInterface[] $operations:

Return value

OperationInterface[] reordered operation list

1 call to Transaction::moveUninstallsToFront()
Transaction::calculateOperations in vendor/composer/composer/src/Composer/DependencyResolver/Transaction.php

File

vendor/composer/composer/src/Composer/DependencyResolver/Transaction.php, line 346

Class

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

Namespace

Composer\DependencyResolver

Code

private function moveUninstallsToFront(array $operations) : array {
    $uninstOps = [];
    foreach ($operations as $idx => $op) {
        if ($op instanceof Operation\UninstallOperation || $op instanceof Operation\MarkAliasUninstalledOperation) {
            $uninstOps[] = $op;
            unset($operations[$idx]);
        }
    }
    return array_merge($uninstOps, $operations);
}

API Navigation

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