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 committed Oct 3, 2023
1 parent b977a6d commit 9b279fb
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 9b279fb

Please sign in to comment.