endel / php-code-downgrade
dev-master
2016-01-20 21:18 UTC
Requires
- php: >=5.4.0
- endel/galapagos: dev-master
- nategood/commando: ~0.2
This package is not auto-updated.
Last update: 2024-12-18 15:06:58 UTC
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]
toarray(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