This is a collection of sniffs for PHP_CodeSniffer that check an PHP 5.4 application for PHP 5.5 compatibility.
This project is currently under development
Requires at least PHP 5.3.2 but will not properly test trait
names until PHP 5.4.0 or later.
It is suggested that you test compatibility with PHP 5.5 or newer in order to use the most up-to-date PHP parser/ tokenizer.
MySQL
, mycrypt_*
)/e
modifier in regular expressionsMySQL
)setTimeZoneID
or datefmt_set_timezone_id
usageAdd "foobugs-standards/php54to55": "~2"
to your composer.json. For example
{
"require": {
"foobugs-standards/php54to55": "~2"
}
}
composer install
# test full standard
vendor/bin/phpcs --standard=php54to55/ /path/to/code
# test a single sniff only
vendor/bin/phpcs --standard=php54to55 --sniffs=Php54to55.Deprecated.Functions /path/to/code
The major version reflects PHP_Codesniffer version while minor version reflects the standard revision.