From 98cef82e7a5a6b3fe74affc93c96860b8b99b435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ewilan=20Rivi=C3=A8re?= Date: Fri, 2 Feb 2024 11:12:43 +0100 Subject: [PATCH] Refactor mail notifier in Journal class --- .github/workflows/run-tests.yml | 10 ++++------ phpstan.neon.dist | 1 - src/Journal.php | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 0b808d0..893c84b 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -38,12 +38,10 @@ jobs: extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo coverage: pcov - - uses: JarvusInnovations/background-action@v1 - name: Setup mailpit - with: - run: | - sudo bash < <(curl -sL https://raw.githubusercontent.com/axllent/mailpit/develop/install.sh) - mailpit + - name: Setup mailpit + run: | + sudo bash < <(curl -sL https://raw.githubusercontent.com/axllent/mailpit/develop/install.sh) + mailpit - name: Setup problem matchers run: | diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 489fa4e..768d487 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -6,7 +6,6 @@ parameters: paths: - src - config - - database tmpDir: build/phpstan checkOctaneCompatibility: true checkModelProperties: true diff --git a/src/Journal.php b/src/Journal.php index beab853..ebe81d3 100644 --- a/src/Journal.php +++ b/src/Journal.php @@ -110,7 +110,7 @@ public function toDatabase(Model|Authenticatable|Collection|array|null $users = public function notifier(string $type): self { $this->notifier = match ($type) { - 'mail' => Notifier::mail()->auto(), + 'mail' => Notifier::mail(), 'slack' => Notifier::slack(config('steward.slack.webhook')), 'discord' => Notifier::discord(config('steward.discord.webhook')), default => null,