diff --git a/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php b/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php index c0f4a194b8ac1a2af7eebfbf1a8df7969a06bbe9..0457458ebf17bb11e42b8f82dc61feba18e8edd5 100644 --- a/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php +++ b/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php @@ -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; diff --git a/core/modules/system/src/Tests/Common/SystemListingTest.php b/core/modules/system/src/Tests/Common/SystemListingTest.php index 7962e497e8f3d7981f2419b022164fdf8268d55f..4aac4ce8a2a8053c40a5774bd67e14fff9e6e29f 100644 --- a/core/modules/system/src/Tests/Common/SystemListingTest.php +++ b/core/modules/system/src/Tests/Common/SystemListingTest.php @@ -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( diff --git a/core/modules/system/tests/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info.yml b/core/modules/system/tests/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info.yml deleted file mode 100644 index a04828b4bef57c3b62e5d8e952d613cecafb1fb0..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info.yml +++ /dev/null @@ -1,6 +0,0 @@ -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 diff --git a/core/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info.yml b/core/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info.yml deleted file mode 100644 index 17bda6cfd015f42aa2df4139af75bc406eb99147..0000000000000000000000000000000000000000 --- a/core/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info.yml +++ /dev/null @@ -1,6 +0,0 @@ -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