Skip to content

Commit

Permalink
Merge pull request #32 from laravel-shift/l11-compatibility
Browse files Browse the repository at this point in the history
Laravel 11.x Compatibility
  • Loading branch information
owenvoke authored Mar 5, 2024
2 parents eb8d467 + d217b24 commit c2b30ff
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 36 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
29 changes: 22 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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": "^10.0|^11.0",
"illuminate/console": "^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",
"pestphp/pest": "^2.34"
},
"authors": [
{
Expand All @@ -20,7 +32,7 @@
}
],
"autoload": {
"psr-4": {
"psr-4": {
"NunoMaduro\\LaravelDesktopNotifier\\": "src/"
}
},
Expand All @@ -30,7 +42,10 @@
}
},
"config": {
"preferred-install": "dist"
"preferred-install": "dist",
"allow-plugins": {
"pestphp/pest-plugin": true
}
},
"extra": {
"laravel": {
Expand Down
24 changes: 6 additions & 18 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,28 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutOutputDuringTests="true"
bootstrap="vendor/autoload.php"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
failOnRisky="true"
failOnWarning="true"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
verbose="true"
>
<testsuites>
<testsuite name="Laravel Desktop Notifier Test Suite">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<source>
<include>
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
</include>
</source>
</phpunit>
3 changes: 0 additions & 3 deletions src/Contracts/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions src/Notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ class Notifier implements NotifierContract

/**
* Notifier constructor.
*
* @param \Joli\JoliNotif\Notifier $notifier
*/
public function __construct(BaseNotifier $notifier)
{
Expand Down
4 changes: 1 addition & 3 deletions tests/AbstractTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@ abstract class AbstractTestCase extends AbstractPackageTestCase
{
/**
* Get the service provider class.
*
* @return string
*/
protected function getServiceProviderClass()
protected static function getServiceProviderClass(): string
{
return LaravelDesktopNotifierServiceProvider::class;
}
Expand Down

0 comments on commit c2b30ff

Please sign in to comment.