Problem/Motivation

\Drupal\Component\Plugin\Factory\FactoryInterface does not document andy @throws for createInstance(), yet \Drupal\Component\Plugin\Factory\DefaultFactory will throw a \Drupal\Component\Plugin\Exception\PluginException for an invalid plugin ID or definition.

Proposed resolution

Add @throws to the interface documentation

CommentFileSizeAuthor
#3 2261391-2.patch1.2 KBpwolanin
#1 2261391-1.patch1.07 KBpwolanin
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pwolanin’s picture

Status: Active » Needs review
FileSize
1.07 KB

Simple doc patch. Also fixes the @file text.

Crell’s picture

+++ b/core/lib/Drupal/Component/Plugin/Factory/FactoryInterface.php
@@ -21,6 +21,9 @@
+   *   If the plugin ID or the corresponding plugin definition is invalid.

"are invalid", I think?

pwolanin’s picture

FileSize
1.2 KB

reworded and made capitalization consistent.

Crell’s picture

Status: Needs review » Reviewed & tested by the community

I can't see the bot objecting...

  • Commit 4e42a5b on 8.x by jhodgdon:
    Issue #2261391 by pwolanin, Crell: Fix up throws and other docs for...
jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks! Committed to 8.x.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.