Problem/Motivation

Currently verify_email.verify_email_repository and verify_email.verifier have arguments specified in the service definition. They also don't alias their interfaces, so can't be autowired by other classes.

Steps to reproduce

N/A

Proposed resolution

Redefine the services in verify_email.services.yml to enable autowiring.

Remaining tasks

For both of the above services, make the following changes to verify_email.services.yml:

  1. Insert a new service definition for each based on the class name. This can be defined to use autoconfigure, so can be a null definition. E.g. Drupal\verify_email\Service\VerifyEmailRepository: ~.
  2. Add an alias for each of them to the interface name. E.g. Drupal\verify_email\Service\VerifyEmailRepositoryInterface: '@Drupal\verify_email\Service\VerifyEmailRepository'.
  3. Finally, convert the old service ID to an additional alias. E.g. verify_email.verify_email_repository: '@Drupal\verify_email\Service\VerifyEmailRepository'
  4. Delete the class and arguments lines from the old definitions, as they are no longer needed.

User interface changes

None

API changes

None

Data model changes

None

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

lostcarpark created an issue. See original summary.

ritarshi_chakraborty’s picture

Assigned: Unassigned » ritarshi_chakraborty

Working on it.

ritarshi_chakraborty’s picture

Assigned: ritarshi_chakraborty » Unassigned
Status: Active » Needs review

Please review my MR.

lostcarpark’s picture

Status: Needs review » Needs work

Thank you for your work on this.

Everything is technically correct. I would just like the aliases grouped with the service they are aliasing for clarity.

Please reorder, so that the service definition is followed by all aliases of that service. There is no need for a blank line between the service and its aliases, just between each distinct group.

Should be a simple change, then ready to merge.

ritarshi_chakraborty’s picture

Status: Needs work » Needs review

I've made the requested changes. Let me know if there's anything else you'd like to adjust!

lostcarpark’s picture

Status: Needs review » Reviewed & tested by the community

I have reviewed and the change looks perfect. I've also run the tests locally and done some manual testing.

Moving to RTBC.

lostcarpark’s picture

Change merged successfully. Thanks for working on this @ritarshi_chakraborty.

Please review the contribution record. If you would like to attribute credit to an organisation, you should select them there. If not, you should tick the "I am volunteering my time" box. You can also set a default for future contribution.

lostcarpark’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.