Skip to content

Commit

Permalink
Merge pull request #30 from EdgedesignCZ/symfony-3-components
Browse files Browse the repository at this point in the history
Add support for Symfony 3 components, PHP 7.1
  • Loading branch information
zdenekdrahos authored Oct 8, 2016
2 parents 89cb494 + 5dcd78c commit 314d0b1
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 16 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "*",
Expand Down
22 changes: 12 additions & 10 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Task/TableSummary.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
"<comment>{$tool}</comment>",
$tool->getAllowedErrorsCount(),
Expand Down

0 comments on commit 314d0b1

Please sign in to comment.