Commit f584be98 authored by catch's avatar catch

Issue #2209293 by sun, xjm: Remove core compatibility check in...

Issue #2209293 by sun, xjm: Remove core compatibility check in ExtensionDiscovery; obsolete with Migrate in core.
parent d588153a
......@@ -275,18 +275,7 @@ protected function process(array $all_files) {
$files = array();
// Duplicate files found in later search directories take precedence over
// earlier ones; they replace the extension in the existing $files array.
// The exception to this is if the later extension is not compatible with
// the current version of Drupal core, which may occur during upgrades when
// e.g. new modules were introduced in core while older contrib modules with
// the same name still exist in a later search path.
foreach ($all_files as $file) {
if (isset($files[$file->getName()])) {
// Skip the extension if it is incompatible with Drupal core.
$info = $this->getInfoParser()->parse($file->getPathname());
if (!isset($info['core']) || $info['core'] != \Drupal::CORE_COMPATIBILITY) {
continue;
}
}
$files[$file->getName()] = $file;
}
return $files;
......
......@@ -29,13 +29,6 @@ function testDirectoryPrecedence() {
// Define the module files we will search for, and the directory precedence
// we expect.
$expected_directories = array(
// When the copy of the module in the profile directory is incompatible
// with Drupal core, the copy in the core modules directory takes
// precedence.
'drupal_system_listing_incompatible_test' => array(
'core/modules/system/tests/modules',
'core/profiles/testing/modules',
),
// When both copies of the module are compatible with Drupal core, the
// copy in the profile directory takes precedence.
'drupal_system_listing_compatible_test' => array(
......
name: 'Drupal system listing incompatible test'
type: module
description: 'Support module for testing the drupal_system_listing function.'
package: Testing
version: VERSION
core: 8.x
name: 'Drupal system listing incompatible test'
type: module
description: 'Support module for testing the drupal_system_listing function.'
package: Testing
version: VERSION
core: 6.x
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment