Modernize services: Add autowiring aliases, use autoconfigure, constructors, etc

Created on 29 August 2024, 7 months ago

Problem/Motivation

Similar to Modernize services: Add autowiring aliases, use autoconfigure, etc Fixed , and others.

Allow us to use services via autowiring in 10.1: https://www.drupal.org/node/3323122

The changes here simply do nothing for older versions of core.

Proposed resolution

Like core, and many other projects: 📌 Add aliases for autowiring Needs review 📌 Add service aliases for autowiring Fixed 📌 Create and utilise autowiring aliases for OpenID Connect Active Alias services for autowiring Active

Add the aliasing.

This is mostly useful for private projects right now, so we dont need to manually wire up service IDs.

Remaining tasks

Review.

User interface changes

None

API changes

Services changed, some methods finalised as they shouldnt be extended anyway, casing on service param names.

Autowiring aliases added.

Data model changes

None

Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

🇦🇺Australia dpi Perth, Australia

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

Merge Requests

Comments & Activities

  • Issue created by @dpi
  • Pipeline finished with Failed
    7 months ago
    Total: 166s
    #267875
  • Issue was unassigned.
  • Status changed to Needs review 7 months ago
  • 🇦🇺Australia dpi Perth, Australia
  • Pipeline finished with Failed
    7 months ago
    #267881
  • Pipeline finished with Failed
    7 months ago
    Total: 168s
    #267889
  • Pipeline finished with Failed
    7 months ago
    Total: 301s
    #267898
  • Pipeline finished with Failed
    7 months ago
    Total: 803s
    #267911
  • Pipeline finished with Failed
    7 months ago
    Total: 298s
    #267925
  • Pipeline finished with Failed
    7 months ago
    Total: 175s
    #267939
  • 🇦🇺Australia dpi Perth, Australia

    A variety of constructors + plugin factories made final.

    Anyone extending these services should use service decorators combined with setter injection.

    This allows Key to be more maintainable.

  • 🇦🇺Australia dpi Perth, Australia

    The "phpunit (max PHP version) " job for this is not passing.

    The latest "phpunit (max PHP version) " job on HEAD was passing, last run a month ago.

    Notably, the last run was on 10.3, this new run is now 11.

    Seems like my changes are unrelated.

    I've seen the printer class error on other projects.

  • First commit to issue fork.
  • 🇯🇵Japan ptmkenny

    I just rebased this MR to test against the latest changes.

    The dev branch GitLab CI (linked from the module page is passing, so this should pass too.

Production build 0.71.5 2024