Problem/Motivation

Services can be autowired. This avoids to define their arguments in two different files (the .services.yml file and the file for the service class definition) and any consequent issue caused by those files not being updated.

Proposed resolution

Replace the list of service arguments with autowire:true.
PHPStan could complain about not finding the classes for the required arguments. If that happens, the type-hinting for the constructor's arguments could need to be changed.

Issue fork examples-3583335

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

avpaderno created an issue. See original summary.

avpaderno’s picture

Status: Active » Needs review
avpaderno’s picture

Status: Needs review » Reviewed & tested by the community

avpaderno’s picture

Status: Reviewed & tested by the community » Fixed

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.

Status: Fixed » Closed (fixed)

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