diff --git a/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php b/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php index dee9f26..6753135 100644 --- a/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php +++ b/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php @@ -89,7 +89,7 @@ public static function getPluginClass($plugin_id, $plugin_definition = NULL, $re } if ($required_interface && !is_subclass_of($plugin_definition['class'], $required_interface)) { - throw new PluginException(sprintf('Plugin "%s" (%s) in %s should implement interface %s.', $plugin_id, $plugin_definition['class'], $plugin_definition['provider'], is_array($required_interface) ? implode(', ', $required_interface) : $required_interface)); + throw new PluginException(sprintf('Plugin "%s" (%s) in %s should implement interface %s.', $plugin_id, $plugin_definition['class'], $plugin_definition['provider'], $required_interface)); } return $class; diff --git a/core/lib/Drupal/Core/Archiver/ArchiverManager.php b/core/lib/Drupal/Core/Archiver/ArchiverManager.php index a457a1f..b8ac88c 100644 --- a/core/lib/Drupal/Core/Archiver/ArchiverManager.php +++ b/core/lib/Drupal/Core/Archiver/ArchiverManager.php @@ -33,7 +33,7 @@ class ArchiverManager extends DefaultPluginManager { * The module handler to invoke the alter hook with. */ public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) { - parent::__construct('Plugin/Archiver', $namespaces, $module_handler, 'Drupal\Core\Archiver\Annotation\Archiver'); + parent::__construct('Plugin/Archiver', $namespaces, $module_handler, 'Drupal\Core\Archiver\ArchiverInterface', 'Drupal\Core\Archiver\Annotation\Archiver'); $this->alterInfo('archiver_info'); $this->setCacheBackend($cache_backend, 'archiver_info_plugins'); } diff --git a/core/tests/Drupal/Tests/Component/Plugin/DefaultFactoryTest.php b/core/tests/Drupal/Tests/Component/Plugin/DefaultFactoryTest.php index ed53798..21dcf7c 100644 --- a/core/tests/Drupal/Tests/Component/Plugin/DefaultFactoryTest.php +++ b/core/tests/Drupal/Tests/Component/Plugin/DefaultFactoryTest.php @@ -17,8 +17,6 @@ class DefaultFactoryTest extends UnitTestCase { /** * Tests getPluginClass() with a valid plugin. - * - * @covers ::getPluginClass */ public function testGetPluginClassWithValidPlugin() { $plugin_class = 'Drupal\plugin_test\Plugin\plugin_test\fruit\Cherry'; @@ -30,8 +28,6 @@ public function testGetPluginClassWithValidPlugin() { /** * Tests getPluginClass() with a missing class definition. * - * @covers ::getPluginClass - * * @expectedException \Drupal\Component\Plugin\Exception\PluginException * @expectedExceptionMessage The plugin (cherry) did not specify an instance class. */ @@ -42,8 +38,6 @@ public function testGetPluginClassWithMissingClass() { /** * Tests getPluginClass() with a not existing class definition. * - * @covers ::getPluginClass - * * @expectedException \Drupal\Component\Plugin\Exception\PluginException * @expectedExceptionMessage Plugin (kiwifruit) instance class "\Drupal\plugin_test\Plugin\plugin_test\fruit\Kiwifruit" does not exist. */ @@ -53,8 +47,6 @@ public function testGetPluginClassWithNotExistingClass() { /** * Tests getPluginClass() with a required interface. - * - * @covers ::getPluginClass */ public function testGetPluginClassWithInterface() { $plugin_class = 'Drupal\plugin_test\Plugin\plugin_test\fruit\Cherry'; @@ -66,8 +58,6 @@ public function testGetPluginClassWithInterface() { /** * Tests getPluginClass() with a required interface but no implementation. * - * @covers ::getPluginClass - * * @expectedException \Drupal\Component\Plugin\Exception\PluginException * @expectedExceptionMessage Plugin "cherry" (Drupal\plugin_test\Plugin\plugin_test\fruit\Kale) in core should implement interface \Drupal\plugin_test\Plugin\plugin_test\fruit\FruitInterface. */