diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 093455d..22ee78c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -42,11 +42,11 @@ jobs: - name: Install DevDojo Auth from current branch run: composer require devdojo/auth:dev-${{ env.branch }} --with-all-dependencies working-directory: ./laravel_app - + - name: Publish the DevDojo Auth Assets run: php artisan vendor:publish --tag=auth:assets working-directory: ./laravel_app - + - name: Publish the DevDojo Configs run: php artisan vendor:publish --tag=auth:config working-directory: ./laravel_app @@ -81,9 +81,9 @@ jobs: - name: Run the migrations run: php artisan migrate working-directory: ./laravel_app - + - name: Run the Auth Migrations - run: php artisan migrate --path=vendor/devdojo/auth/database/migrations + run: php artisan migrate --path=vendor/devdojo/auth/database/migrations working-directory: ./laravel_app # Testing on a mac, this command should be: @@ -91,7 +91,7 @@ jobs: - name: Remove PHPUnit from composer.json run: sed -i '/"phpunit\/phpunit"/d' composer.json working-directory: ./laravel_app - + - name: Remove composer.lock and re-run composer install run: | @@ -103,6 +103,10 @@ jobs: run: composer require pestphp/pest --dev --with-all-dependencies working-directory: ./laravel_app + - name: Install PHPStan + run: composer require phpstan/phpstan --dev --with-all-dependencies + working-directory: ./laravel_app + - name: Clear all view caches run: php artisan view:clear working-directory: ./laravel_app @@ -110,3 +114,7 @@ jobs: - name: Run Tests run: ./vendor/bin/pest working-directory: ./laravel_app + + - name: Run PHPStan for DevDojo Auth + run: ./vendor/bin/phpstan analyse --memory-limit=1G vendor/devdojo/auth/src + working-directory: ./laravel_app diff --git a/composer.json b/composer.json index 509ec8e..c91755d 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,8 @@ "laravel/pint": "^1.15", "orchestra/testbench": "^9.0", "pestphp/pest": "^2.34", - "pestphp/pest-plugin-laravel": "^2.4" + "pestphp/pest-plugin-laravel": "^2.4", + "phpstan/phpstan": "^1.11" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 8a4dfeb..5947eaa 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "677cb059648cc72bdadef766a2db5904", + "content-hash": "476f31833b705fd9a4719a1b643c7557", "packages": [ { "name": "bacon/bacon-qr-code", @@ -8547,16 +8547,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.67", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "16ddbe776f10da6a95ebd25de7c1dbed397dc493" + "reference": "e524358f930e41a2b4cca1320e3b04fc26b39e0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/16ddbe776f10da6a95ebd25de7c1dbed397dc493", - "reference": "16ddbe776f10da6a95ebd25de7c1dbed397dc493", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e524358f930e41a2b4cca1320e3b04fc26b39e0b", + "reference": "e524358f930e41a2b4cca1320e3b04fc26b39e0b", "shasum": "" }, "require": { @@ -8601,7 +8601,7 @@ "type": "github" } ], - "time": "2024-04-16T07:22:02+00:00" + "time": "2024-05-15T08:00:59+00:00" }, { "name": "phpunit/php-code-coverage",