Skip to content

Upgrade Laravel 10 → 12 + PHPUnit 11 + CI - #32

Merged
agitnaeta merged 12 commits into
masterfrom
upgrade/laravel-12
Aug 27, 2026
Merged

agitnaeta merged 12 commits into
masterfrom
upgrade/laravel-12

Conversation

@agitnaeta

@agitnaeta agitnaeta commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Ringkasan

Upgrade framework RitmeHR Laravel 10.39 → 12.68 dengan Backpack tetap 6.8, plus modernisasi test automation & CI baru. 8 fase, semua test hijau di tiap langkah.

Perubahan

  • F1 Backpack CRUD 6.5 → 6.8 (support L10/11/12; tak perlu BP7)
  • F2 Laravel 10 → 11.56 (sanctum 4, dompdf 3, collision 8)
  • F3 Laravel 11 → 12.68
  • T1 PHPUnit 10 → 11 (konversi @dataProvider → #[DataProvider])
  • T2 Browser suite 146/146 hijau (root cause 2 FAIL = data test, bukan bug)
  • T3 CI GitHub Actions baru (matrix PHP 8.2/8.3 + MySQL + Vite + pymupdf)
  • F4 README badge L12 + regresi final

Test

  • PHPUnit 403/403 hijau (lokal + CI PHP 8.2 & 8.3)
  • Browser crud-suite 146/146 hijau (termasuk slip PDF dompdf 3)
  • Security advisories 90 → 0
  • Detail per fase: docs/review-version-2/

Berbasis audit nyata (composer why-not, struktur app, test suite):
- Critical path = Backpack CRUD 6->7 (bukan Laravel), krn BP6 terkunci ^L10
- Estimasi: Laravel upgrade ~8-13 hari, test realign ~6-10 hari
- 8 task file ber-checklist DONE (F0-F4 upgrade, T1-T3 test)
- Verifikasi: BP7.1.15 tersedia, collision7 conflict L11+, dep transitif OK
Review teknis v2 (utang teknis, bukan UX):
- README: scorecard kesehatan teknis + estimasi (upgrade 8-13hr, test 6-10hr)
- masukan-teknis: 9 temuan RV2-xxx ber-severity + lokasi/perbaikan
- rencana-perbaikan: detail fase F0-F4 + T1-T3, paket, risiko, keputusan
- tasks/: 8 task ber-checklist DONE (pindahan dari upgrade-plan, dikonsolidasi)
Basis audit nyata: composer why-not, 55 test PHPUnit, 37 browser suite, 20 custom view
- Branch upgrade/laravel-12, backup DB, baseline 403 phpunit + 146 browser hijau
- TEMUAN: Backpack 7 = Laravel 12-only; Backpack 6.8 support L10/11/12
- Revisi: tak perlu BP7 utk sampai L12 -> cukup minor 6.5->6.8
- Estimasi upgrade turun ~8-13hr -> ~4-7hr (critical path BP7 hilang)
…Test

- backpack/crud 6.5.1->6.8.16, laravel 10.39->10.50.3 (masih L10), guzzle/dbal/dll patch
- security advisories turun 90->44
- LeaveCalendarTest: ganti N+1 guard dari angka absolut (rapuh thd query boot
  Laravel baru) ke uji skala 2 vs 8 entri + guard mutlak <=10
- Verifikasi: 403 phpunit + 146 browser hijau, DOM Backpack 6.8 kompatibel
- laravel ^11, sanctum ^4, collision ^8, dompdf ^3, spatie/backup ^9, php ^8.2
- security advisories 44->3
- PHPUnit 403/403 hijau tanpa perubahan kode app
- Diverifikasi: create branch (payload minimal) tersimpan via HTTP test -> backend sehat
- Catatan: 2 item crud-suite (create branch/dept) FAIL = isu harness CSRF/cookie
  di L11 dev-server, masuk scope T2; artisan serve+Xdebug broken-pipe notice ada
  mitigasinya (XDEBUG_MODE=off display_errors=Off)
- laravel ^12, collision ^8.8 (v8.9.5 support L12), phpunit ^11
- security advisories 3->0
- Backpack tetap 6.8 (konfirmasi F0: tak perlu BP7 utk L12)
- T1: konversi @dataProvider docblock -> #[DataProvider] atribut (3x di 2 file)
- PHPUnit 11 jalan TANPA deprecation; 403/403 hijau
- 2 FAIL create (branch/dept) di F2 ternyata BUKAN CSRF/DOM/bug app
- Root cause: data ZZ sisa dari crud-suite yg di-kill -> duplikat unique ditolak
- Bukti: branch ZZ id=8 tersimpan di DB (backend sehat)
- Fix: bersihkan data ZZ, jalankan ulang -> 146/146 hijau
- lib.mjs TAK perlu diubah; DOM Backpack 6.8 + CSRF + session kompatibel L12
- .github/workflows/ci.yml: matrix PHP 8.2/8.3, service MySQL 8, cache composer
- set DB creds ke .env (phpunit.xml cuma override DB_DATABASE)
- pakai phpunit langsung + flag memory (artisan test OOM)
- Tervalidasi lokal: migrate:fresh absensi_testing + 403/403 phpunit hijau
- badge Laravel 12, PHP 8.2+, tambah badge CI (github actions)
- teks 'Dibangun dengan Laravel 12', ekstensi Laravel 12
Test yg me-render view gagal 500 di CI (ViteManifestNotFoundException) krn
public/build/manifest.json belum ada. Tambah step Setup Node + npm ci + npm run
build. public/build memang di-gitignore (di-build di CI, bukan di-commit).
scripts/extract_cv.py pakai 'import fitz' (PyMuPDF). Tanpa itu cv_text=null
di CI -> 4 test recruitment CV gagal. Tambah step pip install pymupdf.
- CI GitHub Actions HIJAU end-to-end (run 33047691017, success)
- 2 bug CI diperbaiki: Vite manifest (npm build) + pymupdf (CvExtractionTest)
- Regresi: 403 phpunit + 146 browser + CI hijau, slip PDF dompdf3 OK
- Tandai F4/T3 DONE
@agitnaeta agitnaeta changed the title Upgrade/laravel 12 Upgrade Laravel 10 → 12 + PHPUnit 11 + CI Aug 27, 2026
@agitnaeta
agitnaeta merged commit 88b2f27 into master Aug 27, 2026
4 checks passed
@agitnaeta
agitnaeta deleted the upgrade/laravel-12 branch August 27, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant