Problem/Motivation

The base class of every resource takes a helper of the metatag companion module, declares a property for it, assigns it — and never reads it. The integration itself was inverted long ago: metatags reach a response through a documented interface and a service tag, and any module can contribute them without this module knowing its name.

What is left is a type hint on a class of a module that declares a dependency on this one. That is a cycle, it is the only one left in the core, and it exists for a value nothing reads.

Proposed resolution

  • Remove the constructor parameter, the property, the assignment and the import.
  • Say in the change record that a subclass building the parent positionally has one argument fewer. Every subclass known to the maintainers calls parent::create() and is unaffected, but the class is public API and this is a signature change.
  • Leave the entity type lookup alone: asking for the metatag entity storage through hasDefinition() names an entity type, not a class, and degrades correctly.

Remaining tasks

Everything.

Issue fork myrest-3619424

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sergeydruua created an issue. See original summary.

  • sergeydruua committed 6625a648 on 1.0.x
    Issue #3619424: Drop the metatag helper the base class never uses
    
sergeydruua’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

sergeydruua’s picture

Status: Fixed » Closed (fixed)