Change record status: 
Project: 
Introduced in branch: 
8.x
Description: 

Drupal\Core\Plugin\DefaultPluginManager has been added to unify and simplify plugin managers.

The default plugin manager inlines caching (which allows for more performant caching), altering, processing and defaults to use the ContainerFactory. Additionally, the necessary dependencies are injected.

This replaces caching/processing discovery decorators like CacheDecorator and ProcessDecorator.

Service definition.

  plugin.manager.archiver:
    class: Drupal\Core\Archiver\ArchiverManager
    parent: default_plugin_manager
/**
 * Archiver plugin manager.
 */
class ArchiverManager extends DefaultPluginManager {

  /**
   * Constructs a ArchiverManager object.
   *
   * @param \Traversable $namespaces
   *   An object that implements \Traversable which contains the root paths
   *   keyed by the corresponding namespace to look for plugin implementations.
   * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
   *   Cache backend instance to use.
   * @param \Drupal\Core\Language\LanguageManager $language_manager
   *   The language manager.
   * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
   *   The module handler to invoke the alter hook with.
   */
  public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, LanguageManager $language_manager, ModuleHandlerInterface $module_handler) {
    parent::__construct('Plugin/Archiver', $namespaces, $module_handler, 'Drupal\Core\Archiver\Annotation\Archiver');
    $this->alterInfo('archiver_info');
    $this->setCacheBackend($cache_backend, $language_manager, 'archiver_info_plugins');
  }
}

Note: The constructor signature of DefaultPluginManager (and subclasses) has since been altered further. See Plugin caching now not language dependent by default, include language in cache key as needed and Plugin factories check inheritance of plugins.

Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done