1
0
Fork 0

Run phpstan with regular output and then run again to cs2pr if there was an error, to keep usable output in CI logs

pull/8949/head
Jordi Boggiano 2020-06-04 16:03:58 +02:00
parent a4a617abb4
commit c9571f90b4
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
3 changed files with 2 additions and 8 deletions

View File

@ -53,4 +53,4 @@ jobs:
- name: Run PHPStan - name: Run PHPStan
run: | run: |
bin/composer require --dev phpstan/phpstan:^0.12 phpunit/phpunit:^7.5 --with-all-dependencies bin/composer require --dev phpstan/phpstan:^0.12 phpunit/phpunit:^7.5 --with-all-dependencies
vendor/bin/phpstan analyse --configuration=phpstan/config.neon --error-format=checkstyle | cs2pr vendor/bin/phpstan analyse --configuration=phpstan/config.neon || vendor/bin/phpstan analyse --configuration=phpstan/config.neon --error-format=checkstyle | cs2pr

View File

@ -27,12 +27,6 @@ parameters:
# BC with older PHPUnit # BC with older PHPUnit
- '~^Call to an undefined static method PHPUnit\\Framework\\TestCase::setExpectedException\(\)\.$~' - '~^Call to an undefined static method PHPUnit\\Framework\\TestCase::setExpectedException\(\)\.$~'
# hhvm should have support for $this in closures
-
count: 1
message: '~^Using \$this inside anonymous function is prohibited because of PHP 5\.3 support\.$~'
path: '../tests/Composer/Test/Repository/PlatformRepositoryTest.php'
paths: paths:
- ../src - ../src
- ../tests - ../tests

View File

@ -310,7 +310,7 @@ EOT
} }
$process = new ProcessExecutor($io); $process = new ProcessExecutor($io);
$fs = new Filesystem($fs); $fs = new Filesystem($process);
if (!$fs->isAbsolutePath($directory)) { if (!$fs->isAbsolutePath($directory)) {
$directory = getcwd() . DIRECTORY_SEPARATOR . $directory; $directory = getcwd() . DIRECTORY_SEPARATOR . $directory;
} }