From 7ce1f05ee3aa484d1ecdad99b1e2887cffbc2c9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=CC=88nther=20Debrauwer?= Date: Fri, 2 Aug 2024 11:02:09 +0200 Subject: [PATCH 1/2] Add Laravel v11 support --- .github/workflows/run-tests.yml | 6 +++--- .gitignore | 2 +- composer.json | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 4ef5939..088127a 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -12,9 +12,9 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-latest, windows-latest] - php: [8.2] - laravel: [10.*] + os: [ubuntu-latest] + php: [8.2, 8.3] + laravel: [10.*, 11.*] stability: [prefer-stable] name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} diff --git a/.gitignore b/.gitignore index 83c9b9f..a7f372d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ .idea -.phpunit.result.cache +.phpunit.cache build composer.lock coverage diff --git a/composer.json b/composer.json index be5b178..d69d8af 100644 --- a/composer.json +++ b/composer.json @@ -9,17 +9,17 @@ "homepage": "https://github.com/codedor/laravel-online-scope", "license": "MIT", "require": { - "php": "^8.2", + "php": "^8.2|^8.3", "filament/filament": "^3.0", - "illuminate/contracts": "^10.0", + "illuminate/contracts": "^10.0|^11.0", "spatie/laravel-package-tools": "^1.12", "spatie/laravel-translatable": "^6.5" }, "require-dev": { "laravel/pint": "^1.0", - "nunomaduro/collision": "^7.0", - "nunomaduro/larastan": "^2.0", - "orchestra/testbench": "^8.0", + "nunomaduro/collision": "^7.0|^8.0", + "larastan/larastan": "^2.0", + "orchestra/testbench": "^8.0|^9.0", "pestphp/pest": "^2.0", "pestphp/pest-plugin-laravel": "^2.0", "phpstan/extension-installer": "^1.1", From e68a86b69112c7cc4f903cdb3bc8c5046eee59e2 Mon Sep 17 00:00:00 2001 From: gdebrauwer Date: Fri, 2 Aug 2024 09:02:27 +0000 Subject: [PATCH 2/2] Fix styling --- src/Models/Traits/HasOnlineScope.php | 2 +- tests/TestCase.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Models/Traits/HasOnlineScope.php b/src/Models/Traits/HasOnlineScope.php index 734c9cb..2d9a2b1 100644 --- a/src/Models/Traits/HasOnlineScope.php +++ b/src/Models/Traits/HasOnlineScope.php @@ -8,6 +8,6 @@ trait HasOnlineScope { public static function bootHasOnlineScope() { - static::addGlobalScope(new OnlineScope()); + static::addGlobalScope(new OnlineScope); } } diff --git a/tests/TestCase.php b/tests/TestCase.php index e2a99ff..2c13e08 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -16,7 +16,5 @@ protected function getPackageProviders($app) return []; } - public function getEnvironmentSetUp($app) - { - } + public function getEnvironmentSetUp($app) {} }