diff --git a/core/lib/Drupal/Component/Plugin/PluginManagerInterface.php b/core/lib/Drupal/Component/Plugin/PluginManagerInterface.php index 803682a..8a46834 100644 --- a/core/lib/Drupal/Component/Plugin/PluginManagerInterface.php +++ b/core/lib/Drupal/Component/Plugin/PluginManagerInterface.php @@ -8,7 +8,6 @@ use Drupal\Component\Plugin\Discovery\DiscoveryInterface; use Drupal\Component\Plugin\Factory\FactoryInterface; -use Drupal\Component\Plugin\Mapper\MapperInterface; /** * Interface implemented by plugin managers. @@ -29,5 +28,5 @@ * * @ingroup plugin_api */ -interface PluginManagerInterface extends DiscoveryInterface, FactoryInterface, MapperInterface { +interface PluginManagerInterface extends DiscoveryInterface, FactoryInterface { } diff --git a/core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginManagerInterface.php b/core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginManagerInterface.php index a318611..d48ee08 100644 --- a/core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginManagerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginManagerInterface.php @@ -7,6 +7,7 @@ namespace Drupal\Core\Entity\EntityReferenceSelection; +use Drupal\Component\Plugin\Mapper\MapperInterface; use Drupal\Component\Plugin\PluginManagerInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Field\FieldDefinitionInterface; @@ -14,7 +15,7 @@ /** * Defines an interface for the entity reference selection plugin manager. */ -interface SelectionPluginManagerInterface extends PluginManagerInterface { +interface SelectionPluginManagerInterface extends PluginManagerInterface, MapperInterface { /** * Gets the plugin ID for a given target entity type and base plugin ID. diff --git a/core/lib/Drupal/Core/Field/FormatterPluginManager.php b/core/lib/Drupal/Core/Field/FormatterPluginManager.php index e6054a9..414ac25 100644 --- a/core/lib/Drupal/Core/Field/FormatterPluginManager.php +++ b/core/lib/Drupal/Core/Field/FormatterPluginManager.php @@ -17,7 +17,7 @@ * * @ingroup field_formatter */ -class FormatterPluginManager extends DefaultPluginManager { +class FormatterPluginManager extends DefaultPluginManager implements FormatterPluginManagerInterface { /** * An array of formatter options for each field type. diff --git a/core/lib/Drupal/Core/Field/FormatterPluginManagerInterface.php b/core/lib/Drupal/Core/Field/FormatterPluginManagerInterface.php new file mode 100644 index 0000000..2bef39b --- /dev/null +++ b/core/lib/Drupal/Core/Field/FormatterPluginManagerInterface.php @@ -0,0 +1,19 @@ +restPluginManager = $rest_plugin_manager; $this->configFactory = $config_factory; } diff --git a/core/modules/rest/src/Routing/ResourceRoutes.php b/core/modules/rest/src/Routing/ResourceRoutes.php index f975f27..099b9cd 100644 --- a/core/modules/rest/src/Routing/ResourceRoutes.php +++ b/core/modules/rest/src/Routing/ResourceRoutes.php @@ -10,7 +10,7 @@ use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\DependencyInjection\ContainerInjectionInterface; use Drupal\Core\Routing\RouteSubscriberBase; -use Drupal\rest\Plugin\Type\ResourcePluginManager; +use Drupal\rest\Plugin\Type\ResourcePluginManagerInterface; use Psr\Log\LoggerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; @@ -24,7 +24,7 @@ class ResourceRoutes extends RouteSubscriberBase { /** * The plugin manager for REST plugins. * - * @var \Drupal\rest\Plugin\Type\ResourcePluginManager + * @var \Drupal\rest\Plugin\Type\ResourcePluginManagerInterface */ protected $manager; @@ -45,14 +45,14 @@ class ResourceRoutes extends RouteSubscriberBase { /** * Constructs a RouteSubscriber object. * - * @param \Drupal\rest\Plugin\Type\ResourcePluginManager $manager + * @param \Drupal\rest\Plugin\Type\ResourcePluginManagerInterface $manager * The resource plugin manager. * @param \Drupal\Core\Config\ConfigFactoryInterface $config * The configuration factory holding resource settings. * @param \Psr\Log\LoggerInterface $logger * A logger instance. */ - public function __construct(ResourcePluginManager $manager, ConfigFactoryInterface $config, LoggerInterface $logger) { + public function __construct(ResourcePluginManagerInterface $manager, ConfigFactoryInterface $config, LoggerInterface $logger) { $this->manager = $manager; $this->config = $config; $this->logger = $logger;