-
Notifications
You must be signed in to change notification settings - Fork 30
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
Allow to specify CC and BCC in sender #152
Allow to specify CC and BCC in sender #152
Conversation
5f33e3f
to
acec554
Compare
@@ -59,6 +67,23 @@ public function send(string $code, array $recipients, array $data = [], array $a | |||
|
|||
$renderedEmail = $this->rendererAdapter->render($email, $data); | |||
|
|||
if (count($arguments) > 5 && $this->senderAdapter instanceof CcAwareAdapterInterface) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if we shouldn't cover the case, where someone is giving more than 5 arguments, but the sender is not CcAwareAdapterInterface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If someone is giving more than 5 arguments and it's not CCAware...
then it's fulfilling a different contract and should be customized nevertheless... I think so :D
acec554
to
8b9adbd
Compare
Thank you, Mateusz! 🎉 |
This PR is based on #11, fixed, rebased and improved 🖖 My biggest concern is a
Sender
- I wanted to avoid adding another interface (as I did withAdapterInterface
), so I made some shenanigans with arguments counting... but I'm not convinced it's the best choice 🤷♂️ Still, BC breaks-free for sure.It would be great to merge it before 1.8 release 🚀