X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Flib%2FDrupal%2FCore%2FComposer%2FComposer.php;fp=web%2Fcore%2Flib%2FDrupal%2FCore%2FComposer%2FComposer.php;h=9833b7ede1964211f00fead94d29574c5601041a;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=04f9564c7f05d385ae651e7765fa8028656c4061;hpb=74df008bdbb3a11eeea356744f39b802369bda3c;p=yaffs-website diff --git a/web/core/lib/Drupal/Core/Composer/Composer.php b/web/core/lib/Drupal/Core/Composer/Composer.php index 04f9564c7..9833b7ede 100644 --- a/web/core/lib/Drupal/Core/Composer/Composer.php +++ b/web/core/lib/Drupal/Core/Composer/Composer.php @@ -6,6 +6,7 @@ use Drupal\Component\PhpStorage\FileStorage; use Composer\Script\Event; use Composer\Installer\PackageEvent; use Composer\Semver\Constraint\Constraint; +use Composer\Util\ProcessExecutor; /** * Provides static functions for composer script events. @@ -160,7 +161,7 @@ EOT; return; } - // If the PHP version is 7.2 or above and PHPUnit is less than version 6 + // If the PHP version is 7.0 or above and PHPUnit is less than version 6 // call the drupal-phpunit-upgrade script to upgrade PHPUnit. if (!static::upgradePHPUnitCheck($phpunit_package->getVersion())) { $event->getComposer() @@ -182,7 +183,7 @@ EOT; * TRUE if the PHPUnit needs to be upgraded, FALSE if not. */ public static function upgradePHPUnitCheck($phpunit_version) { - return !(version_compare(PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION, '7.2') >= 0 && version_compare($phpunit_version, '6.1') < 0); + return !(version_compare(PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION, '7.0') >= 0 && version_compare($phpunit_version, '6.1') < 0); } /** @@ -269,6 +270,13 @@ EOT; return $package_key; } + /** + * Removes Composer's timeout so that scripts can run indefinitely. + */ + public static function removeTimeout() { + ProcessExecutor::setTimeout(0); + } + /** * Helper method to remove directories and the files they contain. *