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

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

RenatoG created an issue. See original summary.

renatog’s picture

Status: Active » Needs review
greg boggs’s picture

Status: Needs review » Needs work

This needs a rebase because I merged 4.

renatog’s picture

Status: Needs work » Needs review

prudloff made their first commit to this issue’s fork.

prudloff’s picture

Status: Needs review » Needs work

liam morland made their first commit to this issue’s fork.

liam morland’s picture

Status: Needs work » Needs review
liam morland’s picture

All checks are now passing.

prudloff’s picture

Status: Needs review » Fixed

The 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.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • prudloff committed 8d2578ba on 8.x-1.x authored by renatog
    feat: #3333996 Use dependency Injection instead of Drupal call directly...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.