function drush_extension_check_incompatibility

8.0.x environment.inc drush_extension_check_incompatibility($file)
6.x environment.inc drush_extension_check_incompatibility($file)
7.x environment.inc drush_extension_check_incompatibility($file)
4.x environment.inc drush_extension_check_incompatibility($file)
5.x environment.inc drush_extension_check_incompatibility($file)
master environment.inc drush_extension_check_incompatibility($file)

Test compatibility of a extension with version of drupal core and php.

Parameters

$file Extension object as returned by system_rebuild_module_data().:

Return value

FALSE if the extension is compatible.

1 call to drush_extension_check_incompatibility()
drush_pm_enable_validate in commands/pm/pm.drush.inc
Validate callback. Determine the modules and themes that the user would like enabled.

File

includes/environment.inc, line 779
Functions used by drush to query the environment and setting the current configuration.

Code

function drush_extension_check_incompatibility($file) {
  if (!isset($file->info['core']) || $file->info['core'] != drush_get_drupal_core_compatibility()) {
    return 'Drupal';
  }
  if (version_compare(phpversion(), $file->info['php']) < 0) {
    return 'PHP';
  }
  return FALSE;
}