diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5714b4b..fca9a15 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,6 +57,10 @@ jobs: if: ${{ matrix.php-version == '8.4' }} run: composer check + - name: Scaffold drift + if: ${{ matrix.php-version == '8.4' }} + run: php artisan package:init --check --workbench --browser --no-playwright --phpstan --rector --pint + - name: Pest if: ${{ matrix.php-version != '8.4' }} run: composer test diff --git a/.gitignore b/.gitignore index 1c5678d..8251f76 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ /.mcp.json /.claude/skills/ /.agents/ +/.codex/ /.junie/ /docs/superpowers/ /.superpowers/ diff --git a/composer.json b/composer.json index bf7ac9f..ab67f9c 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ "lattice-php/lattice": ">=0.36.0 <1.0.0" }, "require-dev": { - "bambamboole/extended-testbench": "^0.3", + "bambamboole/extended-testbench": "^0.6", "bambamboole/laravel-i18next": "^0.6.0", "larastan/larastan": "^3.0", "laravel/boost": "^2.4", @@ -34,6 +34,12 @@ } }, "extra": { + "extended-testbench": { + "check-ignore": [ + "tests/Browser/DummyTest.php", + "rector.php" + ] + }, "lattice": { "plugin": "resources/js/plugin.ts", "discover": ["src"] @@ -55,9 +61,9 @@ "post-update-cmd": [ "@boost:refresh" ], - "boost:refresh": "[ -n \"$CI\" ] || [ ! -f vendor/bin/testbench ] || [ ! -f boost.json ] || vendor/bin/testbench boost:update --no-interaction || true", + "boost:refresh": "[ -n \"$CI\" ] || [ ! -f vendor/bin/testbench ] || [ ! -f boost.json ] || { [ -f package.json ] && [ ! -d node_modules ]; } || vendor/bin/testbench boost:update --no-interaction || true", "serve": "@php vendor/bin/testbench serve", - "test": "pest --testsuite=Unit,Feature", + "test": "pest --exclude-testsuite=Browser", "test:browser": [ "npm run build", "pest --testsuite=Browser" diff --git a/config/media.php b/config/media.php index 8b848fd..3a05c69 100644 --- a/config/media.php +++ b/config/media.php @@ -1,5 +1,4 @@ tests/Feature + + tests/ArchTest.php + tests/Browser @@ -21,6 +24,8 @@ + + diff --git a/pint.json b/pint.json index 4b4f940..735d7fc 100644 --- a/pint.json +++ b/pint.json @@ -1,6 +1,7 @@ { "preset": "laravel", "rules": { - "declare_strict_types": true + "declare_strict_types": true, + "blank_line_after_opening_tag": false } } diff --git a/rector.php b/rector.php index efe71a3..2a5fcf9 100644 --- a/rector.php +++ b/rector.php @@ -1,5 +1,4 @@ expect(['dd', 'ddd', 'dump', 'ray', 'var_dump', 'print_r']) + ->not->toBeUsed(); + +arch('the package uses strict types throughout') + ->expect('Lattice\Media') + ->toUseStrictTypes(); diff --git a/tests/Browser/MediaImageEditorTest.php b/tests/Browser/MediaImageEditorTest.php index c553b7f..e634177 100644 --- a/tests/Browser/MediaImageEditorTest.php +++ b/tests/Browser/MediaImageEditorTest.php @@ -1,5 +1,4 @@