fix(ci): fix autoloading and bootstrap cache issues causing test failures
API CI/CD / Validate (composer + pint) (push) Successful in 2m8s
API CI/CD / Test (PHPUnit) (push) Failing after 54s
API CI/CD / Build frontend assets (push) Successful in 53s
API CI/CD / Security audit (push) Successful in 33s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped

Three changes:
1. Add composer dump-autoload after composer install in all jobs
   (validate, test, security) — ensures fresh autoloader mapping
2. Replace config:clear + view:clear with optimize:clear in test job
   — clears bootstrap/cache (services.php, packages.php) which
   caused 'Class not found' for Sanctum\Guard, 'not instantiable'
   for AttendanceMailerService, and 'factory() undefined' for User
3. Add explicit $incrementing = true to Configuration model
   — ensures Eloquent treats id as auto-increment (belt-and-suspenders
   for SQLite NOT NULL constraint failures)
This commit is contained in:
root
2026-06-25 17:27:53 -04:00
parent 16e4f235f0
commit 181ac9e94e
2 changed files with 11 additions and 5 deletions
+1
View File
@@ -10,6 +10,7 @@ class Configuration extends BaseModel
// The legacy table only has id/config_key/config_value.
public $timestamps = false;
public $incrementing = true;
protected $fillable = [
'config_key',