function ExtensionList::checkIncompatibility

Same name in other branches
  1. 9 core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::checkIncompatibility()
  2. 8.9.x core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::checkIncompatibility()
  3. 11.x core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::checkIncompatibility()

Tests the compatibility of an extension.

Parameters

string $name: The extension name to check.

Return value

bool TRUE if the extension is incompatible and FALSE if not.

Throws

\Drupal\Core\Extension\Exception\UnknownExtensionException If there is no extension with the supplied name.

1 method overrides ExtensionList::checkIncompatibility()
DatabaseDriverList::checkIncompatibility in core/lib/Drupal/Core/Extension/DatabaseDriverList.php
Tests the compatibility of an extension.

File

core/lib/Drupal/Core/Extension/ExtensionList.php, line 580

Class

ExtensionList
Provides available extensions.

Namespace

Drupal\Core\Extension

Code

public function checkIncompatibility($name) {
    $extension = $this->get($name);
    return $extension->info['core_incompatible'] || isset($extension->info['php']) && version_compare(phpversion(), $extension->info['php']) < 0;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.