You are here

public static function Composer::upgradePHPUnitCheck in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Composer/Composer.php \Drupal\Core\Composer\Composer::upgradePHPUnitCheck()

Determines if PHPUnit needs to be upgraded.

This method is located in this file because it is possible that it is called before the autoloader is available.

Parameters

string $phpunit_version: The PHPUnit version string.

Return value

bool TRUE if the PHPUnit needs to be upgraded, FALSE if not.

1 call to Composer::upgradePHPUnitCheck()
Composer::upgradePHPUnit in core/lib/Drupal/Core/Composer/Composer.php
Fires the drupal-phpunit-upgrade script event if necessary.

File

core/lib/Drupal/Core/Composer/Composer.php, line 332

Class

Composer
Provides static functions for composer script events.

Namespace

Drupal\Core\Composer

Code

public static function upgradePHPUnitCheck($phpunit_version) {
  return !(version_compare(PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION, '7.4') >= 0 && version_compare($phpunit_version, '9.0') < 0);
}