Skip to content

Upgrade from Laravel 9.x to 10.x#981

Open
DrewAPicture wants to merge 8 commits into
LinkStackOrg:mainfrom
DrewAPicture:upgrade/laravel-10-compat
Open

Upgrade from Laravel 9.x to 10.x#981
DrewAPicture wants to merge 8 commits into
LinkStackOrg:mainfrom
DrewAPicture:upgrade/laravel-10-compat

Conversation

@DrewAPicture
Copy link
Copy Markdown

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:

  • Laravel 9.x was EOL'd February 2024
  • Laravel 11.x was just EOL'd a couple months ago
  • Laravel 11.x & 12.x both require PHP 8.2+
  • Laravel 13.x requires PHP 8.3+.

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.

Commit Change
82d469a ReportSubmissionMail: build() becomes envelope() + content()
bc5a66d RouteServiceProvider: remove ->namespace() calls, makes optional() nullsafe
ce01173 TrustProxies: Third-party middleware now bundled as first-party
f7126a8 users.blade.php: Livewire 3 JS API + script loading
c88920c phpunit.xml: remove processUncoveredFiles (deprecated)
5c09dfd composer.json: all dependency constraint changes
872eb13 Resolved install — Laravel 10.50.2, Livewire 3.8.0, rappasoft 3.7.3; published views
361848c New lang files from laravel-lang/common v5 lang:update

Notes on non-obvious changes:

  • TrustProxiesfideloper/proxy is dropped as a dependency. Laravel 10 ships a first-party Illuminate\Http\Middleware\TrustProxies with an identical contract, so the middleware body is unchanged — only the import got swapped
  • RouteServiceProvider ->namespace() removal$namespace was already commented out, so these calls were already no-op. The Laravel 10 skeleton omits them.
  • ReportSubmissionMailbuild() is deprecated in Laravel 10. The class already had unused Envelope and Content imports from the Laravel 10-style stub, so this was purely wiring them up.
  • New lang fileslaravel-lang/common v5 expanded the published set to include actions.php, http-statuses.php, and per-locale .json files. These were generated automatically by lang:update running in the post-update-cmd hook.

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.
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