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

NotificationMailSenderConfig - remove redundant [ 'from' ] key #1884

Merged

Conversation

mho22
Copy link
Contributor

@mho22 mho22 commented Feb 1, 2025

Based on issue #1866

Since NotificationMailSenderConfig::fromArray is called in NotificationMailConfig.php on line 33 :

 return new self(
      to: $data['to'],
      from: NotificationMailSenderConfig::fromArray($data['from'] ?? []),
 ); 

with $data['from'], from shouldn't be reached again in NotificationMailSenderConfig on line 18 and 30 :

- $address = $data['from']['address'] ?? config('mail.from.address');
+ $address = $data['address'] ?? config('mail.from.address');
...
- name: $data['from']['name'] ?? config('mail.from.name'),
+ name: $data['name'] ?? config('mail.from.name'),

…ilSenderConfig while no from key should exist
@freekmurze freekmurze merged commit 10df066 into spatie:main Feb 3, 2025
1 check passed
@freekmurze
Copy link
Member

Thanks!

@mho22 mho22 deleted the notification-mail-sender-config-from-key-patch branch February 3, 2025 09:11
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.

2 participants