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

TypeError in laravel-backup 9.2.0 when mail.to config is null #1868

Open
andreasnij opened this issue Jan 9, 2025 · 0 comments
Open

TypeError in laravel-backup 9.2.0 when mail.to config is null #1868

andreasnij opened this issue Jan 9, 2025 · 0 comments

Comments

@andreasnij
Copy link

After upgrading from laravel-backup 8 to laravel-backup 9.2.0 I get this error when running any test in my test suite:

TypeError: Spatie\Backup\Exceptions\InvalidConfig::invalidEmail(): Argument #1 ($email) must be of type string, null given

This is in part because I use an environment variable for the mail.to config in the backup.php config file which is not set in my test environment:

'mail' => [
    'to' => env('ERROR_MAIL_ADDRESS'),

I think the email config should be allowed to be null like in version 8, for people who don't want email notifications or test environments.

Another concern I have is that the laravel-backup config is parsed even though never used (I don't have any tests for laravel-backup in my test suite). I think this has something to do with Spatie\Backup\Config\Config being injected in the laravel backup commands' constructors.

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

No branches or pull requests

1 participant