Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test PHP Stan Testsuite

on:
push:
branches: [ "master", "develop" ]
pull_request:
branches: [ "master", "develop" ]

permissions:
contents: read

jobs:
test-phpstan:

runs-on: ubuntu-latest

steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.1'

- uses: actions/checkout@v3

- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"

- name: Install Dependencies
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Execute static analysis via PHPStan
run: vendor/bin/phpstan analyse --no-progress --quiet --error-format=github > $GITHUB_STEP_SUMMARY
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^6.1",
"nunomaduro/larastan": "^2.0",
"phpstan/phpstan": "^1.9",
"phpunit/phpunit": "^9.5.10",
"rector/rector": "^0.15.1",
"spatie/laravel-ignition": "^1.0"
Expand Down Expand Up @@ -62,6 +64,8 @@
"test-pint": "@php vendor/bin/pint -v --test",
"test": "@php artisan test",
"rector": "@php vendor/bin/rector",
"phpstan": "@php vendor/bin/phpstan analyse",
"phpstan-baseline": "@php vendor/bin/phpstan analyse --generate-baseline --allow-empty-baseline",
"meta": [
"@php artisan ide-helper:generate",
"@php artisan ide-helper:meta",
Expand Down
172 changes: 171 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions config/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
'global_casts' => [
DateTimeInterface::class => Spatie\LaravelSettings\SettingsCasts\DateTimeInterfaceCast::class,
DateTimeZone::class => Spatie\LaravelSettings\SettingsCasts\DateTimeZoneCast::class,
// Spatie\DataTransferObject\DataTransferObject::class => Spatie\LaravelSettings\SettingsCasts\DtoCast::class,
Spatie\LaravelData\Data::class => Spatie\LaravelSettings\SettingsCasts\DataCast::class,
// Spatie\DataTransferObject\DataTransferObject::class => Spatie\LaravelSettings\SettingsCasts\DtoCast::class,
// Spatie\LaravelData\Data::class => Spatie\LaravelSettings\SettingsCasts\DataCast::class,
],

/*
Expand Down
Loading