定制 georgechitechi/upgrader 二次开发

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

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

georgechitechi/upgrader

Composer 安装命令:

composer require georgechitechi/upgrader

包简介

A tool to upgrade CodeIgniter 3 projects to CodeIgniter 4

README 文档

README

This package helps you upgrade your CodeIgniter 3 projects to CodeIgniter 4. It handles the migration of your project structure, namespaces, and various CodeIgniter-specific components.

Installation

Install the package in your CodeIgniter 3 project:

composer require georgechitechi/upgrader

Usage

Simply run the upgrade command from your CI3 project directory:

vendor/bin/ci-upgrade

The upgrader will:

  1. Use your current directory as the source
  2. Create a backup of your entire project
  3. Download the latest CI4 and set it up
  4. Migrate all your code to CI4 format
  5. Place the upgraded project in a new directory
vendor/bin/ci-upgrade upgrade

If you want to upgrade a different CI3 project, you can specify the path:

vendor/bin/ci-upgrade upgrade --path=/path/to/other/ci3/project

What Gets Upgraded

The upgrader handles the following aspects of the migration:

  1. Project Structure

    • Downloads latest CI4 installation
    • Creates proper directory structure
    • Creates a backup of your original project
  2. Controllers

    • Adds namespaces
    • Updates class extensions
    • Updates method visibility
    • Converts CI3 syntax to CI4
  3. Models

    • Adds namespaces
    • Updates class extensions
    • Updates method visibility
    • Adds CI4 model properties
  4. Views

    • Migrates to the new location
    • Updates echo syntax
    • Updates form helper syntax
    • Updates URL helper syntax
  5. Configuration

    • Converts config arrays to classes
    • Updates config file structure
    • Migrates database configuration
    • Sets up environment file
  6. Routes

    • Updates routing syntax
    • Migrates to the new routing system
  7. Helpers and Libraries

    • Adds namespaces
    • Updates file locations
    • Updates syntax to CI4 standards
  8. Composer Configuration

    • Creates/updates composer.json
    • Sets up autoloading
    • Preserves existing dependencies

After Upgrade

Your upgraded project will be in a new directory next to your current project. The original project will remain untouched, and a backup will be created with the suffix _backup_YYYY-MM-DD_HH-ii-ss.

Important Notes

  1. Always commit your changes before running the upgrader
  2. Review the upgraded code manually to ensure everything works as expected
  3. Some manual adjustments might be needed after the upgrade
  4. Test your application thoroughly after the upgrade

Manual Steps After Upgrade

  1. Review and update any third-party libraries
  2. Update any custom helpers or libraries that might need adjustments
  3. Test all forms and file uploads
  4. Update any custom database queries
  5. Review and update any session handling
  6. Test all AJAX calls and responses

Known Limitations

  • Custom libraries might need manual adjustment
  • Complex routing configurations might need review
  • Database queries might need updates for compatibility
  • Session handling might need manual updates
  • Custom hooks will need manual migration

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Author

George Chitechi

License

MIT License

georgechitechi/upgrader 适用场景与选型建议

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

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-03-05