Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

endel/php-code-downgrade

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-code-downgrade

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

About

Make your PHP 5.4+ codebase compatible with PHP 5.3.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.