Monthly Archives: March 2012

PHP54Compatibility 0.2 released

Last night I have merged in a few pull requests adding additional sniffs to the existing collection and packaged it all. List of all supported checks is in the README file. Check the repository on github to see it. Big thanks go to Laura Beth, Nathaniel McHugh and Ben Selby for all the contributions. I have created a pear package and published it on my github pear channel so you can easily install it from there. No more alpha release either, so even easier to install.

$> pear channel-discover proofek.github.com/pear
$> pear install proofek/PHP54Compatibility

There are 2 dependencies at the moment: PHP 5.4 and PHP_CodeSniffer 1.3+. A few people asked my to downgrade the minimum PHP version to 5.3. The reason why I want PHP 5.4 is I want to use 5.4 tokaniser to make sure  code is parsed the way it will be parsed on the target PHP 5.4 platform. If you want to run pre-checks, before you actually upgrade to 5.4, use -f flag to perform forced installation:

$> pear install -f proofek/PHP54Compatibility

But I would still encourage you to upgrade first to get the best results.

PHP 5.4 Compatibility Coding Standard for PHP_CodeSniffer

So with PHP 5.3 upgrade underway (and PHP 5.4 out of the door now!) I thought it’s time to prepare for PHP 5.4 and make sure we’re compatible. So by looking at Wim Godden’s PHP53Compatibility code sniffs I have created a base for PHP 5.4 sniffs that we want to use to make sure we’re compatible. It’s a base, so it’s not finished/perfect in any sense so I will be relying heavily on PHP Community to help me out with it. I will obviously be working on it hard, but any pull requests are greatly appreciated.

So where is it then?! It’s on github! I have also set up my personal github PEAR channel and will release a first alpha package so you can install it easily.

Right, back to work!