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

pre-commit run --verbose --all-files results in multiple, redundant runs of php-unit, php-cs, etc. #21

Open
posita opened this issue Sep 29, 2021 · 1 comment

Comments

@posita
Copy link

posita commented Sep 29, 2021

% git status
On branch [branch]
Your branch is up to date with '[branch]'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
  [4 changed files]

% pre-commit run --verbose --all-files
…
PHP Unit.................................................................Failed
- hook id: php-unit
- duration: 0.81s
- exit code: 1

Begin PHP Unit Task Runner
Running command  vendor/bin/phpunit
────────────────────────────────────────────────────────────────────────────────
Failures detected in unit tests...
────────────────────────────────────────────────────────────────────────────────
PHPUnit 9.5.10 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.3.11
Configuration: /…/phpunit.xml
Warning:       No code coverage driver available

F                                                                   1 / 1 (100%)

Time: 00:00.515, Memory: 6.00 MB

There was 1 failure:

1) dummyTest::test_Dummy
Failed asserting that 1 matches expected 0.

/…/tests/dummyTest.php:6

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.
Begin PHP Unit Task Runner
Running command  vendor/bin/phpunit
────────────────────────────────────────────────────────────────────────────────
Failures detected in unit tests...
────────────────────────────────────────────────────────────────────────────────
PHPUnit 9.5.10 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.3.11
Configuration: /…/phpunit.xml
Warning:       No code coverage driver available

F                                                                   1 / 1 (100%)

Time: 00:00.516, Memory: 6.00 MB

There was 1 failure:

1) dummyTest::test_Dummy
Failed asserting that 1 matches expected 0.

/…/tests/dummyTest.php:6

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.
Begin PHP Unit Task Runner
Running command  vendor/bin/phpunit
────────────────────────────────────────────────────────────────────────────────
Failures detected in unit tests...
────────────────────────────────────────────────────────────────────────────────
PHPUnit 9.5.10 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.3.11
Configuration: /…/phpunit.xml
Warning:       No code coverage driver available

F                                                                   1 / 1 (100%)

Time: 00:00.514, Memory: 6.00 MB

There was 1 failure:

1) dummyTest::test_Dummy
Failed asserting that 1 matches expected 0.

/…/tests/dummyTest.php:6

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.
Begin PHP Unit Task Runner
Running command  vendor/bin/phpunit
────────────────────────────────────────────────────────────────────────────────
Failures detected in unit tests...
────────────────────────────────────────────────────────────────────────────────
PHPUnit 9.5.10 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.3.11
Configuration: /…/phpunit.xml
Warning:       No code coverage driver available

F                                                                   1 / 1 (100%)

Time: 00:00.516, Memory: 6.00 MB

There was 1 failure:

1) dummyTest::test_Dummy
Failed asserting that 1 matches expected 0.

/…/tests/dummyTest.php:6

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.
@posita posita changed the title pre-commit run --verbose --all-files results in multiple, redundant runs of php-unit pre-commit run --verbose --all-files results in multiple, redundant runs of php-unit, php-cs, etc. Sep 30, 2021
@posita
Copy link
Author

posita commented Sep 30, 2021

This is also the case with php-cs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant