Problem/Motivation

There's a lot of code that has access to the container that uses the \Drupal static class or procedural functions to access stuff that has a service equivalent. This seems like a good step to prepare the codebase for #3165795: PWA module 3.x roadmap.

Steps to reproduce

Apply eyeballs to code.

Proposed resolution

Rewrite everything that has access to the container to inject dependencies wherever possible.

Remaining tasks

I'm going to create a branch and then open a merge request with a lot of the changes since I enjoy this kind of work.

User interface changes

None.

API changes

Does changing the constructor count as API changes?

Data model changes

See previous heading.

Issue fork pwa-3240962

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

Ambient.Impact created an issue. See original summary.

ambient.impact’s picture

Adding related issue #3165795: PWA module 3.x roadmap because I forgot to.

ambient.impact’s picture

Status: Active » Needs review

I've pushed a commit with the bulk of the changes so could use some feedback and testing to make sure I didn't break anything.

alexborsody’s picture

Testing this today. Then need to reroll and merge.

ambient.impact’s picture

I appreciate it. I'm guessing the merge error is in pwa.serv‎ices.yml‎ as both this merge request and another change the arguments key for the pwa.manifest service from a single line array to a multi line one and Git gets confused.

alexborsody’s picture

Version: 2.x-dev » 8.x-1.x-dev
ambient.impact’s picture

@AlexBorsody I've rebased my local repository to 8.x-1.x - do you want me to push that to the existing merge request branch or do you want me to create another branch?

Edit: nevermind, created a new branch and opened a second merge request for 8.x-1.x

alexborsody’s picture

Yeah I was thinking we could stay on this branch, reviewing today and want to merge ASAP, looks great.

ambient.impact’s picture

@AlexBorsody Alright, sounds good. Also, I totally forgot to integrate the latest commits to the issue fork's 8.x-1.x branch so I rebased and force pushed. Whoops.

alexborsody’s picture

Status: Needs review » Fixed
alexborsody’s picture

Status: Fixed » Closed (fixed)
ambient.impact’s picture

Excellent, thanks!

ambient.impact’s picture

ambient.impact’s picture