From 9ae71fde2db27890f290561ef58d8d50c5fe6812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20K=C3=A4mmerling?= Date: Thu, 5 Mar 2020 10:13:57 +0100 Subject: [PATCH] Allow Laravel 7 and test on PHP 7.4 (#113) * Allow Laravel 7 * Test on PHP 7.4 * Update mockery because of compatibility problems with PH 7.4 * Apply fixes from StyleCI (#114) --- .travis.yml | 1 + composer.json | 8 ++++---- src/OneSignalChannel.php | 2 +- src/OneSignalMessage.php | 8 ++++---- tests/ChannelTest.php | 8 ++++---- tests/NotifiableMultipleTags.php | 6 +++--- 6 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 16142e3..ae75d62 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ language: php php: - 7.2 - 7.3 + - 7.4 env: matrix: diff --git a/composer.json b/composer.json index 6e55ec7..5f3dfec 100644 --- a/composer.json +++ b/composer.json @@ -27,12 +27,12 @@ "require": { "php": "^7.2.0", "berkayk/onesignal-laravel": "^1.0.0", - "illuminate/notifications": "5.*|^6.0", - "illuminate/support": "5.*|^6.0" + "illuminate/notifications": "5.*|^6.0|^7.0", + "illuminate/support": "5.*|^6.0|^7.0" }, "require-dev": { - "mockery/mockery": "^1.0", - "orchestra/testbench": "^4.0", + "mockery/mockery": "^1.3", + "orchestra/testbench": "^4.0|^5.0", "phpunit/phpunit": "^8.0" }, "autoload": { diff --git a/src/OneSignalChannel.php b/src/OneSignalChannel.php index 9622af7..e206f31 100644 --- a/src/OneSignalChannel.php +++ b/src/OneSignalChannel.php @@ -3,9 +3,9 @@ namespace NotificationChannels\OneSignal; use Berkayk\OneSignal\OneSignalClient; -use Psr\Http\Message\ResponseInterface; use Illuminate\Notifications\Notification; use NotificationChannels\OneSignal\Exceptions\CouldNotSendNotification; +use Psr\Http\Message\ResponseInterface; class OneSignalChannel { diff --git a/src/OneSignalMessage.php b/src/OneSignalMessage.php index 79ad6cf..b22c452 100644 --- a/src/OneSignalMessage.php +++ b/src/OneSignalMessage.php @@ -3,13 +3,13 @@ namespace NotificationChannels\OneSignal; use Illuminate\Support\Arr; -use NotificationChannels\OneSignal\Traits\Deprecated; +use NotificationChannels\OneSignal\Traits\Categories\AppearanceHelpers; +use NotificationChannels\OneSignal\Traits\Categories\AttachmentHelpers; use NotificationChannels\OneSignal\Traits\Categories\ButtonHelpers; -use NotificationChannels\OneSignal\Traits\Categories\SilentHelpers; use NotificationChannels\OneSignal\Traits\Categories\DeliveryHelpers; use NotificationChannels\OneSignal\Traits\Categories\GroupingHelpers; -use NotificationChannels\OneSignal\Traits\Categories\AppearanceHelpers; -use NotificationChannels\OneSignal\Traits\Categories\AttachmentHelpers; +use NotificationChannels\OneSignal\Traits\Categories\SilentHelpers; +use NotificationChannels\OneSignal\Traits\Deprecated; class OneSignalMessage { diff --git a/tests/ChannelTest.php b/tests/ChannelTest.php index d1b363e..b54ee8a 100644 --- a/tests/ChannelTest.php +++ b/tests/ChannelTest.php @@ -2,13 +2,13 @@ namespace NotificationChannels\OneSignal\Test; -use Mockery; +use Berkayk\OneSignal\OneSignalClient; use GuzzleHttp\Psr7\Response; +use Mockery; +use NotificationChannels\OneSignal\Exceptions\CouldNotSendNotification; +use NotificationChannels\OneSignal\OneSignalChannel; use Orchestra\Testbench\TestCase; -use Berkayk\OneSignal\OneSignalClient; use Psr\Http\Message\ResponseInterface; -use NotificationChannels\OneSignal\OneSignalChannel; -use NotificationChannels\OneSignal\Exceptions\CouldNotSendNotification; class ChannelTest extends TestCase { diff --git a/tests/NotifiableMultipleTags.php b/tests/NotifiableMultipleTags.php index 5779314..c162e1d 100644 --- a/tests/NotifiableMultipleTags.php +++ b/tests/NotifiableMultipleTags.php @@ -12,9 +12,9 @@ class NotifiableMultipleTags public function routeNotificationForOneSignal() { return ['tags' => [ - ['key' => 'device_uuid', 'relation' => '=', 'value' => '123e4567-e89b-12d3-a456-426655440000'], - ['key' => 'role', 'relation' => '=', 'value' => 'admin'], - ], + ['key' => 'device_uuid', 'relation' => '=', 'value' => '123e4567-e89b-12d3-a456-426655440000'], + ['key' => 'role', 'relation' => '=', 'value' => 'admin'], + ], ]; } }