Skip to content

[Messenger] use ServicesResetterInterface instead of concrete ServicesResetter in ResetServicesListener #60999

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 7.4
Choose a base branch
from

Conversation

santysisi
Copy link
Contributor

@santysisi santysisi commented Jul 1, 2025

Q A
Branch? 7.4
Bug fix? no
New feature? yes
Deprecations? no
Issues no
License MIT

Summary

This PR updates the ResetServicesListener to depend on the ServicesResetterInterface instead of the concrete ServicesResetter class.

@santysisi santysisi requested a review from welcoMattic as a code owner July 1, 2025 00:19
@carsonbot carsonbot added this to the 8.0 milestone Jul 1, 2025
@santysisi santysisi force-pushed the refactor/use-interface-in-reset-services-listener branch from c0f0ae3 to aa6fb3b Compare July 1, 2025 00:28
@santysisi
Copy link
Contributor Author

santysisi commented Jul 1, 2025

Hi 👋 I hope you're all doing well!

I think this kind of change is acceptable in a new major version (like now), but if I'm mistaken, I'm happy to update the PR.

@xabbuh
Copy link
Member

xabbuh commented Jul 1, 2025

The change itself looks reasonable to me, but that's a new feature and we should merge it into the 7.4 branch (to fix the failing tests on the 8.0 branch I opened #61003.

@xabbuh xabbuh modified the milestones: 8.0, 7.4 Jul 1, 2025
@xabbuh xabbuh removed the Bug label Jul 1, 2025
@@ -31,7 +32,8 @@ public static function provideResetServices(): iterable
*/
public function testResetServices(bool $shouldReset)
{
$servicesResetter = $this->createMock(ServicesResetter::class);
/** @var ServicesResetterInterface&MockObject $servicesResetter */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this @var is not necessary. $this->createMock already has this as return type.

@santysisi santysisi force-pushed the refactor/use-interface-in-reset-services-listener branch from 814a6d8 to a240e9a Compare July 1, 2025 12:32
@santysisi santysisi force-pushed the refactor/use-interface-in-reset-services-listener branch from a240e9a to 83714d6 Compare July 1, 2025 12:34
@santysisi santysisi changed the base branch from 8.0 to 7.4 July 1, 2025 12:35
@santysisi
Copy link
Contributor Author

Hi 👋 I hope you're all doing well!
I've updated the PR with your suggestions, please let me know if there's anything else I should change. ❤️

8.0
---

* Use `ServicesResetterInterface` instead of concrete `ServicesResetter` in `ResetServicesListener`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Use `ServicesResetterInterface` instead of concrete `ServicesResetter` in `ResetServicesListener`
* Allow any `ServiceResetterInterface` implementation in `ResetServicesListener`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants