2017 © Pedro Peláez
 

library php-code-downgrade

image

endel/php-code-downgrade

  • Wednesday, January 20, 2016
  • by endel
  • Repository
  • 6 Watchers
  • 45 Stars
  • 19 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 2 Open issues
  • 1 Versions
  • 19 % Grown

The README.md

php-code-downgrade

Tool to downgrade your PHP codebase from PHP 5.4+ to PHP 5.3. Built on top of galapagos., (*1)

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

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

Why?

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

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:, (*5)

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

License

MIT, (*6)

The Versions

20/01 2016

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

php code tool downgrade