Upgrade from Laravel 9.x to 10.x#981
Open
DrewAPicture wants to merge 8 commits into
Open
Conversation
Replace deprecated build() method with envelope() and Content() methods using the Envelope and Content classes already imported.
- Remove ->namespace() calls (null no-op; omitted in L10 skeleton) - Replace optional() helper with null-safe operator (?->)
Swap Fideloper\Proxy\TrustProxies for the equivalent Illuminate\Http\Middleware\TrustProxies class. The fideloper/proxy package will be removed from composer.json in a subsequent step.
- Replace Livewire.components.getComponentsByName() with Livewire.getByName() (v2 API removed in Livewire 3) - Remove manual livewire.js script tag (path changed in v3) - Replace <livewire:scripts /> with @livewireScripts directive
- laravel/framework ^9.52.4 -> ^10.0 - livewire/livewire ^2.12 -> ^3.0 - rappasoft/laravel-livewire-tables ^2.15 -> ^3.0 - laravel-lang/common ^2.0 -> ^5.0 (v2 sub-dep locks to L9) - nunomaduro/collision ^6.1 -> ^7.0 - Remove fideloper/proxy (replaced by Illuminate TrustProxies) - php >=8.0 -> >=8.1 (L10 minimum) - barryvdh/laravel-ide-helper ^2.12 -> ^2.13 - laravel/breeze ^1.1 -> ^2.0 - mockery/mockery ^1.4.2 -> ^1.6 - spatie/laravel-ignition ^1.0 -> ^2.0 - phpunit/phpunit ^9.3.3 -> ^10.5
- laravel/framework 9.52.21 -> 10.50.2 - livewire/livewire 2.12.8 -> 3.8.0 - rappasoft/laravel-livewire-tables 2.15.0 -> 3.7.3 - laravel-lang/common 2.0.0 -> 5.4.0 - nunomaduro/collision 6.4.0 -> 7.12.0 - phpunit/phpunit 9.6.32 -> 10.5.63 - Publish rappasoft laravel-livewire-tables v3 views - Drop fideloper/proxy (replaced by Illuminate TrustProxies) - Correct laravel/breeze constraint to ^1.29 (v2 targets L11+)
lang:update ran during composer post-update-cmd and added new translation files (actions.php, http-statuses.php, .json locale files) for all installed locales as part of the v2 -> v5 upgrade.
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.
Summary
This PR bumps Laravel from 9.x to 10.x and LiveWire from 2.x to 3.x.
Details
This micro-bump maintains the documented PHP 8.1 minimum, which means you probably won't have to update many / any docs to do it and it starts the ball rolling toward adopting more modern Laravel support.
With these changes, existing users are unaffected unless they upgrade and new users get slightly more modern Laravel. Seems like a win/win situation.
For reference:
Changes
162 files changed sounds like a lot, I get it! But something like 95% of those file changes are from language files getting generated and vendor views getting added.
ReportSubmissionMail:build()becomesenvelope()+content()RouteServiceProvider: remove->namespace()calls, makesoptional()nullsafeTrustProxies: Third-party middleware now bundled as first-partyusers.blade.php: Livewire 3 JS API + script loadingphpunit.xml: removeprocessUncoveredFiles(deprecated)composer.json: all dependency constraint changeslang:updateNotes on non-obvious changes:
fideloper/proxyis dropped as a dependency. Laravel 10 ships a first-partyIlluminate\Http\Middleware\TrustProxieswith an identical contract, so the middleware body is unchanged — only the import got swapped->namespace()removal —$namespacewas already commented out, so these calls were already no-op. The Laravel 10 skeleton omits them.build()is deprecated in Laravel 10. The class already had unusedEnvelopeandContentimports from the Laravel 10-style stub, so this was purely wiring them up.laravel-lang/commonv5 expanded the published set to includeactions.php,http-statuses.php, and per-locale.jsonfiles. These were generated automatically bylang:updaterunning in thepost-update-cmdhook.