From 25ca6b9467149e27d7840aed5f80e32949e63866 Mon Sep 17 00:00:00 2001 From: Bezhan Salleh Date: Thu, 28 Mar 2024 12:11:23 +0430 Subject: [PATCH] remove explicit laravel version dependency --- .github/workflows/run-tests.yml | 12 ++++++++---- composer.json | 13 ++++++------- src/LanguageSwitch.php | 4 ++-- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index b9b1b4c..8d709da 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -12,13 +12,17 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-latest, windows-latest] - php: [8.1, 8.2] - laravel: [10.*] - stability: [prefer-lowest, prefer-stable] + php: [8.3, 8.2, 8.1] + laravel: [11.*, 10.*] + dependency-version: [prefer-stable] include: + - laravel: 11.* + testbench: 9.* - laravel: 10.* testbench: 8.* + exclude: + - laravel: 11.* + php: 8.1 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} diff --git a/composer.json b/composer.json index 48b96b1..3d5b317 100644 --- a/composer.json +++ b/composer.json @@ -21,17 +21,16 @@ } ], "require": { - "php": "^8.1|^8.2", + "php": "^8.1|^8.2|^8.3", "filament/filament": "^3.0", - "spatie/laravel-package-tools": "^1.9", - "illuminate/contracts": "^9.0|^10.0" + "spatie/laravel-package-tools": "^1.9" }, "require-dev": { "laravel/pint": "^1.0", - "nunomaduro/collision": "^6.0|^7.0", - "orchestra/testbench": "^7.0|^8.0", - "pestphp/pest": "^1.21", - "pestphp/pest-plugin-laravel": "^1.1", + "nunomaduro/collision": "^6.0|^7.0|8.0", + "orchestra/testbench": "^7.0|^8.0|^9.0", + "pestphp/pest": "^2.34", + "pestphp/pest-plugin-laravel": "^2.3", "spatie/laravel-ray": "^1.26" }, "autoload": { diff --git a/src/LanguageSwitch.php b/src/LanguageSwitch.php index f72f045..34477b4 100755 --- a/src/LanguageSwitch.php +++ b/src/LanguageSwitch.php @@ -79,14 +79,14 @@ public function circular(bool $condition = true): static return $this; } - public function displayLocale(?string $locale = null): static + public function displayLocale(string $locale = null): static { $this->displayLocale = $locale ?? app()->getLocale(); return $this; } - public function outsidePanelRoutes(array | Closure | null $routes = null): static + public function outsidePanelRoutes(array | Closure $routes = null): static { $this->outsidePanelRoutes = $routes ?? [ 'auth.login',