Problem/Motivation
This is a recommendation from best practice to use DI instead of Drupal:: directly for Request
\Drupal calls should be avoided in classes, use dependency injection instead
Steps to reproduce
Proposed resolution
Create the constructor and receive this class and apply dependency injection to this
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork current_page_crumb-3333996
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 #3
renatog commentedDone! MR created and is ready to be merged: https://git.drupalcode.org/project/current_page_crumb/-/merge_requests/5
Comment #4
greg boggsThis needs a rebase because I merged 4.
Comment #5
renatog commentedMR rebased.
Now is mergeable: https://git.drupalcode.org/project/current_page_crumb/-/merge_requests/5...
Comment #7
prudloff commentedphpcs reports a problem: https://git.drupalcode.org/project/current_page_crumb/-/jobs/4559870
Comment #9
liam morlandComment #10
liam morlandAll checks are now passing.
Comment #11
prudloff commentedThe constructor of a service is considered internal (https://www.drupal.org/about/core/policies/core-change-policies/bc-polic...) and could change in the future. So I used composition instead of extending PathBasedBreadcrumbBuilder.