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

Breadcrumb

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

function 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 117

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);
}
RSS feed
Powered by Drupal