Skip to content

Conversation

@driesvints
Copy link
Member

All other factory contracts return an implementation of a contract. I think the original reason why this was a concrete is because the MailManager's resolve method always returns a concrete implementation of Illuminate\Mail\Mailer. This is fine and while this technically means that the MailManager will always return an instance of Illuminate\Mail\Mailer it's probably best to loosen the implementation on the Factory contract to allow any implementation of a Mailer type. The Mail component should function perfectly fine with any mailer implementing this contract type.

No breaking change because only DocBlocks were edited and existing code will continue to work as is.

@GrahamCampbell
Copy link
Collaborator

Is this issue in 6.x too?

@driesvints
Copy link
Member Author

@GrahamCampbell not really an issue. More like a widening of the contract

@taylorotwell taylorotwell merged commit 65c8e0c into 8.x Mar 11, 2021
@taylorotwell taylorotwell deleted the mailer-contract branch March 11, 2021 23:04
driesvints added a commit that referenced this pull request Mar 12, 2021
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.

4 participants