Laravel verification

From affaan-m/ECC · View interactive version

Laravel verification is an AI agent skill from the GitHub repository affaan-m/ECC. Verification loop for Laravel projects: env checks, linting, static analysis, tests with coverage, security scans, and deployment readiness.

How to use this skill

Skill file

Laravel Doğrulama Döngüsü

PR'lardan önce, büyük değişikliklerden sonra ve deployment öncesi çalıştırın.

Ne Zaman Kullanılır

Nasıl Çalışır

Faz 1: Ortam Kontrolleri

php -v
composer --version
php artisan --version

Yerel olarak Laravel Sail kullanıyorsanız:

./vendor/bin/sail php -v
./vendor/bin/sail artisan --version

Faz 1.5: Composer ve Autoload

composer validate
composer dump-autoload -o

Faz 2: Linting ve Static Analiz

vendor/bin/pint --test
vendor/bin/phpstan analyse

Projeniz PHPStan yerine Psalm kullanıyorsa:

vendor/bin/psalm

Faz 3: Testler ve Kapsam

php artisan test

Kapsam (CI):

XDEBUG_MODE=coverage php artisan test --coverage

CI örneği (format -> static analiz -> testler):

vendor/bin/pint --test
vendor/bin/phpstan analyse
XDEBUG_MODE=coverage php artisan test --coverage

Faz 4: Güvenlik ve Bağımlılık Kontrolleri

composer audit

Faz 5: Database ve Migration'lar

php artisan migrate --pretend
php artisan migrate:status

Faz 6: Build ve Deployment Hazırlığı

php artisan optimize:clear
php artisan config:cache
php artisan route:cache
php artisan view:cache

Faz 7: Kuyruk ve Zamanlayıcı Kontrolleri

php artisan schedule:list
php artisan queue:failed

Horizon kullanılıyorsa:

php artisan horizon:status

queue:monitor mevcutsa, job'ları işlemeden biriktirmeyi kontrol etmek için kullanın:

php artisan queue:monitor default --max=100

Aktif doğrulama (sadece staging): özel bir kuyruğa no-op job dispatch edin ve işlemek için tek bir worker çalıştırın (non-sync kuyruk bağlantısının yapılandırıldığından emin olun).

php artisan tinker --execute="dispatch((new App\\Jobs\\QueueHealthcheck())->onQueue('healthcheck'))"
php artisan queue:work --once --queue=healthcheck

Job'un beklenen yan etkiyi ürettiğini doğrulayın (log girişi, healthcheck tablo satırı veya metrik).

Bunu sadece test job'u işlemenin güvenli olduğu non-production ortamlarında çalıştırın.

Örnekler

Minimal akış:

php -v
composer --version
php artisan --version
composer validate
vendor/bin/pint --test
vendor/bin/phpstan analyse
php artisan test
composer audit
php artisan migrate --pretend
php artisan config:cache
php artisan queue:failed

CI tarzı pipeline:

composer validate
composer dump-autoload -o
vendor/bin/pint --test
vendor/bin/phpstan analyse
XDEBUG_MODE=coverage php artisan test --coverage
composer audit
php artisan migrate --pretend
php artisan optimize:clear
php artisan config:cache
php artisan route:cache
php artisan view:cache
php artisan schedule:list
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.