Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8b3df37

Browse files
committed
feature #37840 [VarDumper] Support PHPUnit --colors option (ogizanagi)
This PR was merged into the 5.2-dev branch. Discussion ---------- [VarDumper] Support PHPUnit --colors option | Q | A | ------------- | --- | Branch? | master <!-- see below --> | Bug fix? | no | New feature? | yes <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | N/A <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | N/A Commits ------- ac0a3fc [VarDumper] Support PHPUnit --colors option
2 parents 6adf643 + ac0a3fc commit 8b3df37

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/Symfony/Component/VarDumper/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CHANGELOG
44
5.2.0
55
-----
66

7+
* added support for PHPUnit `--colors` option
78
* added `VAR_DUMPER_FORMAT=server` env var value support
89
* prevent replacing the handler when the `VAR_DUMPER_FORMAT` env var is set
910

src/Symfony/Component/VarDumper/Dumper/CliDumper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,12 +522,14 @@ protected function supportsColors()
522522
case '--color=yes':
523523
case '--color=force':
524524
case '--color=always':
525+
case '--colors=always':
525526
return static::$defaultColors = true;
526527

527528
case '--no-ansi':
528529
case '--color=no':
529530
case '--color=none':
530531
case '--color=never':
532+
case '--colors=never':
531533
return static::$defaultColors = false;
532534
}
533535
}

0 commit comments

Comments
 (0)