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:
- 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: ~. - Add an alias for each of them to the interface name. E.g.
Drupal\verify_email\Service\VerifyEmailRepositoryInterface: '@Drupal\verify_email\Service\VerifyEmailRepository'. - Finally, convert the old service ID to an additional alias. E.g.
verify_email.verify_email_repository: '@Drupal\verify_email\Service\VerifyEmailRepository' - Delete the
classandargumentslines from the old definitions, as they are no longer needed.
User interface changes
None
API changes
None
Data model changes
None
Issue fork verify_email-3554391
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
ritarshi_chakraborty commentedWorking on it.
Comment #4
ritarshi_chakraborty commentedPlease review my MR.
Comment #5
lostcarpark commentedThank 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.
Comment #6
ritarshi_chakraborty commentedI've made the requested changes. Let me know if there's anything else you'd like to adjust!
Comment #7
lostcarpark commentedI have reviewed and the change looks perfect. I've also run the tests locally and done some manual testing.
Moving to RTBC.
Comment #9
lostcarpark commentedChange 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.
Comment #10
lostcarpark commented