anil / uplift
Uplift — a free, open-source Laravel upgrader and dependency updater. Steps a Laravel app up to the latest version one release at a time (Rector-powered, one clean git commit per step), and checks any Composer project's dependencies for newer releases, rewriting the constraints on demand.
Requires
- php: >=8.2
- ext-json: *
- composer/metadata-minifier: ^1.0
- composer/semver: ^3.4
- driftingly/rector-laravel: ^1.2 || ^2.0
- rector/rector: ^1.2 || ^2.0
- symfony/console: ^6.4 || ^7.0 || ^8.0
- symfony/css-selector: ^6.4 || ^7.0 || ^8.0
- symfony/dom-crawler: ^6.4 || ^7.0 || ^8.0
- symfony/filesystem: ^6.4 || ^7.0 || ^8.0
- symfony/http-client: ^6.4 || ^7.0 || ^8.0
- symfony/http-client-contracts: ^3.0
- symfony/process: ^6.4 || ^7.0 || ^8.0
Requires (Dev)
- laravel/pint: ^1.29
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^10.5 || ^11.0
README
Two upgrade tools in one small CLI:
uplift upgrade— a free, open-source Laravel upgrader. Steps your app up to the latest version one release at a time, with automated code changes and a clean, reviewable commit per step.uplift deps— a dependency updater for any PHP project. Checks every dependency for releases newer than your constraints allow, and rewritescomposer.jsonwhen you ask it to.
Repo:
github.com/anilkumarthakur60/uplift· Packagist:anil/uplift
uplift upgrade — the Laravel upgrader
It steps a Laravel application up to the latest version one release at a time, and for each hop it:
- Bumps the right Composer constraints —
laravel/frameworkplus the first-party packages you actually use (Sanctum, Passport, Horizon, Telescope, Scout, Pint, Pest, …), and removes packages that have been folded into the framework. - Runs
composer updateto resolve the new dependency tree. - Applies automated code changes via Rector + the community rector-laravel upgrade sets.
- Prints a manual checklist pulled live from the official
https://laravel.com/docs/{version}.x/upgradeguide, plus curated notes for the things automation can't safely do. - Commits the result — one clean, reviewable commit per version (e.g.
Upgrade Laravel 9.x to 10.x).
So a 9 → 13 upgrade lands as four separate, reviewable commits on a dedicated branch.
⚠️ It does what can be automated — not everything. No tool can fully upgrade an arbitrary app. Always review each commit, work through the printed checklist, and run your test suite before merging.
Installation
Install it globally so you can point it at any project:
composer global require anil/uplift
Make sure your global Composer bin directory is on your PATH (e.g. ~/.composer/vendor/bin or ~/.config/composer/vendor/bin).
Or run it from source:
git clone https://github.com/anilkumarthakur60/uplift.git
cd uplift
composer install
./bin/uplift --help
Usage
From inside your Laravel project (or by passing its path):
# See what would happen — detects your version and prints the plan uplift diagnose # Preview the changes without touching anything uplift upgrade --dry-run # Do the upgrade, all the way to the latest known version uplift upgrade # Upgrade only as far as a specific version uplift upgrade --to=11 # Point at a project elsewhere uplift upgrade /path/to/app
Useful options
| Option | What it does |
|---|---|
--to=N |
Stop at major version N (default: latest known) |
--dry-run |
Show the plan and run Rector in preview mode; write nothing |
--no-git |
Don't branch or commit; leave changes in the working tree |
--branch=NAME |
Name of the branch to create (default: uplift/<from>-to-<to>) |
--allow-dirty |
Proceed even with uncommitted changes |
--skip-composer |
Edit composer.json but don't run composer update |
--skip-rector |
Skip the automated code transformations |
-y, --yes |
Don't ask for confirmation |
uplift deps — the dependency updater
composer outdated tells you what's stale, but leaves your constraints alone.
uplift deps goes the rest of the way — it finds the newest release of every
dependency beyond what your current constraints allow, shows you the jump,
and rewrites composer.json when you pass -u. It works on any Composer
project, Laravel or not.
cd your-project # Report what could move (writes nothing) uplift deps require laravel/framework ^10.0 → ^12.63 major · latest v13.19.0 needs php ^8.3 spatie/laravel-permission ^5.5 → ^6.25 major inertiajs/inertia-laravel ^0.6.3 → ^3.1.1 major require-dev phpunit/phpunit ^9.5 → ^11.5 major laravel/pint 1.13.0 → 1.29.3 minor ⚠ swiftmailer/swiftmailer is abandoned — consider symfony/mailer instead. # Write the new constraints, then install them uplift deps -u composer update
What it gets right:
- Constraint style is preserved —
^1.2becomes^2.4,~1.2.3becomes~2.4.1,1.2.*becomes2.4.*, exact pins stay exact pins,v-prefixes and@stabilityflags survive. OR-ranges, hyphen ranges anddev-*branches are never guessed at; they're listed as skipped instead. - PHP-aware — it only proposes releases your platform PHP can actually
install (respecting
config.platform.php), and tells you when something newer is held back by its PHP requirement.--ignore-platform-reqsturns this off. - Stable releases only — alphas, betas and RCs are ignored.
- Abandoned packages are flagged, with Packagist's suggested replacement — even when the version itself is "up to date".
- Fast — all Packagist lookups run concurrently.
| Option | What it does |
|---|---|
-u, --upgrade |
Rewrite composer.json (default: just report) |
-t, --target=latest|minor|patch |
How far to move: newest overall, newest on the current major, or newest on the current minor |
-f, --filter=GLOB |
Only check matching packages (e.g. -f 'symfony/*', repeatable) |
-x, --reject=GLOB |
Never touch matching packages |
--dep=all|prod|dev |
Limit to require / require-dev |
--ignore-platform-reqs |
Propose releases even if they need a newer PHP |
--json |
Print only the proposed constraints, as JSON |
--fail-on-outdated |
Exit 1 when updates exist — a one-line CI freshness gate |
How the Laravel upgrader works
The upgrade knowledge lives as plain data in
src/Laravel/VersionRegistry.php — one
UpgradeStep per release hop describing the PHP requirement, the package
constraints to set, packages to remove, and which Rector sets to run. This makes
it easy to keep current with new Laravel releases: add a step, ship a release.
The tool runs against a clean git working tree and creates a dedicated branch, so the upgrade is always easy to review or throw away.
Requirements
- PHP 8.2+ (to run the tool itself — your target app can be older)
- Composer 2 on your
PATH - Git (only used by
uplift upgrade, and skippable with--no-git)
Contributing
The most valuable contributions are keeping the version registry accurate and extending the Rector coverage. PRs welcome.
License
MIT.