Upgrade Framework ke Laravel 13#693
Open
habibie11 wants to merge 11 commits into
Open
Conversation
|
🔄 AI PR Review sedang antri di server...
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
issue #695
🎯 Deskripsi
Pull request ini melakukan proses upgrade aplikasi Pantau dari Laravel versi sebelumnya ke Laravel 13, menggunakan arsitektur modern yang direkomendasikan oleh Laravel mulai dari versi 11. Perubahan ini menyederhanakan struktur direktori aplikasi dengan menghapus beberapa file boilerplate (
Kernel,Handler, dll) dan memusatkan konfigurasi routing, middleware, serta exception handling di dalam filebootstrap/app.php.Pembaruan ini juga menyesuaikan dependensi third-party agar kompatibel dengan ekosistem Laravel 13 dan mengatasi breaking changes seperti transisi ke Carbon versi 3 serta PHPUnit versi 12.
🛠️ Perubahan yang Dilakukan
1.
composer.jsonlaravel/frameworkmenjadi^13.0.spatie/laravel-backupmenjadi^10.0karena versi sebelumnya tidak kompatibel dengan Illuminate 13.laravel/tinkermenjadi^3.0.yajra/laravel-datatables-oraclemenjadi^13.0.barryvdh/laravel-debugbarkarena belum tersedia versi stabil yang mendukung Laravel 13 secara penuh.2.
bootstrap/app.phpApplication::configure().withRouting.auth,guest,abilities,ability,tracksid,web.dashboard) langsung via metodewithMiddleware.withExceptions.3. Migrasi Console Kernel
app/Console/Kernel.phplangsung keroutes/console.php.4. Konsolidasi Service Provider
AuthServiceProvider,EventServiceProvider,RouteServiceProvider, danBroadcastServiceProvider.RateLimiterdan fungsi inisialisasi Gate) keapp/Providers/AppServiceProvider.php.5.
config/app.php6. Perbaikan Inkompatibilitas & Refaktor Kode
addDays()diapp/Http/Controllers/DashboardController.phpagar menggunakan tipe data(int), karena Carbon 3 menerapkan strict type checking.MAIL_FROM_ADDRESSdi file.envsebagai syarat wajib baru darispatie/laravel-backupv10.RouteServiceProvider::HOMEdengan string statis'/dashboard'pada berbagai Controllers dan Tests.7. Migrasi PHPUnit 12
phpunit.xmlke standar PHPUnit 12 melalui perintah otomasivendor/bin/phpunit --migrate-configuration.✅ Test Cases yang Diimplementasikan
php artisan servetanpa adanya error missing classes.php artisan package:discover).php artisan schedule:list).php artisan test).PenggunaRegionAccessTestpassed) setelah penyesuaian alias middleware dibootstrap/app.php.📸 Cara Menjalankan Uji Coba Manual
php artisan testuntuk memastikan semua integrasi berjalan normal.📸 Screenshot atau Video