Skip to content

Commit

Permalink
change workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dododedodonl committed Nov 28, 2024
1 parent 9eff682 commit 9ef65a1
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ on:
- '**.php'
- '.github/workflows/phpstan.yml'
- 'phpstan.neon.dist'
- 'phpstan.laravel-10.neon.dist'
pull_request:
branches:
- '**'

jobs:
phpstan:
Expand All @@ -15,14 +18,16 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.3, 8.2, 8.1]
php: [8.4, 8.3, 8.2, 8.1]
laravel: [10.*, 11.*]
stability: [prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
phpstan_neon: phpstan.laravel-10.neon.dist
- laravel: 11.*
testbench: 9.*
phpstan_neon: phpstan.neon.dist
exclude:
- laravel: 11.*
php: 8.1
Expand All @@ -44,9 +49,8 @@ jobs:
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: List Installed Dependencies
run: composer show -D

- name: Run PHPStan
run: vendor/bin/phpstan --error-format=github
run: vendor/bin/phpstan --error-format=github --configuration=${{ matrix.phpstan_neon }}
31 changes: 31 additions & 0 deletions phpstan-baseline.laravel-10.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
parameters:
ignoreErrors:
-
message: "#^Class App\\\\Models\\\\User not found\\.$#"
count: 1
path: src/FilamentSocialitePlugin.php

-
message: "#^Property DutchCodingCompany\\\\FilamentSocialite\\\\FilamentSocialitePlugin\\:\\:\\$userModelClass \\(class\\-string\\<Illuminate\\\\Contracts\\\\Auth\\\\Authenticatable\\>\\) does not accept default value of type string\\.$#"
count: 1
path: src/FilamentSocialitePlugin.php

-
message: "#^Parameter \\#1 \\$value of method DutchCodingCompany\\\\FilamentSocialite\\\\Http\\\\Controllers\\\\SocialiteLoginController\\:\\:evaluate\\(\\) expects bool\\|\\(callable\\(\\)\\: bool\\), bool\\|\\(Closure\\(string, Laravel\\\\Socialite\\\\Contracts\\\\User, Illuminate\\\\Contracts\\\\Auth\\\\Authenticatable\\|null\\)\\: bool\\) given\\.$#"
count: 1
path: src/Http/Controllers/SocialiteLoginController.php

-
message: "#^Method DutchCodingCompany\\\\FilamentSocialite\\\\Tests\\\\Fixtures\\\\TestTenantUser\\:\\:teams\\(\\) should return Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\BelongsToMany\\<DutchCodingCompany\\\\FilamentSocialite\\\\Tests\\\\Fixtures\\\\TestTeam, static\\(DutchCodingCompany\\\\FilamentSocialite\\\\Tests\\\\Fixtures\\\\TestTenantUser\\)\\> but returns Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\BelongsToMany\\<DutchCodingCompany\\\\FilamentSocialite\\\\Tests\\\\Fixtures\\\\TestTeam\\>\\.$#"
count: 1
path: tests/Fixtures/TestTenantUser.php

-
message: "#^Call to an undefined method Mockery\\\\ExpectationInterface\\|Mockery\\\\HigherOrderMessage\\:\\:andReturn\\(\\)\\.$#"
count: 3
path: tests/TestCase.php

-
message: "#^Parameter \\#1 \\$callback of static method Illuminate\\\\Database\\\\Eloquent\\\\Factories\\\\Factory\\<Illuminate\\\\Database\\\\Eloquent\\\\Model\\>\\:\\:guessFactoryNamesUsing\\(\\) expects callable\\(class\\-string\\<Illuminate\\\\Database\\\\Eloquent\\\\Model\\>\\)\\: class\\-string\\<Illuminate\\\\Database\\\\Eloquent\\\\Factories\\\\Factory\\>, Closure\\(string\\)\\: non\\-falsy\\-string given\\.$#"
count: 1
path: tests/TestCase.php
12 changes: 12 additions & 0 deletions phpstan.laravel-10.neon.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
includes:
- ./vendor/larastan/larastan/extension.neon
- ./phpstan-baseline.laravel-10.neon

parameters:
level: 8

paths:
- config
- database
- src
- tests

0 comments on commit 9ef65a1

Please sign in to comment.