Skip to content

Commit

Permalink
PHPUnit config: display errors/warnings/notices etc
Browse files Browse the repository at this point in the history
The config as it was, was hiding 6 `Undefined array key`/`Trying to access array offset on null` notices.

As any notice caused by a sniff will stop a PHPCS scan of a file dead, these should be discovered when running the tests and then fixed.
Better yet: the tests should fail on them. This change in the configuration makes it so.

Note: this does mean you now have a bug to fix.

Also see: squizlabs/PHP_CodeSniffer#3844
  • Loading branch information
jrfnl authored and kukulich committed Oct 4, 2023
1 parent 5be6eca commit 92b40dc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
stopOnDefect="true"
executionOrder="defects"
cacheDirectory="temp/phpunit-cache"
displayDetailsOnTestsThatTriggerErrors="true"
displayDetailsOnTestsThatTriggerWarnings="true"
displayDetailsOnTestsThatTriggerNotices="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
failOnWarning="true"
failOnNotice="true"
failOnDeprecation="true"
>
<testsuites>
<testsuite name="Slevomat Coding Standard">
Expand Down

0 comments on commit 92b40dc

Please sign in to comment.