Merge pull request #206 from phpDocumentor/bc-check

Bc check
This commit is contained in:
Jaap van Otterdijk
2020-02-12 21:05:04 +01:00
committed by GitHub
3 changed files with 8 additions and 0 deletions
+2
View File
@@ -183,5 +183,7 @@ jobs:
needs: [setup, phpunit]
steps:
- uses: actions/checkout@master
- name: fetch tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: BC Check
uses: docker://nyholm/roave-bc-check-ga
+2
View File
@@ -107,11 +107,13 @@ final class InvalidTag implements Tag
$trace = array_map(
static function (array $call) use ($flatten) : array {
array_walk_recursive($call['args'], $flatten);
return $call;
},
$trace
);
}
$traceProperty->setValue($exception, $trace);
$exception = $exception->getPrevious();
} while ($exception !== null);
@@ -57,10 +57,12 @@ final class InvalidTagTest extends TestCase
self::assertSame('@name Body', $tag->render());
self::assertSame($parentException, $tag->getException());
$trace = $tag->getException()->getPrevious()->getTrace();
if (isset($trace[0]['args'])) { // Not set by default on 7.4
self::assertStringStartsWith('(Closure at', $trace[0]['args'][0]);
self::assertStringContainsString(__FILE__, $trace[0]['args'][0]);
}
self::assertEquals($parentException, unserialize(serialize($parentException)));
}
}
@@ -85,12 +87,14 @@ final class InvalidTagTest extends TestCase
self::assertSame('@name Body', $tag->render());
self::assertSame($parentException, $tag->getException());
$trace = $tag->getException()->getPrevious()->getTrace();
if (isset($trace[0]['args'])) { // Not set by default on 7.4
self::assertStringStartsWith(
'resource(stream)',
$trace[0]['args'][0]
);
}
self::assertEquals($parentException, unserialize(serialize($parentException)));
}
}