From 110044d2f0850295099709f9d41d9677c82b601e Mon Sep 17 00:00:00 2001 From: Shift Date: Sat, 2 Mar 2024 06:31:34 +0000 Subject: [PATCH 1/3] Bump dependencies for Laravel 11 --- composer.json | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 305f3a4..65e9004 100644 --- a/composer.json +++ b/composer.json @@ -1,17 +1,29 @@ { "name": "nunomaduro/laravel-desktop-notifier", "description": "Send notifications to your desktop from your Laravel commands. An JoliNotif wrapper for Laravel 5.", - "keywords": ["laravel", "framework", "console", "artisan", "php", "wrapper", "JoliNotif", "notification", "notifier", "Nuno Maduro", "NunoMaduro"], + "keywords": [ + "laravel", + "framework", + "console", + "artisan", + "php", + "wrapper", + "JoliNotif", + "notification", + "notifier", + "Nuno Maduro", + "NunoMaduro" + ], "license": "MIT", "require": { "php": "^8.1", - "illuminate/support": "^9.0|^10.0", - "illuminate/console": "^9.0|^10.0", + "illuminate/support": "^9.0|^10.0|^11.0", + "illuminate/console": "^9.0|^10.0|^11.0", "jolicode/jolinotif": "^2.5" }, "require-dev": { - "graham-campbell/testbench": "^5.7", - "phpunit/phpunit": "^9.5" + "graham-campbell/testbench": "^5.7|^6.1", + "phpunit/phpunit": "^9.5|^10.5" }, "authors": [ { @@ -20,7 +32,7 @@ } ], "autoload": { - "psr-4": { + "psr-4": { "NunoMaduro\\LaravelDesktopNotifier\\": "src/" } }, From 9219b3eaa2539375673515819fa35a4d2743a87c Mon Sep 17 00:00:00 2001 From: Owen Voke Date: Tue, 5 Mar 2024 13:27:59 +0000 Subject: [PATCH 2/3] chore(deps-dev): update to use Pest --- .github/workflows/tests.yml | 5 ++--- composer.json | 11 +++++++---- phpunit.xml.dist | 24 ++++++------------------ tests/AbstractTestCase.php | 2 +- 4 files changed, 16 insertions(+), 26 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4139aba..2087b43 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,13 +15,12 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - tools: composer:v2 coverage: none - name: Setup Problem Matches @@ -33,4 +32,4 @@ jobs: run: composer update --${{ matrix.dependency-version }} --no-interaction --no-progress - name: Unit Tests - run: vendor/bin/phpunit --colors=always + run: vendor/bin/pest -p diff --git a/composer.json b/composer.json index 65e9004..ad8efc7 100644 --- a/composer.json +++ b/composer.json @@ -17,13 +17,13 @@ "license": "MIT", "require": { "php": "^8.1", - "illuminate/support": "^9.0|^10.0|^11.0", - "illuminate/console": "^9.0|^10.0|^11.0", + "illuminate/support": "^10.0|^11.0", + "illuminate/console": "^10.0|^11.0", "jolicode/jolinotif": "^2.5" }, "require-dev": { "graham-campbell/testbench": "^5.7|^6.1", - "phpunit/phpunit": "^9.5|^10.5" + "pestphp/pest": "^2.34" }, "authors": [ { @@ -42,7 +42,10 @@ } }, "config": { - "preferred-install": "dist" + "preferred-install": "dist", + "allow-plugins": { + "pestphp/pest-plugin": true + } }, "extra": { "laravel": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 4660e25..4f1bfd9 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,28 +1,16 @@ - ./tests - - + + ./src - - + + diff --git a/tests/AbstractTestCase.php b/tests/AbstractTestCase.php index cfe7226..bad11f4 100644 --- a/tests/AbstractTestCase.php +++ b/tests/AbstractTestCase.php @@ -26,7 +26,7 @@ abstract class AbstractTestCase extends AbstractPackageTestCase * * @return string */ - protected function getServiceProviderClass() + protected static function getServiceProviderClass(): string { return LaravelDesktopNotifierServiceProvider::class; } From d217b2497afe791518b04445d6e2b5a55435a1d6 Mon Sep 17 00:00:00 2001 From: Owen Voke Date: Tue, 5 Mar 2024 13:28:38 +0000 Subject: [PATCH 3/3] style: apply fixes from Pint --- src/Contracts/Notification.php | 3 --- src/Notifier.php | 2 -- tests/AbstractTestCase.php | 2 -- 3 files changed, 7 deletions(-) diff --git a/src/Contracts/Notification.php b/src/Contracts/Notification.php index f233f6c..a92b691 100644 --- a/src/Contracts/Notification.php +++ b/src/Contracts/Notification.php @@ -24,7 +24,6 @@ interface Notification public function getTitle(); /** - * @param string $title * @return \NunoMaduro\LaravelDesktopNotifier\Contracts\Notification */ public function setTitle(string $title): \Joli\JoliNotif\Notification; @@ -35,7 +34,6 @@ public function setTitle(string $title): \Joli\JoliNotif\Notification; public function getBody(); /** - * @param string $body * @return \NunoMaduro\LaravelDesktopNotifier\Contracts\Notification */ public function setBody(string $body): \Joli\JoliNotif\Notification; @@ -46,7 +44,6 @@ public function setBody(string $body): \Joli\JoliNotif\Notification; public function getIcon(); /** - * @param string $icon * @return \NunoMaduro\LaravelDesktopNotifier\Contracts\Notification */ public function setIcon(string $icon): \Joli\JoliNotif\Notification; diff --git a/src/Notifier.php b/src/Notifier.php index 5c99c58..3f57d95 100644 --- a/src/Notifier.php +++ b/src/Notifier.php @@ -28,8 +28,6 @@ class Notifier implements NotifierContract /** * Notifier constructor. - * - * @param \Joli\JoliNotif\Notifier $notifier */ public function __construct(BaseNotifier $notifier) { diff --git a/tests/AbstractTestCase.php b/tests/AbstractTestCase.php index bad11f4..d9ddb4f 100644 --- a/tests/AbstractTestCase.php +++ b/tests/AbstractTestCase.php @@ -23,8 +23,6 @@ abstract class AbstractTestCase extends AbstractPackageTestCase { /** * Get the service provider class. - * - * @return string */ protected static function getServiceProviderClass(): string {