From 88f779394b6d4b58b03304792c6af941acd86216 Mon Sep 17 00:00:00 2001 From: Jyrki De Neve Date: Fri, 28 Feb 2025 10:33:07 +0200 Subject: [PATCH] Upgrade to L12 (#23) --- composer.json | 18 +++++++++--------- phpstan-baseline.neon | 19 +++++++++++++------ phpstan.neon.dist | 2 -- tests/Unit/Drivers/DatabaseDriverTest.php | 2 +- 4 files changed, 23 insertions(+), 18 deletions(-) diff --git a/composer.json b/composer.json index c83e584..be55cf7 100644 --- a/composer.json +++ b/composer.json @@ -9,22 +9,22 @@ "homepage" : "https://github.com/codedor/filament-settings", "license" : "MIT", "require" : { - "php": "^8.2|^8.3", + "php": "^8.2", "filament/filament": "^3.1", "livewire/livewire": "^3.2", "spatie/laravel-package-tools": "^1.12", - "illuminate/contracts": "^10.0|^11.0" + "illuminate/contracts": "^10.0|^11.0|^12.0" }, "require-dev" : { "laravel/pint": "^1.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", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.0" + "larastan/larastan": "^2.0|^3.0", + "orchestra/testbench": "^8.0|^9.0|^10.0", + "pestphp/pest": "^2.0|^3.0", + "pestphp/pest-plugin-laravel": "^2.0|^3.0", + "phpstan/extension-installer": "^1.1|^2.0", + "phpstan/phpstan-deprecation-rules": "^1.0|^2.0", + "phpstan/phpstan-phpunit": "^1.0|^2.0" }, "autoload" : { "psr-4" : { diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 15b69d8..ab5090d 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,7 +1,14 @@ parameters: - ignoreErrors: - - - message: "#^Access to an undefined property Codedor\\\\FilamentSettings\\\\Pages\\\\Settings\\:\\:\\$form\\.$#" - count: 2 - path: src/Pages/Settings.php - + ignoreErrors: + - + message: "#^Access to an undefined property Codedor\\\\FilamentSettings\\\\Pages\\\\Settings\\:\\:\\$form\\.$#" + count: 2 + path: src/Pages/Settings.php + - + message: "#^Static property Codedor\\\\FilamentSettings\\\\Widgets\\\\RequiredFieldsWidget\\:\\:\\$view \\(view-string\\) does not accept default value of type string\\.$#" + count: 1 + path: src/Widgets/RequiredFieldsWidget.php + - + message: "#^Static call to instance method stdClass\\:\\:title\\(\\)\\.$#" + count: 1 + path: src/Repositories/SettingTabRepository.php diff --git a/phpstan.neon.dist b/phpstan.neon.dist index a91953b..9f85c1e 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -10,5 +10,3 @@ parameters: tmpDir: build/phpstan checkOctaneCompatibility: true checkModelProperties: true - checkMissingIterableValueType: false - diff --git a/tests/Unit/Drivers/DatabaseDriverTest.php b/tests/Unit/Drivers/DatabaseDriverTest.php index af7f860..2888085 100644 --- a/tests/Unit/Drivers/DatabaseDriverTest.php +++ b/tests/Unit/Drivers/DatabaseDriverTest.php @@ -90,7 +90,7 @@ for ($i = 0; $i < 5; $i++) { $data[] = [ - 'key' => fake()->word, + 'key' => fake()->unique()->word, 'value' => fake()->word, ]; }