reverted: --- b/core/lib/Drupal/Core/Annotation/DirectoryIterator.php +++ /dev/null @@ -1,27 +0,0 @@ -getFilename()); - return array_pop($parts); - } - -} diff -u b/core/lib/Drupal/Core/Plugin/Discovery/AnnotatedClassDiscovery.php b/core/lib/Drupal/Core/Plugin/Discovery/AnnotatedClassDiscovery.php --- b/core/lib/Drupal/Core/Plugin/Discovery/AnnotatedClassDiscovery.php +++ b/core/lib/Drupal/Core/Plugin/Discovery/AnnotatedClassDiscovery.php @@ -7,9 +7,9 @@ namespace Drupal\Core\Plugin\Discovery; +use DirectoryIterator; use Drupal\Component\Plugin\Discovery\DiscoveryInterface; use Drupal\Component\Reflection\MockFileFinder; -use Drupal\Core\Annotation\DirectoryIterator; use Drupal\Core\Annotation\Plugin; use Doctrine\Common\Annotations\AnnotationReader; use Doctrine\Common\Annotations\AnnotationRegistry; @@ -57,7 +57,9 @@ if (file_exists($dir)) { $directories = new DirectoryIterator($dir); foreach ($directories as $fileinfo) { - if ($fileinfo->getExtension() == 'php') { + // @TODO: Once core requires 5.3.6 use $fileiinfo->getExtension() + // instead. + if (pathinfo($fileinfo->getFilename(), PATHINFO_EXTENSION) == 'php') { $class = str_replace(DIRECTORY_SEPARATOR, '\\', "$prefix/". $fileinfo->getBasename('.php')); // The file name is already known so no need to find the file, // but StaticReflectionParser needs one so use a mock version. diff -u b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/FetcherManager.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/FetcherManager.php --- b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/FetcherManager.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/FetcherManager.php @@ -8,8 +8,9 @@ namespace Drupal\aggregator\Plugin; use Drupal\Component\Plugin\PluginManagerBase; -use Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery; use Drupal\Component\Plugin\Factory\DefaultFactory; +use Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery; +use Drupal\Core\Plugin\Discovery\CacheDecorator; /** * Manages aggregator fetcher plugins. @@ -17,7 +18,7 @@ class FetcherManager extends PluginManagerBase { public function __construct() { - $this->discovery = new AnnotatedClassDiscovery('aggregator', 'fetcher'); + $this->discovery = new CacheDecorator(new AnnotatedClassDiscovery('aggregator', 'fetcher'), 'aggregator:fetcher', 'plugin'); $this->factory = new DefaultFactory($this->discovery); } } only in patch2: unchanged: --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -3367,7 +3367,7 @@ function system_cron() { } } - $cache_bins = array_merge(module_invoke_all('cache_flush'), array('form', 'menu')); + $cache_bins = array_merge(module_invoke_all('cache_flush'), array('form', 'menu', 'plugin')); foreach ($cache_bins as $bin) { cache($bin)->expire(); }