Installs larastan/larastan ^3.0 (v3.9.6) as a dev-dependency. Level 6 is the starting target — catches missing typehints, method- existence, null-safety, and model-property existence. Level 8 deferred to a follow-up sprint after level-6 baseline reaches zero. Baseline error count at install: 1556 errors across 678 analysed files (41 distinct identifiers). Top 10 identifiers (errors / files): 613 / 87 property.notFound 289 / 52 missingType.generics 154 / 31 argument.templateType 98 / 61 missingType.iterableValue 77 / 32 argument.type 50 / 26 method.notFound 35 / 35 method.childReturnType 32 / 9 method.unresolvableReturnType 31 / 10 assign.propertyType 28 / 17 instanceof.alwaysTrue Composer scripts: - composer analyse — run static analysis - composer analyse:baseline — regenerate baseline - composer analyse:clear-cache — clear PHPStan result cache Config deviation from plan: checkGenericClassInNonGenericObjectType was removed in PHPStan 2.x (which Larastan 3 bundles) — setting dropped from phpstan.neon, otherwise config matches the work package verbatim. Defaults cover the original intent. Documentation: /dev-docs/LARASTAN.md added; CLAUDE.md quality-gates section introduced (with PHPUnit + Pint + Larastan listed). Backlog: /dev-docs/BACKLOG.md gets 10 per-identifier reduction sprints (TECH-LARASTAN-01..10) seeded from the actual baseline top categories, plus TECH-LARASTAN-CI and TECH-LARASTAN-L8 follow-ups. Memory limit 2G (baseline generation completed within it). No production behavior change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
98 lines
3.3 KiB
JSON
98 lines
3.3 KiB
JSON
{
|
|
"$schema": "https://getcomposer.org/schema.json",
|
|
"name": "laravel/laravel",
|
|
"type": "project",
|
|
"description": "The skeleton application for the Laravel framework.",
|
|
"keywords": ["laravel", "framework"],
|
|
"license": "MIT",
|
|
"require": {
|
|
"php": "^8.2",
|
|
"barryvdh/laravel-dompdf": "^3.1",
|
|
"endroid/qr-code": "^6.1",
|
|
"laravel/framework": "^12.0",
|
|
"laravel/sanctum": "^4.0",
|
|
"laravel/tinker": "^2.10.1",
|
|
"pragmarx/google2fa": "^9.0",
|
|
"spatie/laravel-activitylog": "^5.0",
|
|
"spatie/laravel-medialibrary": "^11.21",
|
|
"spatie/laravel-permission": "^7.2"
|
|
},
|
|
"require-dev": {
|
|
"fakerphp/faker": "^1.23",
|
|
"larastan/larastan": "^3.0",
|
|
"laravel/pail": "^1.2.2",
|
|
"laravel/pint": "^1.24",
|
|
"laravel/sail": "^1.41",
|
|
"mockery/mockery": "^1.6",
|
|
"nunomaduro/collision": "^8.6",
|
|
"phpunit/phpunit": "^11.5.3"
|
|
},
|
|
"autoload": {
|
|
"psr-4": {
|
|
"App\\": "app/",
|
|
"Database\\Factories\\": "database/factories/",
|
|
"Database\\Seeders\\": "database/seeders/"
|
|
}
|
|
},
|
|
"autoload-dev": {
|
|
"psr-4": {
|
|
"Tests\\": "tests/"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"setup": [
|
|
"composer install",
|
|
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\"",
|
|
"@php artisan key:generate",
|
|
"@php artisan migrate --force",
|
|
"npm install",
|
|
"npm run build"
|
|
],
|
|
"dev": [
|
|
"Composer\\Config::disableProcessTimeout",
|
|
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite --kill-others"
|
|
],
|
|
"test": [
|
|
"@php artisan config:clear --ansi",
|
|
"@php artisan test"
|
|
],
|
|
"analyse": "vendor/bin/phpstan analyse --memory-limit=2G",
|
|
"analyse:baseline": "vendor/bin/phpstan analyse --generate-baseline --memory-limit=2G",
|
|
"analyse:clear-cache": "vendor/bin/phpstan clear-result-cache",
|
|
"post-autoload-dump": [
|
|
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
|
"@php artisan package:discover --ansi"
|
|
],
|
|
"post-update-cmd": [
|
|
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
|
|
],
|
|
"post-root-package-install": [
|
|
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
|
],
|
|
"post-create-project-cmd": [
|
|
"@php artisan key:generate --ansi",
|
|
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
|
|
"@php artisan migrate --graceful --ansi"
|
|
],
|
|
"pre-package-uninstall": [
|
|
"Illuminate\\Foundation\\ComposerScripts::prePackageUninstall"
|
|
]
|
|
},
|
|
"extra": {
|
|
"laravel": {
|
|
"dont-discover": []
|
|
}
|
|
},
|
|
"config": {
|
|
"optimize-autoloader": true,
|
|
"preferred-install": "dist",
|
|
"sort-packages": true,
|
|
"allow-plugins": {
|
|
"pestphp/pest-plugin": true,
|
|
"php-http/discovery": true
|
|
}
|
|
},
|
|
"minimum-stability": "stable",
|
|
"prefer-stable": true
|
|
}
|