2017 © Pedro PelĂĄez
 

phpcs-standard php52to53

PHP_CodeSniffer standard for compatibility checking of PHP 5.2 to 5.3 migrations.

image

foobugs-standards/php52to53

PHP_CodeSniffer standard for compatibility checking of PHP 5.2 to 5.3 migrations.

  • Saturday, April 13, 2013
  • by goatherd
  • Repository
  • 3 Watchers
  • 1 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 11 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

PHP52to53

PHP52to53 is a collection of sniffs for PHP_CodeSniffer that check an PHP 5.2 application for PHP 5.3 compatibility., (*1)

Features

  • Check for removed, deprecated or changed function, methods, constants etc. including stuff from removed or changed extensions
  • Scan for usage of added, changed or removed parameters
  • Search for removed ini-directives
  • ..

Requirements

Installation

Composer

You cann add the standard to your vendors directory by adding the dependency to your projects composer.json:, (*2)

"require": {
    "foobugs-standards": "php53to54",
}

After an update with composer update, you’re able to include the standard via the full path using the --standard parameter:, (*3)

vendor/bin/phpcs --standard="`pwd`/vendor/foobugs-standards/php53to54" <targetDir>

Download

For the next two options make sure you’ve PHP_CodeSniffer installed. After that you can either put this standard into the PHP_CodeSniffer Standards directory located in your PEAR directory: (pear/PHP/CodeSniffer/Standards) or place the standard somewhere else and use it as standalone standard., (*4)

Download

Download the zip master from github and extract it in the PHP_CodeSniffer Standards directory., (*5)

Git-Clone-Install**

This script will go to your PHP_CodeSniffer Standards directory and place a clone of PHP52to53 Standard inside of it:, (*6)

cd `pear config-get php_dir`/PHP/CodeSniffer/Standards
git clone git://github.com/foobugs/PHP52to53.git

Usage

Installed standard

If you have this standard copied or cloned into the PHPCodeSniffer Standards directory the standard should be listed when calling:, (*7)

phpcs -i

If PHP52to53 is listed there you’re ready to use this standard on any directory:, (*8)

phpcs --standard=PHP52to53 <source-path>

External standard

If you did not put the Standard into PHP_CodeSniffers Standard directory you can specify the external location of the standard. Note that the path to the standard must be a full qualified path:, (*9)

phpcs -standard=/Users/frank/Downloads/PHP52to53/Standards/PHP52to53 <source-path>

You can find more options and arguments (f.i. ignoring files, extensions, memory limit) in the official PHP_CodeSniffer Manual., (*10)

Participate!

You can participate in this project by forking the Repository and push changes back to the project. Feel free to post issues or whishes in the issue section., (*11)

Credits

This standard is the result of a cooperation with Zend Technologies Ltd. to develop a PHP_CodeSniffer standard for the PHP 5.3 compatibility project. Thanks to Slavey Karadzhov from Zend for supporting and testing it., (*12)

The Versions

13/04 2013

dev-master

9999999-dev https://github.com/foobugs-standards/php52to53

PHP_CodeSniffer standard for compatibility checking of PHP 5.2 to 5.3 migrations.

  Sources   Download

BSD-3-Clause

The Requires

 

by Rene Oelke

phpcs migration static analysis php5.3 php_codesniffer standards tool compatibility sniff php5.2