Problem/Motivation

Many REST resources in src/Plugin/rest/resource use \Drupal::service() (e.g., for date.formatter) instead of proper dependency injection.

Proposed resolution

  • Refactor MyrestResourceBase to support common services via DI.
  • Update individual resource plugins to use create() method and inject required services.

Remaining tasks

Review all 40+ resource plugins and refactor them to use DI.

Issue fork myrest-3582967

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’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)