function Composer::upgradePHPUnitCheck
Same name in other branches
- 9 core/lib/Drupal/Core/Composer/Composer.php \Drupal\Core\Composer\Composer::upgradePHPUnitCheck()
- 8.9.x core/lib/Drupal/Core/Composer/Composer.php \Drupal\Core\Composer\Composer::upgradePHPUnitCheck()
- 11.x 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.
@internal
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 118
Class
- Composer
- Provides static functions for composer script events.
Namespace
Drupal\Core\ComposerCode
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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.