laulamanapps / phpunit-debug-code-detector
Detect debug code in your project files
Installs: 69
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:phpunit-plugin
Requires
- php: ^8.0
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-10-21 23:43:17 UTC
README
Have you ever pushed code to a repository containing debug code? Me Too! With this PHPUnit extension you'll at least be notified when your test run.
Install
Require
$ composer require --dev laulamanapps/phpunit-debug-code-detector
Configure:
<extensions> <extension class="LauLamanApps\DebugCodeDetector\DebugCodeDetectorExtension"> <arguments> <array><!-- Folders we want scanned --> <element key="0"><string>src</string></element> <element key="1"><string>templates</string></element> </array> </arguments> </extension> </extensions>
Enable only some detectors:
<extensions> <extension class="LauLamanApps\DebugCodeDetector\DebugCodeDetectorExtension"> <arguments> <array><!-- Folders we want scanned --> <element key="0"><string>src</string></element> <element key="1"><string>templates</string></element> </array> <array><!-- Detectors we want to use --> <element key="0"><object class="LauLamanApps\DebugCodeDetector\Detector\Php\VarDumpDetector"/></element> <element key="1"><object class="LauLamanApps\DebugCodeDetector\Detector\Php\PrintRDetector"/></element> <element key="2"><object class="LauLamanApps\DebugCodeDetector\Detector\Symfony\VarDumper\DumpDetector"/></element> </array> </arguments> </extension> </extensions>
Disable colorful output:
<extensions> <extension class="LauLamanApps\DebugCodeDetector\DebugCodeDetectorExtension"> <arguments> <array><!-- Folders we want scanned --> <element key="0"><string>src</string></element> <element key="1"><string>templates</string></element> </array> <string>all</string><!-- Use all detectors --> <bool>false</bool> </arguments> </extension> </extensions>