Fix migrations and deploy issues + errors + linting

- scan both pending/ and applied/ dirs so remote catch-up works
- fix remote 500s: run.php handles per-statement errors so VIEW rebuilds run after duplicate columns; replace mb_strimwidth with substr (no mbstring extension on server)
- add missing migration: 015_license_custom.sql (column existed in schema.sql but was never migrated)
- remote: fgetcsv enclosure single-char + AdminLogger permission-denied
guard + deploy always migrates
- fix admin-filters wrapping: restore flex-wrap, flex-basis on
inputs/selects, shrink-protect buttons
- fix phpstan: remove redundant ?? [] after isset guard in
ThesisEditController
- biome: exclude vendored min.js via includes patterns;
lint whole js dir; modernise beforeunload-guard.js
This commit is contained in:
Pontoporeia
2026-05-07 23:45:09 +02:00
parent bdd95341b0
commit e3896811c4
15 changed files with 153 additions and 71 deletions

15
TODO.md
View File

@@ -195,6 +195,21 @@
- [x] All three form pages (admin add, admin edit, partage) updated
- [x] Controllers updated: `collectJuryMembers`, `validateAndSanitise`, `buildFileSizeInfo`, `license_custom`, `cc2r``cc4r` mapping
## Fix biome lint config + beforeunload-guard.js
- [x] `biome.json` — use `files.includes` negation patterns to exclude `htmx/overtype/sortable.min.js`
- [x] `justfile lint-biome` — lint entire `app/public/assets/js/` dir (no hardcoded file list)
- [x] `beforeunload-guard.js` — modernise: `var``const`/`let`, `function()`→arrow functions, `for` loop→`for…of`
## Fix admin-filters wrapping
- [x] `.admin-list-toolbar .admin-filters` — restore `flex-wrap: wrap`, add `min-width: 0`
- [x] Search input: `flex: 1 1 10rem; min-width: 10rem` so it grows but doesn't collapse
- [x] Selects: `flex: 1 1 7rem; min-width: 7rem` for graceful wrap
- [x] Buttons: `flex-shrink: 0` so they never compress
## Fix remote errors (2026-05-08)
- [x] `admin/index.php``fgetcsv()` enclosure `'\"'` (two chars) → `'"'` (single char); fatal on PHP 8.4
- [x] `AdminLogger::write()` — guard `error_log()` with `is_writable()` check; silently skips file logging when `/var/log/xamxam.log` is not writable (DB mirror still runs)
## Fix form field required states & missing fields per spec
- [x] Admin add: add `contact_public` checkbox (matching edit form)
- [x] Admin add + partage + admin edit: formats checkbox-list `$required = true`