spatie / laravel-backup

A package to backup your Laravel app
https://spatie.be/docs/laravel-backup
MIT License
5.61k stars 758 forks source link

[8.x] `username` parameter in `from` method should be nullable #1818

Closed mho22 closed 1 month ago

mho22 commented 2 months ago

Based on issue #1815, username parameter in from method should be nullable in DiscordMessage.php on line 13 :

src/Notifications/Channels/Discord/DiscordMessage.php

protected string $username = 'Laravel Backup';

...
public function from(string $username, string $avatarUrl = null): self
{
        $this->username = $username;
...
Nielsvanpach commented 1 month ago

I think this is fixed in this PR: https://github.com/spatie/laravel-backup/pull/1821

Feel free to reopen if not the case!

mho22 commented 1 month ago

@Nielsvanpach, the PR is applicable to version 9, not version 8. Therefore, I will need to update to version 9, but this will cause issue #1813 to occur.

RVxLab commented 1 month ago

Much like I mentioned in my comment in #1817, that won't fix the issue that was fixed in #1821

@Nielsvanpach would you (or Freek) accept a PR to backport that fix to v8? I don't know what your typical stance is on older major versions.

If not, then @mho22 you would be better off forking and maintaining it yourself.

freekmurze commented 1 month ago

accept a PR to backport that fix to v8?

Yup, send a PR to the v8 branch and I'll tag a new release.

RVxLab commented 1 month ago

PR has been created.

RVxLab commented 1 month ago

@mho22 Fix for the Discord notifications has been backported. If you update to ^8.8.2 it'll start working.