covex-nn / phpqatools
Composer package for PHP QA Tools
Installs: 1 378
Dependents: 5
Suggesters: 1
Security: 0
Stars: 5
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: >=5.5.9
Suggests
- apnet/coding-standard: Apnet PSR-2 PHP coding standard
README
Contents (Phar files)
- PHPUnit v4.8.26
- PHP_CodeSniffer v2.6.1
- phpDocumentor v2.8.5
- PHPMD v2.4.3
- phpcpd v2.0.4
- phploc v3.0.1
- PDepend v2.2.4
- PHP CodeBrowser
Installation
- Use this template for composer.json to install all tools, described on jenkins-php.org via Composer
{ "require-dev" : { "covex-nn/phpqatools" : "~2.0" } }
Usage
- Create your phpcs.xml, phpdoc.xml, phpmd.xml and phpunit.xml.
- Use this template for build.xml
<?xml version="1.0" encoding="utf-8"?> <project name="Your project name" default="init"> <target name="init"> <echo message="${ant.project.name} Init - OK" /> </target> </project>
- Use this template for build-dev.xml
<?xml version="1.0" encoding="utf-8"?> <project name="Your project name - PHP QA Tools" default="init"> <import file="build.xml" /> <import file="vendor/covex-nn/phpqatools/build.xml" /> </project>
- Write code, create unit-tests
- Run
ant init
- Run
ant -f build-dev.xml CI-build
To skip one ore more QA tools set appropriate ant property to 1
:
CI.no-pdepend
CI.no-phpmd
CI.no-phpcpd
CI.no-phpcs
CI.no-phploc
CI.no-phpunit
CI.no-phpcb
CI.no-phpdoc
To fail or to ignore ant job if CI tool return non-zero result set appropriate ant property to true
or to false
:
CI.failonerror-phpunit
(default value:true
)CI.failonerror-pdepend
(default value:false
)CI.failonerror-phpmd
(default value:false
)CI.failonerror-phpcpd
(default value:false
)CI.failonerror-phpcs
(default value:false
)CI.failonerror-phploc
(default value:false
)CI.failonerror-phpcb
(default value:false
)CI.failonerror-phpdoc
(default value:false
)