From 334e8d17925074ff5a2c7566d00dd16eba6cc961 Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Fri, 31 Jul 2026 07:38:22 +0300 Subject: [PATCH] remove stale backend tooling Stop invoking the unavailable formatter and remove factory usage for the missing user factory. Give PHPStan workers the same memory allowance as the development shell. --- ai/backend-context.md | 3 +-- ai/shared.md | 4 +--- backend/app/Models/User.php | 5 +---- backend/composer.json | 9 +-------- backend/database/seeders/DatabaseSeeder.php | 10 ---------- 5 files changed, 4 insertions(+), 27 deletions(-) diff --git a/ai/backend-context.md b/ai/backend-context.md index 3d5dea4..088ed62 100644 --- a/ai/backend-context.md +++ b/ai/backend-context.md @@ -102,7 +102,6 @@ pattern. - Run the focused test during development. - Run `php artisan test` before completion. -- Run the Composer lint and static-analysis scripts when their dependencies - are available. +- Run the Composer static-analysis scripts. - Fix failures caused by the change. Report unrelated baseline failures precisely rather than hiding them or expanding scope without authorization. diff --git a/ai/shared.md b/ai/shared.md index 860da67..2f792aa 100644 --- a/ai/shared.md +++ b/ai/shared.md @@ -156,11 +156,9 @@ gate affected by the change. ### Backend - Run tests from `backend/` with `php artisan test`. -- Run the Composer checks defined by `backend/composer.json` when their - dependencies are available: +- Run the Composer checks defined by `backend/composer.json`: ```sh - composer lint:check composer types:check composer test ``` diff --git a/backend/app/Models/User.php b/backend/app/Models/User.php index 08fa66a..4c7c078 100644 --- a/backend/app/Models/User.php +++ b/backend/app/Models/User.php @@ -3,10 +3,8 @@ namespace App\Models; // use Illuminate\Contracts\Auth\MustVerifyEmail; -use Database\Factories\UserFactory; use Illuminate\Database\Eloquent\Attributes\Fillable; use Illuminate\Database\Eloquent\Attributes\Hidden; -use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; use Illuminate\Support\Carbon; @@ -25,8 +23,7 @@ use Illuminate\Support\Carbon; #[Hidden(['password', 'remember_token'])] class User extends Authenticatable { - /** @use HasFactory */ - use HasFactory, Notifiable; + use Notifiable; /** * Get the attributes that should be cast. diff --git a/backend/composer.json b/backend/composer.json index d63a04c..e4cea72 100644 --- a/backend/composer.json +++ b/backend/composer.json @@ -46,12 +46,6 @@ "Composer\\Config::disableProcessTimeout", "@php artisan dev" ], - "lint": [ - "pint --parallel" - ], - "lint:check": [ - "pint --parallel --test" - ], "ci:check": [ "Composer\\Config::disableProcessTimeout", "npm run lint:check", @@ -60,11 +54,10 @@ "@test" ], "types:check": [ - "phpstan analyse" + "phpstan analyse --memory-limit=1G" ], "test": [ "@php artisan config:clear --ansi", - "@lint:check", "@types:check", "@php artisan test" ], diff --git a/backend/database/seeders/DatabaseSeeder.php b/backend/database/seeders/DatabaseSeeder.php index 6b901f8..dc2b6db 100644 --- a/backend/database/seeders/DatabaseSeeder.php +++ b/backend/database/seeders/DatabaseSeeder.php @@ -2,24 +2,14 @@ namespace Database\Seeders; -use App\Models\User; -use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; class DatabaseSeeder extends Seeder { - use WithoutModelEvents; - /** * Seed the application's database. */ public function run(): void { - // User::factory(10)->create(); - - User::factory()->create([ - 'name' => 'Test User', - 'email' => 'test@example.com', - ]); } }