A VS Code extension and CLI tool that scans PHP projects for deprecated functions and suggests modern alternatives.
π Easily identify and refactor outdated PHP code to improve compatibility with the latest PHP versions.
π This is an open-source project β everyone is welcome to contribute, improve, and expand its functionality!
π₯
A screenshot showing deprecated functions highlighted in VS Code.
β
Detects deprecated PHP functions in your project.
β
Suggests modern replacements for outdated functions.
β
Works as a CLI tool and a VS Code extension.
β
Provides quick fixes in VS Code for seamless refactoring.
β
Uses an external deprecatedMappings.json
for easy updates.
β
Fully customizable β modify deprecatedMappings.json
to tailor replacements to your needs!
β
Open-source β contribute to the project and help improve it!
git clone https://github.com/yourusername/php-legacy-refactor.git
cd php-legacy-refactor
The deprecatedMappings.json file contains all deprecated functions and their suggested replacements. You can edit this file to:
Add new deprecated functions Modify replacements to fit your coding style Remove any functions you don't want flagged Example snippet from deprecatedMappings.json:
{ "each": "foreach", "split": "explode", "join": "implode", "ereg": "preg_match" }
π Simply update this file, and the CLI tool & VS Code extension will use your custom mappings.
This project is open-source, and contributions are welcome!
Fork the repository Create a new branch (feature-new-check or bugfix-fix-xyz) Make your changes and commit Submit a pull request Any contributions, from bug reports to feature improvements, are appreciated!
This project is licensed under the MIT License β you're free to use, modify, and distribute it.