Mercurial > hg > isophonics-drupal-site
diff core/lib/Drupal/Core/Composer/Composer.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children | af1871eacc83 |
line wrap: on
line diff
--- a/core/lib/Drupal/Core/Composer/Composer.php Tue Jul 10 15:07:59 2018 +0100 +++ b/core/lib/Drupal/Core/Composer/Composer.php Thu Feb 28 13:21:36 2019 +0000 @@ -6,6 +6,7 @@ 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 @@ 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 @@ * 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); } /** @@ -270,6 +271,13 @@ } /** + * 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. * * @param string $path