When the plugin system first went in, we converted aggregator.module as an example, and decided that the FetcherManager class should be in Drupal\aggregator\Plugin\FetcherManager, not Drupal\aggregator\Plugin\Type\FetcherManager.

Views currently has some manager classes in Drupal\views\Plugin\Type\, but in other issues, tim.plunkett indicated a willingness to move them up a level.

Field currently provides several supporting classes for formatters and widgets, and so provides a subnamespace for each: Drupal\field\Plugin\Type\Formatter\* and Drupal\field\Plugin\Type\Widget\*.

Do we want to standardize on whether to:
- always use Type,
- never use Type,
- or only use Type when wanting to have subnamespaces within it?

Comments

sun’s picture

Title: Should any/some/all plugin manager classes live in a Type subnamespace? » Move plugin manager classes out of \Type sub-namespace

Yeah, this is terribly confusing.

Let's move them out of the \Type subnamespace.

effulgentsia’s picture

How should we handle the field.module case, where multiple types are provided, and each one comes with enough supporting classes in addition to the manager to warrant separate directories?

I'm concerned about having Drupal\field\Plugin\Formatter\FormatterPluginManager, because of possible confusion with the other convention that plugins (rather than plugin managers) live in subnamespaces of Plugin.

I wonder if for plugin managers, interfaces, custom factories, etc., if we want to drop the Plugin part entirely, and just have Drupal\field\Formatter\FormatterPluginManager, reserving the Plugin subnamespace for the plugins themselves only.

Wim Leers’s picture

Note that some modules put the manager class in the Drupal\moduleName namespace too. I.e. there are essentially three cases, not two:

  1. Drupal\moduleName (e.g. ban.module)
  2. Drupal\moduleName\Plugin (e.g. edit.module)
  3. Drupal\moduleName\Plugin\Type (e.g. block.module)

I wonder if for plugin managers, interfaces, custom factories, etc., if we want to drop the Plugin part entirely, and just have Drupal\field\Formatter\FormatterPluginManager, reserving the Plugin subnamespace for the plugins themselves only.

+1

I was going to post exactly that here. Then the purpose is of that directory is always clear, and it's very clear where you look for plugin implementations. Everything else sits at Drupal\moduleName then.

sun’s picture

Yeah, sorry, I thought of exactly the same.

That is, however, *cough*, only unless #1847002: Move entity type classes from Drupal\$provider\Plugin\Core\Entity to Drupal\$provider\Entity won't happen full-frontal. If that issue will happen in its entirety, then the actual plugin type implementations will be relocated like this:

- Drupal\foo\Plugin\pluginOwner\pluginType\FooPlugin
+ Drupal\foo\pluginOwner\pluginType\FooPlugin

In turn, that opens up the \Plugin namespace of its own. And alas, plugin managers are integrating with the Plugin service, so they should be located accordingly.

As a result, there are two possible directions here, depending on aforementioned issue:

- Current:       Drupal\foo\Plugin\Type\FooPluginManager
+ w/o #1847002:  Drupal\foo\FooPluginManager
+ w/  #1847002:  Drupal\foo\Plugin\FooPluginManager

For now, I'd recommend to simply move them out of \Type. So much is clear.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.