DefaultPluginManager::__construct() $subdir parameter says it can be bool but that would probably crash

Created on 26 August 2025, 22 days ago

Problem/Motivation

The docs say:

   * @param string|bool $subdir
   *   The plugin's subdirectory, for example Plugin/views/filter.

but further down:

      elseif (isset($this->pluginDefinitionAttributeName)) {
        $discovery = new AttributeClassDiscovery($this->subdir, $this->namespaces, $this->pluginDefinitionAttributeName);
      }

and that class has:

  public function __construct(
    string $subdir,

So it looks like passing a boolean here will cause a type error with some plugin types.

Steps to reproduce

Proposed resolution

Figure out if a boolean still means anything here at all.
Fix the docs to remove it.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.0 🔥

Component

documentation

Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024