diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index ba1dcf1..74429a4 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -19,7 +19,7 @@ jobs: matrix: os: [ubuntu-latest] php: [8.4, 8.3, 8.2, 8.1] - laravel: [10.*, 11.*] + laravel: [10.*, 11.*, 12.*] stability: [prefer-stable] include: - laravel: 10.* @@ -28,11 +28,16 @@ jobs: - laravel: 11.* testbench: 9.* phpstan_neon: phpstan.neon + - laravel: 12.* + testbench: 10.* + phpstan_neon: phpstan.neon exclude: - laravel: 10.* php: 8.4 - laravel: 11.* php: 8.1 + - laravel: 12.* + php: 8.1 name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.os }} diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml index 5eac71d..42b5f19 100644 --- a/.github/workflows/run-test.yml +++ b/.github/workflows/run-test.yml @@ -21,18 +21,22 @@ jobs: matrix: os: [ubuntu-latest] php: [8.4, 8.3, 8.2, 8.1] - laravel: [10.*, 11.*] + laravel: [10.*, 11.*, 12.*] stability: [prefer-stable] include: - laravel: 10.* testbench: 8.* - laravel: 11.* testbench: 9.* + - laravel: 12.* + testbench: 10.* exclude: - laravel: 10.* php: 8.4 - laravel: 11.* php: 8.1 + - laravel: 12.* + php: 8.1 name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.os }} diff --git a/composer.json b/composer.json index e33b010..cc0a74b 100644 --- a/composer.json +++ b/composer.json @@ -27,10 +27,10 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.8", - "larastan/larastan": "^2.9", + "larastan/larastan": "^2.9|^3.0", "nunomaduro/collision": "^7.0|^8.1", - "orchestra/testbench": "^8.0|^9.0", - "phpunit/phpunit": "^10.0", + "orchestra/testbench": "^8.0|^9.0|^10.0", + "phpunit/phpunit": "^10.0|^11.0", "spatie/laravel-ray": "^1.26" }, "autoload": { diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 6a323bd..9287b48 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,36 +1,43 @@ parameters: ignoreErrors: - - message: "#^Class DutchCodingCompany\\\\FilamentDeveloperLogins\\\\Database\\\\Factories\\\\TestUserFactory extends generic class Illuminate\\\\Database\\\\Eloquent\\\\Factories\\\\Factory but does not specify its types\\: TModel$#" + message: '#^Class DutchCodingCompany\\FilamentDeveloperLogins\\Database\\Factories\\TestUserFactory extends generic class Illuminate\\Database\\Eloquent\\Factories\\Factory but does not specify its types\: TModel$#' + identifier: missingType.generics count: 1 path: database/factories/TestUserFactory.php - - message: "#^Class App\\\\Models\\\\User not found\\.$#" + message: '#^Class App\\Models\\User not found\.$#' + identifier: class.notFound count: 1 path: src/FilamentDeveloperLoginsPlugin.php - - message: "#^Property DutchCodingCompany\\\\FilamentDeveloperLogins\\\\FilamentDeveloperLoginsPlugin\\:\\:\\$modelClass \\(class\\-string\\\\) does not accept default value of type string\\.$#" + message: '#^Property DutchCodingCompany\\FilamentDeveloperLogins\\FilamentDeveloperLoginsPlugin\:\:\$modelClass \(class\-string\\) does not accept default value of type string\.$#' + identifier: property.defaultValue count: 1 path: src/FilamentDeveloperLoginsPlugin.php - - message: "#^Call to an undefined method Illuminate\\\\Testing\\\\TestResponse\\:\\:assertDontSeeLivewire\\(\\)\\.$#" + message: '#^Call to an undefined method Illuminate\\Testing\\TestResponse\:\:assertDontSeeLivewire\(\)\.$#' + identifier: method.notFound count: 3 path: tests/Feature/MenuLoginsTest.php - - message: "#^Call to an undefined method Illuminate\\\\Testing\\\\TestResponse\\:\\:assertSeeLivewire\\(\\)\\.$#" + message: '#^Call to an undefined method Illuminate\\Testing\\TestResponse\:\:assertSeeLivewire\(\)\.$#' + identifier: method.notFound count: 2 path: tests/Feature/MenuLoginsTest.php - - message: "#^Access to an undefined property DutchCodingCompany\\\\FilamentDeveloperLogins\\\\Tests\\\\Fixtures\\\\TestUser\\:\\:\\$is_admin\\.$#" + message: '#^Access to an undefined property DutchCodingCompany\\FilamentDeveloperLogins\\Tests\\Fixtures\\TestUser\:\:\$is_admin\.$#' + identifier: property.notFound count: 1 path: tests/Fixtures/TestUser.php - - message: "#^Parameter \\#1 \\$callback of static method Illuminate\\\\Database\\\\Eloquent\\\\Factories\\\\Factory\\\\:\\:guessFactoryNamesUsing\\(\\) expects callable\\(class\\-string\\\\)\\: class\\-string\\, Closure\\(string\\)\\: non\\-falsy\\-string given\\.$#" + message: '#^Parameter \#1 \$callback of static method Illuminate\\Database\\Eloquent\\Factories\\Factory\\:\:guessFactoryNamesUsing\(\) expects callable\(class\-string\\)\: class\-string\, Closure\(string\)\: non\-falsy\-string given\.$#' + identifier: argument.type count: 1 - path: tests/TestCase.php \ No newline at end of file + path: tests/TestCase.php diff --git a/phpstan.neon b/phpstan.neon index 445365e..411d7bf 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -8,4 +8,17 @@ parameters: paths: - database - src - - tests \ No newline at end of file + - tests + + ignoreErrors: + - + message: '#^Parameter \#1 \$view of function view expects view\-string\|null, string given\.$#' + identifier: argument.type + count: 1 + path: src/Livewire/MenuLogins.php + + - + message: '#^Parameter \#1 \$view of function view expects view\-string\|null, string given\.$#' + identifier: argument.type + count: 1 + path: src/View/Components/DeveloperLogins.php\