endel/php-code-downgrade 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

endel/php-code-downgrade

Composer 安装命令:

composer require endel/php-code-downgrade

包简介

README 文档

README

Tool to downgrade your PHP codebase from PHP 5.4+ to PHP 5.3. Built on top of galapagos.

Consider including php5.3-compatibility package in your project, which includes JsonSerializable and SessionHandlerInterface.

You may have to manually fix some remaining problems, usually they're quite simple.

Why?

Use it when you have a PHP 5.4+ codebase and just can't upgrade your client's infrastructure.

Features

  • Convert new array syntax to old one. ([1,2,3] to array(1,2,3))
  • Inject traits code into classes that use them.
  • Analyze every vendor's composer.json and convert them if it's needed
  • Downgrade function calls with different signature.
    • stream_context_create
    • session_set_save_handler
  • Custom node transformations

Usage

./php-code-downgrade [path-to-downgrade]

Using custom node transformations:

./php-code-downgrade [path-to-downgrade] -t transformations/phalanger

License

MIT

统计信息

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

GitHub 信息

  • Stars: 46
  • Watchers: 5
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-12-30