diff --git a/.travis.yml b/.travis.yml index 3abfce66..cab5494a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,10 +5,13 @@ php: - 5.5 - 5.6 - 7.0 + - 7.1 - hhvm install: - if [ -n "$GITHUB_OAUTH_TOKEN" ]; then composer config github-oauth.github.com ${GITHUB_OAUTH_TOKEN}; fi; - composer install --no-interaction + # test app with symfony3 components in latest php + - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.1" ]]; then composer update && composer require sebastian/phpcpd:dev-master; fi script: - vendor/phpunit/phpunit/phpunit - bin/ci.sh diff --git a/README.md b/README.md index b02c8a4e..044529ba 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,23 @@ But I wouldn't recommend it. In my experience *one* QA tool which analyzes *N* projects is better than *N* projects with *N* analyzers. It's up to you how many repositories you want to update when new version is released. +##### Symfony3 components + +Do you have problems with dependencies +([symfony components](https://github.com/EdgedesignCZ/phpqa/issues/22), [phpcpd](https://github.com/EdgedesignCZ/phpqa/issues/19), ...)? +Check if you can [install phpqa globally](#circleci---artifacts--global-installation). +Or install dev-master versions of `sebastian/phpcpd` and `henrikbjorn/lurker`: + +``` +{ + "require-dev": { + "edgedesign/phpqa": "dev-master", + "henrikbjorn/lurker": "dev-master", + "sebastian/phpcpd": "dev-master" + } +} +``` + ### Docker ```bash @@ -272,6 +289,28 @@ public function ciPhpqa() phpqa --verbose --report --analyzedDir ./ --buildDir ./var/CI --ignoredDirs=bin,log,temp,var,vendor,www ``` +## Circle.ci - artifacts + global installation + +``` +machine: + php: + version: 7.0.4 + +dependencies: + cache_directories: + - ~/.composer/cache + post: + - 'git clone https://github.com/EdgedesignCZ/phpqa.git ./qa && cd qa && composer install --no-dev' + +test: + override: + - vendor/bin/phpunit --testdox-html ./var/tests/testdox.html --testdox-text ./var/tests/testdox.txt --log-junit $CIRCLE_TEST_REPORTS/phpunit/junit.xml + - qa/phpqa --report --verbose --buildDir var/QA --ignoredDirs vendor --tools=phpcs:0,phpmd:0,phpcpd:0,phploc,pdepend,phpmetrics + post: + - cp -r ./var/QA $CIRCLE_ARTIFACTS + - cp -r ./var/tests $CIRCLE_ARTIFACTS +``` + ## Contributing Contributions from others would be very much appreciated! Send diff --git a/composer.json b/composer.json index b424a180..9af6857a 100644 --- a/composer.json +++ b/composer.json @@ -18,14 +18,15 @@ "bin": ["phpqa"], "require": { "php": ">=5.4", + "henrikbjorn/lurker": "dev-master", "codegyre/robo": "*", "phpmd/phpmd" : "*", "phploc/phploc": "*", - "symfony/dependency-injection": "~2.8", - "symfony/filesystem": "~2.8", - "symfony/process": "~2.8", - "symfony/finder": "~2.8", - "symfony/yaml": "~2.8", + "symfony/dependency-injection": ">=2.8", + "symfony/filesystem": ">=2.8", + "symfony/process": ">=2.8", + "symfony/finder": ">=2.8", + "symfony/yaml": ">=2.8", "pdepend/pdepend": "*", "sebastian/phpcpd": "*", "squizlabs/php_codesniffer": "*", diff --git a/composer.lock b/composer.lock index d50fc31b..4965229c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "62f9707067ef6e5eb8e08d8d3bbc5bb5", - "content-hash": "d23899e9277813bce793d91987c03d97", + "hash": "4f109bd4ee79898a48b2f75fab86284d", + "content-hash": "bbab948633ba13e4e7758fbd5d8068cb", "packages": [ { "name": "codegyre/robo", @@ -64,22 +64,22 @@ }, { "name": "henrikbjorn/lurker", - "version": "1.1.0", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/flint/Lurker.git", - "reference": "ab45f9cefe600065cc3137a238217598d3a1d062" + "reference": "712d3ef19bef161daa2ba0e0237c6b875587a089" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/flint/Lurker/zipball/ab45f9cefe600065cc3137a238217598d3a1d062", - "reference": "ab45f9cefe600065cc3137a238217598d3a1d062", + "url": "https://api.github.com/repos/flint/Lurker/zipball/712d3ef19bef161daa2ba0e0237c6b875587a089", + "reference": "712d3ef19bef161daa2ba0e0237c6b875587a089", "shasum": "" }, "require": { "php": ">=5.3.3", - "symfony/config": "~2.2", - "symfony/event-dispatcher": "~2.2" + "symfony/config": "^2.2|^3.0", + "symfony/event-dispatcher": "^2.2|^3.0" }, "suggest": { "ext-inotify": ">=0.1.6" @@ -119,7 +119,7 @@ "resource", "watching" ], - "time": "2015-10-27 09:19:19" + "time": "2016-03-16 15:22:20" }, { "name": "hoa/compiler", @@ -2706,7 +2706,9 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "henrikbjorn/lurker": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/src/Task/TableSummary.php b/src/Task/TableSummary.php index 0230cf2e..e1b6674b 100644 --- a/src/Task/TableSummary.php +++ b/src/Task/TableSummary.php @@ -31,7 +31,7 @@ public function __invoke(array $usedTools) $failedTools = []; foreach ($usedTools as $tool) { list($isOk, $errorsCount) = $tool->analyzeResult(); - $totalErrors += $errorsCount; + $totalErrors += (int) $errorsCount; $table->addRow(array( "{$tool}", $tool->getAllowedErrorsCount(),