Laravel 4 → 12

Laravel Upgrade Service: from Laravel 4 to Laravel 12

Laravel moves fast and so do its breaking changes. We combine the community Rector Laravel sets with custom rules for your project, so every major upgrade lands as a series of small pull requests, not a frozen sprint.

Typical blockers

What stops a Laravel upgrade

  • Facades and global helpers hiding dependencies, so nothing tells you what breaks when a class moves
  • Removed helpers like array_get() and str_slug(), renamed Eloquent methods and casts
  • Custom service providers, middleware and console kernels built on an API that no longer exists
  • Packages pinned to an old Laravel major with no maintained release
How we do it

Step by step, always mergeable

  1. Intro analysis: we measure facade usage, removed helpers and abandoned packages and price each Laravel major separately.
  2. Replace facade aliases and helpers with constructor injection using Rector Laravel rules, so the code compiles against any Laravel version.
  3. Bump one Laravel major at a time. Composer-based sets apply the exact rules for the version you install.
  4. Add PHPStan with Larastan to CI, so the next Laravel release is a day of work for your own team.

What the diff looks like

Every change is a reviewable diff, small enough to merge the same day.

laravel-upgrade.diff
-class OrderController extends Controller
-{
- public function show($id)
- {
- $order = \Order::findOrFail($id);
- $total = array_get($order->meta, 'total', 0);
-
- return \View::make('order.show', compact('order', 'total'));
- }
-}
+final class OrderController extends Controller
+{
+ public function __construct(
+ private readonly ViewFactory $viewFactory,
+ ) {
+ }
+
+ public function show(int $id): View
+ {
+ $order = Order::findOrFail($id);
+ $total = Arr::get($order->meta, 'total', 0);
+
+ return $this->viewFactory->make('order.show', compact('order', 'total'));
+ }
+}
“From upgrading our legacy project and improving team's productivity, to faster and easier code reviews, Rector is in the center of our PHP ecosystem.”
Nathan Page
Nathan Page
Technical Lead at EONX
Intro analysis
2 weeks, $6,000-8,000

Codebase measured, blockers listed, timeline and price for the whole upgrade in a PDF report.

Hands-on upgrade
$120 / hour

20-80 hours a week, in parallel to your team, every change delivered as a mergeable pull request.

Do it yourself
Open source

Browse Laravel Rector rules and read the documentation to run the upgrade with your own team.

Read more about Laravel upgrades

Request a Laravel upgrade estimate