Skip to content

Commit c2b30ff

Browse files
authored
Merge pull request nunomaduro#32 from laravel-shift/l11-compatibility
Laravel 11.x Compatibility
2 parents eb8d467 + d217b24 commit c2b30ff

File tree

6 files changed

+31
-36
lines changed

6 files changed

+31
-36
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@ jobs:
1515

1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v2
18+
uses: actions/checkout@v4
1919

2020
- name: Setup PHP
2121
uses: shivammathur/setup-php@v2
2222
with:
2323
php-version: ${{ matrix.php }}
24-
tools: composer:v2
2524
coverage: none
2625

2726
- name: Setup Problem Matches
@@ -33,4 +32,4 @@ jobs:
3332
run: composer update --${{ matrix.dependency-version }} --no-interaction --no-progress
3433

3534
- name: Unit Tests
36-
run: vendor/bin/phpunit --colors=always
35+
run: vendor/bin/pest -p

composer.json

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
11
{
22
"name": "nunomaduro/laravel-desktop-notifier",
33
"description": "Send notifications to your desktop from your Laravel commands. An JoliNotif wrapper for Laravel 5.",
4-
"keywords": ["laravel", "framework", "console", "artisan", "php", "wrapper", "JoliNotif", "notification", "notifier", "Nuno Maduro", "NunoMaduro"],
4+
"keywords": [
5+
"laravel",
6+
"framework",
7+
"console",
8+
"artisan",
9+
"php",
10+
"wrapper",
11+
"JoliNotif",
12+
"notification",
13+
"notifier",
14+
"Nuno Maduro",
15+
"NunoMaduro"
16+
],
517
"license": "MIT",
618
"require": {
719
"php": "^8.1",
8-
"illuminate/support": "^9.0|^10.0",
9-
"illuminate/console": "^9.0|^10.0",
20+
"illuminate/support": "^10.0|^11.0",
21+
"illuminate/console": "^10.0|^11.0",
1022
"jolicode/jolinotif": "^2.5"
1123
},
1224
"require-dev": {
13-
"graham-campbell/testbench": "^5.7",
14-
"phpunit/phpunit": "^9.5"
25+
"graham-campbell/testbench": "^5.7|^6.1",
26+
"pestphp/pest": "^2.34"
1527
},
1628
"authors": [
1729
{
@@ -20,7 +32,7 @@
2032
}
2133
],
2234
"autoload": {
23-
"psr-4": {
35+
"psr-4": {
2436
"NunoMaduro\\LaravelDesktopNotifier\\": "src/"
2537
}
2638
},
@@ -30,7 +42,10 @@
3042
}
3143
},
3244
"config": {
33-
"preferred-install": "dist"
45+
"preferred-install": "dist",
46+
"allow-plugins": {
47+
"pestphp/pest-plugin": true
48+
}
3449
},
3550
"extra": {
3651
"laravel": {

phpunit.xml.dist

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,16 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
4-
beStrictAboutTestsThatDoNotTestAnything="true"
5-
beStrictAboutOutputDuringTests="true"
6-
bootstrap="vendor/autoload.php"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
74
colors="true"
8-
convertErrorsToExceptions="true"
9-
convertNoticesToExceptions="true"
10-
convertWarningsToExceptions="true"
11-
failOnRisky="true"
12-
failOnWarning="true"
13-
processIsolation="false"
14-
stopOnError="false"
15-
stopOnFailure="false"
16-
verbose="true"
175
>
186
<testsuites>
197
<testsuite name="Laravel Desktop Notifier Test Suite">
208
<directory suffix="Test.php">./tests</directory>
219
</testsuite>
2210
</testsuites>
23-
<filter>
24-
<whitelist processUncoveredFilesFromWhitelist="true">
11+
<source>
12+
<include>
2513
<directory suffix=".php">./src</directory>
26-
</whitelist>
27-
</filter>
14+
</include>
15+
</source>
2816
</phpunit>

src/Contracts/Notification.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ interface Notification
2424
public function getTitle();
2525

2626
/**
27-
* @param string $title
2827
* @return \NunoMaduro\LaravelDesktopNotifier\Contracts\Notification
2928
*/
3029
public function setTitle(string $title): \Joli\JoliNotif\Notification;
@@ -35,7 +34,6 @@ public function setTitle(string $title): \Joli\JoliNotif\Notification;
3534
public function getBody();
3635

3736
/**
38-
* @param string $body
3937
* @return \NunoMaduro\LaravelDesktopNotifier\Contracts\Notification
4038
*/
4139
public function setBody(string $body): \Joli\JoliNotif\Notification;
@@ -46,7 +44,6 @@ public function setBody(string $body): \Joli\JoliNotif\Notification;
4644
public function getIcon();
4745

4846
/**
49-
* @param string $icon
5047
* @return \NunoMaduro\LaravelDesktopNotifier\Contracts\Notification
5148
*/
5249
public function setIcon(string $icon): \Joli\JoliNotif\Notification;

src/Notifier.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ class Notifier implements NotifierContract
2828

2929
/**
3030
* Notifier constructor.
31-
*
32-
* @param \Joli\JoliNotif\Notifier $notifier
3331
*/
3432
public function __construct(BaseNotifier $notifier)
3533
{

tests/AbstractTestCase.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@ abstract class AbstractTestCase extends AbstractPackageTestCase
2323
{
2424
/**
2525
* Get the service provider class.
26-
*
27-
* @return string
2826
*/
29-
protected function getServiceProviderClass()
27+
protected static function getServiceProviderClass(): string
3028
{
3129
return LaravelDesktopNotifierServiceProvider::class;
3230
}

0 commit comments

Comments
 (0)