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

Breadcrumb

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

function SyncHelper::await

Waits for a promise to resolve

@phpstan-param PromiseInterface<mixed>|null $promise

Parameters

Loop $loop Loop instance which you can get from $composer->getLoop():

2 calls to SyncHelper::await()
ArchiveManager::archive in vendor/composer/composer/src/Composer/Package/Archiver/ArchiveManager.php
Create an archive of the specified package.
SyncHelper::downloadAndInstallPackageSync in vendor/composer/composer/src/Composer/Util/SyncHelper.php
Helps you download + install a single package in a synchronous way

File

vendor/composer/composer/src/Composer/Util/SyncHelper.php, line 63

Class

SyncHelper

Namespace

Composer\Util

Code

public static function await(Loop $loop, ?PromiseInterface $promise = null) : void {
    if ($promise !== null) {
        $loop->wait([
            $promise,
        ]);
    }
}

API Navigation

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