定制 anil/uplift 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

anil/uplift

Composer 安装命令:

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

README 文档

README

CI Latest Stable Version License

Two upgrade tools in one small CLI:

  1. 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.
  2. uplift deps — a dependency updater for any PHP project. Checks every dependency for releases newer than your constraints allow, and rewrites composer.json when 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:

  1. Bumps the right Composer constraintslaravel/framework plus the first-party packages you actually use (Sanctum, Passport, Horizon, Telescope, Scout, Pint, Pest, …), and removes packages that have been folded into the framework.
  2. Runs composer update to resolve the new dependency tree.
  3. Applies automated code changes via Rector + the community rector-laravel upgrade sets.
  4. Prints a manual checklist pulled live from the official https://laravel.com/docs/{version}.x/upgrade guide, plus curated notes for the things automation can't safely do.
  5. 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.2 becomes ^2.4, ~1.2.3 becomes ~2.4.1, 1.2.* becomes 2.4.*, exact pins stay exact pins, v-prefixes and @stability flags survive. OR-ranges, hyphen ranges and dev-* 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-reqs turns 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.

anil/uplift 适用场景与选型建议

anil/uplift 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 07 月 15 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「cli」 「composer」 「migration」 「laravel」 「dependencies」 「upgrade」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 anil/uplift 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 anil/uplift 我们能提供哪些服务?
定制开发 / 二次开发

基于 anil/uplift 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-07-15