Skip to content

Commit def0086

Browse files
Merge branch '10.5'
2 parents 4da7346 + 549f23c commit def0086

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
# PHP-CS-Fixer
1616
/.php-cs-fixer.php
17-
/.php-cs-fixer.cache
17+
/.php-cs-fixer.cache*
1818

1919
# Psalm
2020
/.psalm/cache

.php-cs-fixer.dist.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,4 +344,10 @@
344344
'whitespace_after_comma_in_array' => true,
345345
]);
346346

347+
$branch = @trim((string) @shell_exec('git rev-parse --abbrev-ref HEAD'));
348+
349+
if (!empty($branch)) {
350+
$config->setCacheFile(__DIR__ . '/.php-cs-fixer.cache.' . $branch);
351+
}
352+
347353
return $config;

src/Util/ThrowableToStringMapper.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use PHPUnit\Framework\ExpectationFailedException;
1414
use PHPUnit\Framework\PhptAssertionFailedError;
1515
use PHPUnit\Framework\SelfDescribing;
16+
use PHPUnit\Runner\ErrorException;
1617
use Throwable;
1718

1819
/**
@@ -22,6 +23,10 @@
2223
{
2324
public static function map(Throwable $t): string
2425
{
26+
if ($t instanceof ErrorException) {
27+
return $t->getMessage();
28+
}
29+
2530
if ($t instanceof SelfDescribing) {
2631
$buffer = $t->toString();
2732

0 commit comments

Comments
 (0)