Skip to content

Firefly III: a personal finances manager

Fix: package upgrade for slack messages

James Cole5761d8263522
diff --git a/app/Notifications/Admin/TestNotification.php b/app/Notifications/Admin/TestNotification.php
index 79877f08a2..056ac15ad7 100644
--- a/app/Notifications/Admin/TestNotification.php
+++ b/app/Notifications/Admin/TestNotification.php
@@ -26,7 +26,7 @@ namespace FireflyIII\Notifications\Admin;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Messages\MailMessage;
-use Illuminate\Notifications\Messages\SlackMessage;
+use Illuminate\Notifications\Slack\SlackMessage;
use Illuminate\Notifications\Notification;
/**
diff --git a/app/Notifications/Admin/UserInvitation.php b/app/Notifications/Admin/UserInvitation.php
index 6e4ebb071f..1927da7278 100644
--- a/app/Notifications/Admin/UserInvitation.php
+++ b/app/Notifications/Admin/UserInvitation.php
@@ -27,7 +27,7 @@ namespace FireflyIII\Notifications\Admin;
use FireflyIII\Models\InvitedUser;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Messages\MailMessage;
-use Illuminate\Notifications\Messages\SlackMessage;
+use Illuminate\Notifications\Slack\SlackMessage;
use Illuminate\Notifications\Notification;
/**
diff --git a/app/Notifications/Admin/UserRegistration.php b/app/Notifications/Admin/UserRegistration.php
index b57b4f5cec..1a3f234279 100644
--- a/app/Notifications/Admin/UserRegistration.php
+++ b/app/Notifications/Admin/UserRegistration.php
@@ -27,7 +27,7 @@ namespace FireflyIII\Notifications\Admin;
use FireflyIII\User;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Messages\MailMessage;
-use Illuminate\Notifications\Messages\SlackMessage;
+use Illuminate\Notifications\Slack\SlackMessage;
use Illuminate\Notifications\Notification;
/**
diff --git a/app/Notifications/Admin/VersionCheckResult.php b/app/Notifications/Admin/VersionCheckResult.php
index 492ae8fea9..60ee23f425 100644
--- a/app/Notifications/Admin/VersionCheckResult.php
+++ b/app/Notifications/Admin/VersionCheckResult.php
@@ -26,7 +26,7 @@ namespace FireflyIII\Notifications\Admin;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Messages\MailMessage;
-use Illuminate\Notifications\Messages\SlackMessage;
+use Illuminate\Notifications\Slack\SlackMessage;
use Illuminate\Notifications\Notification;
/**
@@ -87,9 +87,9 @@ class VersionCheckResult extends Notification
public function toSlack($notifiable)
{
return (new SlackMessage())->content($this->message)
- ->attachment(function ($attachment) {
- $attachment->title('Firefly III @ GitHub', 'https://github.com/firefly-iii/firefly-iii/releases');
- });
+ ->attachment(function ($attachment) {
+ $attachment->title('Firefly III @ GitHub', 'https://github.com/firefly-iii/firefly-iii/releases');
+ });
}
/**
diff --git a/app/Notifications/User/BillReminder.php b/app/Notifications/User/BillReminder.php
index bfbeacb112..24a180b502 100644
--- a/app/Notifications/User/BillReminder.php
+++ b/app/Notifications/User/BillReminder.php
@@ -27,7 +27,7 @@ namespace FireflyIII\Notifications\User;
use FireflyIII\Models\Bill;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Messages\MailMessage;
-use Illuminate\Notifications\Messages\SlackMessage;
+use Illuminate\Notifications\Slack\SlackMessage;
use Illuminate\Notifications\Notification;
/**
@@ -37,8 +37,8 @@ class BillReminder extends Notification
{
use Queueable;
- private Bill $bill;
- private int $diff;
+ private Bill $bill;
+ private int $diff;
private string $field;
/**
@@ -48,9 +48,9 @@ class BillReminder extends Notification
*/
public function __construct(Bill $bill, string $field, int $diff)
{
- $this->bill = $bill;
+ $this->bill = $bill;
$this->field = $field;
- $this->diff = $diff;
+ $this->diff = $diff;
}
/**
@@ -100,7 +100,7 @@ class BillReminder extends Notification
$message = (string)trans(sprintf('email.bill_warning_subject_now_%s', $this->field), ['diff' => $this->diff, 'name' => $this->bill->name]);
}
$bill = $this->bill;
- $url = route('bills.show', [$bill->id]);
+ $url = route('bills.show', [$bill->id]);
return (new SlackMessage())
->warning()
->attachment(function ($attachment) use ($bill, $url) {
diff --git a/app/Notifications/User/NewAccessToken.php b/app/Notifications/User/NewAccessToken.php
index e57c719047..3794a3f607 100644
--- a/app/Notifications/User/NewAccessToken.php
+++ b/app/Notifications/User/NewAccessToken.php
@@ -26,7 +26,7 @@ namespace FireflyIII\Notifications\User;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Messages\MailMessage;
-use Illuminate\Notifications\Messages\SlackMessage;
+use Illuminate\Notifications\Slack\SlackMessage;
use Illuminate\Notifications\Notification;
/**
diff --git a/app/Notifications/User/UserLogin.php b/app/Notifications/User/UserLogin.php
index 7aff8afa2e..5e3e649631 100644
--- a/app/Notifications/User/UserLogin.php
+++ b/app/Notifications/User/UserLogin.php
@@ -27,9 +27,9 @@ namespace FireflyIII\Notifications\User;
use FireflyIII\Exceptions\FireflyException;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Messages\MailMessage;
-use Illuminate\Notifications\Messages\SlackMessage;
use Illuminate\Notifications\Notification;
use Illuminate\Support\Facades\Log;
+use Illuminate\Notifications\Slack\SlackMessage;
/**
* Class UserLogin
diff --git a/composer.json b/composer.json
index 1c6c62f1ba..d0b06cb6d2 100644
--- a/composer.json
+++ b/composer.json
@@ -91,7 +91,7 @@
"laravel/framework": "^10",
"laravel/passport": "11.*",
"laravel/sanctum": "^3.2",
- "laravel/slack-notification-channel": "^2.4",
+ "laravel/slack-notification-channel": "^3",
"laravel/ui": "^4.2",
"league/commonmark": "2.*",
"league/csv": "^9.7",
diff --git a/composer.lock b/composer.lock
index e96a0ed3dd..b96398f203 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "99f0c0e3a4fbdd439e03623e5cd9ba38",
+ "content-hash": "a46107aae29496aa6d988a9d3cee2340",
"packages": [
{
"name": "bacon/bacon-qr-code",
@@ -2346,31 +2346,35 @@
},
{
"name": "laravel/slack-notification-channel",
- "version": "v2.5.0",
+ "version": "v3.0.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/slack-notification-channel.git",
- "reference": "e0d4be5e01d443a69fa89f0a4cac6bd2eda2be8f"
+ "reference": "20d0f6ae89aed80696e7ff2c667369a4f270c08c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laravel/slack-notification-channel/zipball/e0d4be5e01d443a69fa89f0a4cac6bd2eda2be8f",
- "reference": "e0d4be5e01d443a69fa89f0a4cac6bd2eda2be8f",
+ "url": "https://api.github.com/repos/laravel/slack-notification-channel/zipball/20d0f6ae89aed80696e7ff2c667369a4f270c08c",
+ "reference": "20d0f6ae89aed80696e7ff2c667369a4f270c08c",
"shasum": ""
},
"require": {
- "guzzlehttp/guzzle": "^6.0|^7.0",
- "illuminate/notifications": "~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0",
- "php": "^7.1.3|^8.0"
+ "guzzlehttp/guzzle": "^7.0",
+ "illuminate/http": "^9.0|^10.0",
+ "illuminate/notifications": "^9.0|^10.0",
+ "illuminate/support": "^9.0|^10.0",
+ "php": "^8.0"
},
"require-dev": {
"mockery/mockery": "^1.0",
- "phpunit/phpunit": "^7.0|^8.0|^9.0"
+ "orchestra/testbench": "^7.0|^8.0",
+ "phpstan/phpstan": "^1.10",
+ "phpunit/phpunit": "^9.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.x-dev"
+ "dev-master": "3.x-dev"
},
"laravel": {
"providers": [
@@ -2401,9 +2405,9 @@
],
"support": {
"issues": "https://github.com/laravel/slack-notification-channel/issues",
- "source": "https://github.com/laravel/slack-notification-channel/tree/v2.5.0"
+ "source": "https://github.com/laravel/slack-notification-channel/tree/v3.0.0"
},
- "time": "2023-01-12T16:21:26+00:00"
+ "time": "2023-07-14T14:58:23+00:00"
},
{
"name": "laravel/ui",
@@ -10459,16 +10463,16 @@
},
{
"name": "phpunit/phpunit",
- "version": "10.2.5",
+ "version": "10.2.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "15a89f123d8ca9c1e1598d6d87a56a8bf28c72cd"
+ "reference": "1c17815c129f133f3019cc18e8d0c8622e6d9bcd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/15a89f123d8ca9c1e1598d6d87a56a8bf28c72cd",
- "reference": "15a89f123d8ca9c1e1598d6d87a56a8bf28c72cd",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1c17815c129f133f3019cc18e8d0c8622e6d9bcd",
+ "reference": "1c17815c129f133f3019cc18e8d0c8622e6d9bcd",
"shasum": ""
},
"require": {
@@ -10540,7 +10544,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/10.2.5"
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/10.2.6"
},
"funding": [
{
@@ -10556,7 +10560,7 @@
"type": "tidelift"
}
],
- "time": "2023-07-14T04:18:47+00:00"
+ "time": "2023-07-17T12:08:28+00:00"
},
{
"name": "sebastian/cli-parser",