Skip to content

PluginManagerSetsCacheBackendRule is currently too strict. #598

Open
@Boegie

Description

@Boegie

Feature request

Torn between a bug report or a feature request, but the latter sounds more friendly...

After the excellent work #592 landed in 1.1.37, we looked at dropping the ignore for the Missing cache backend declaration for performance. in Drupal core in https://www.drupal.org/project/drupal/issues/3320569.

As it turns out, for that the current rule is a tad too strict.

In https://www.drupal.org/project/drupal/issues/3377000#comment-15167041 I tried to boil down the requirements:

We want setCacheBackend() in every plugin class __construct(), unless:

  • it's the base class, where we define the base class as being the class that has the implementation of setCacheBackend().
  • it's a test class.
  • it has a parent that already has a setCacheBackend() in it's __construct().

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions