Skip to content

Conversation

@xabbuh
Copy link
Member

@xabbuh xabbuh commented Dec 12, 2025

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues part of #62669
License MIT

@xabbuh xabbuh force-pushed the issue-62669-mailer branch from b5dbe6a to 494fa91 Compare December 12, 2025 07:33
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

🎉 thanks for working on this!

Comment on lines 106 to 109
protected function getDispatcher(): EventDispatcherInterface
{
return $this->dispatcher ??= $this->createMock(EventDispatcherInterface::class);
return $this->dispatcher ??= new EventDispatcher();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

What was the use case of those protected method ?

Cause if someone did

$this->getDispatcher->expect(self::once())->method('dispatch');

This won't work anymore (so could be called a BC break ?)

Copy link
Member Author

Choose a reason for hiding this comment

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

The return type of the method is EventDispatcherInterface. If you want still use a mock object, you can override the method.

@fabpot
Copy link
Member

fabpot commented Dec 14, 2025

Thank you @xabbuh.

@fabpot fabpot merged commit 41288f0 into symfony:6.4 Dec 14, 2025
12 checks passed
@xabbuh xabbuh deleted the issue-62669-mailer branch December 14, 2025 12:15
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.

6 participants