Skip to content
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

[5.3] Fix error when calling MailFake::send in mailables with dependencies #16918

Merged
merged 1 commit into from
Dec 22, 2016

Conversation

sileence
Copy link
Contributor

If the mailable has a dependency in the build method (i.e.: public function build(AuthManager $authManager)

Then calling: Mail::fake() and then Mail::send(new MailableClassHere) throws an exception.

This fixes the problem.

However it's worth mentioning that Mail::to($someone)->send(new MailableClassHere) works because the build method is not called in that case.

@taylorotwell taylorotwell merged commit 2931e2a into laravel:5.3 Dec 22, 2016
@GrahamCampbell GrahamCampbell changed the title Fix error when calling MailFake::send in mailables with dependencies [5.3] Fix error when calling MailFake::send in mailables with dependencies Dec 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants