Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Symfony 3 components, PHP 7.1 #30

Merged
merged 4 commits into from
Oct 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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