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
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
Comment #2
ambient.impactAdding related issue #3165795: PWA module 3.x roadmap because I forgot to.
Comment #3
ambient.impactI'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.
Comment #5
alexborsody commentedTesting this today. Then need to reroll and merge.
Comment #6
ambient.impactI appreciate it. I'm guessing the merge error is in
pwa.services.ymlas both this merge request and another change theargumentskey for thepwa.manifestservice from a single line array to a multi line one and Git gets confused.Comment #7
alexborsody commentedComment #8
ambient.impact@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
Comment #10
alexborsody commentedYeah I was thinking we could stay on this branch, reviewing today and want to merge ASAP, looks great.
Comment #11
ambient.impact@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.
Comment #12
alexborsody commentedComment #13
alexborsody commentedComment #14
ambient.impactExcellent, thanks!
Comment #21
ambient.impactAdding credit from #3131591: Drupal 9 deprecated code report
Comment #28
ambient.impact