Skip to content

Commit edea3e8

Browse files
authored
Merge pull request #206 from phpDocumentor/bc-check
Bc check
2 parents b21eaf3 + 917b664 commit edea3e8

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

.github/workflows/push.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,5 +183,7 @@ jobs:
183183
needs: [setup, phpunit]
184184
steps:
185185
- uses: actions/checkout@master
186+
- name: fetch tags
187+
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
186188
- name: BC Check
187189
uses: docker://nyholm/roave-bc-check-ga

src/DocBlock/Tags/InvalidTag.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,13 @@ static function (&$value) : void {
107107
$trace = array_map(
108108
static function (array $call) use ($flatten) : array {
109109
array_walk_recursive($call['args'], $flatten);
110+
110111
return $call;
111112
},
112113
$trace
113114
);
114115
}
116+
115117
$traceProperty->setValue($exception, $trace);
116118
$exception = $exception->getPrevious();
117119
} while ($exception !== null);

tests/unit/DocBlock/Tags/InvalidTagTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@ public function testCreationWithErrorContainingClosure() : void
5757
self::assertSame('@name Body', $tag->render());
5858
self::assertSame($parentException, $tag->getException());
5959
$trace = $tag->getException()->getPrevious()->getTrace();
60+
6061
if (isset($trace[0]['args'])) { // Not set by default on 7.4
6162
self::assertStringStartsWith('(Closure at', $trace[0]['args'][0]);
6263
self::assertStringContainsString(__FILE__, $trace[0]['args'][0]);
6364
}
65+
6466
self::assertEquals($parentException, unserialize(serialize($parentException)));
6567
}
6668
}
@@ -85,12 +87,14 @@ public function testCreationWithErrorContainingResource() : void
8587
self::assertSame('@name Body', $tag->render());
8688
self::assertSame($parentException, $tag->getException());
8789
$trace = $tag->getException()->getPrevious()->getTrace();
90+
8891
if (isset($trace[0]['args'])) { // Not set by default on 7.4
8992
self::assertStringStartsWith(
9093
'resource(stream)',
9194
$trace[0]['args'][0]
9295
);
9396
}
97+
9498
self::assertEquals($parentException, unserialize(serialize($parentException)));
9599
}
96100
}

0 commit comments

Comments
 (0)