Problem/Motivation
I saw a @todo tag on the LibraryDefinitionsStream class to make dependency injection.
Steps to reproduce
Simply check line 46 on /libraries/src/StreamWrapper/LibraryDefinitionsStream.php
Proposed resolution
Use the "create" function and the other necessary elements to follow Drupal pattern of dependency injection
https://www.hashbangcode.com/article/drupal-9-introduction-services-and-...
https://drupalize.me/topic/dependency-injection
Remaining tasks
Review patch
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3256984-2.patch | 1.21 KB | andregp |
Issue fork libraries-3256984
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
andregp commentedHere is a patch.
Comment #3
tmaiochi commentedComment #4
tmaiochi commentedSteps performed:
(1) Installed module
(2) Reproduced the issue.
(3) Applied patch.
(4) Code review on changes.
(5) Tested again with patch, issue resolved.
The patch applied correctly dependency injection, and everything work well.
Comment #8
joseph.olstadGreat work everyone above, thank you!
Comment #9
joseph.olstad