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

[12.x] use promoted properties for Mail events #53852

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 6 additions & 20 deletions src/Illuminate/Mail/Events/MessageSending.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,16 @@

class MessageSending
{
/**
* The Symfony Email instance.
*
* @var \Symfony\Component\Mime\Email
*/
public $message;

/**
* The message data.
*
* @var array
*/
public $data;

/**
* Create a new event instance.
*
* @param \Symfony\Component\Mime\Email $message
* @param array $data
* @param \Symfony\Component\Mime\Email $message The Symfony Email instance.
* @param array $data The message data.
* @return void
*/
public function __construct(Email $message, array $data = [])
{
$this->data = $data;
$this->message = $message;
public function __construct(
public Email $message,
public array $data = [],
) {
}
}
26 changes: 6 additions & 20 deletions src/Illuminate/Mail/Events/MessageSent.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,17 @@
*/
class MessageSent
{
/**
* The message that was sent.
*
* @var \Illuminate\Mail\SentMessage
*/
public $sent;

/**
* The message data.
*
* @var array
*/
public $data;

/**
* Create a new event instance.
*
* @param \Illuminate\Mail\SentMessage $message
* @param array $data
* @param \Illuminate\Mail\SentMessage $sent The message that was sent.
* @param array $data The message data.
* @return void
*/
public function __construct(SentMessage $message, array $data = [])
{
$this->sent = $message;
$this->data = $data;
public function __construct(
public SentMessage $sent,
public array $data = [],
) {
}

/**
Expand Down
Loading