Skip to content

rzumstein/php4-constructor-detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

PHP4 Constructor Detector

Description

Finds PHP classes that use the PHP4 constructor style that is now deprecated in PHP5 when using namespaces, and completely deprecated in PHP7. Useful for checking if your codebase uses PHP4 constructors when upgrading PHP.

Use

Clone this repo or download php4-constructor-detector.py. Run the script by providing a directory to scan for PHP files, e.g.:

chmod +x php4-constructor-detector ./php4-constructor-detector.py /path/to/src/

Supported Platforms

  • Windows
  • OS X
  • Linux

Todo

  • Allow ignoring (sub)directories
  • Allow non-recursive scanning
  • Add option to automatically fix php4 constructors
  • Show how many violations each file has as opposed to just showing the filename
  • Add sanity checking to ensure the user actually passes in a directory as an argument

About

Finds files using PHP4-style constructors in a specified directory

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages