Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

Commit

Permalink
[Debug] fix ClassNotFoundFatalErrorHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jan 8, 2020
1 parent 9a81b63 commit 70dd18e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Tests/Exception/FlattenExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ public function flattenDataProvider()

public function testArguments()
{
if (\PHP_VERSION_ID >= 70400) {
$this->markTestSkipped('PHP 7.4 removes arguments from exception traces.');
}

$dh = opendir(__DIR__);
$fh = tmpfile();

Expand Down Expand Up @@ -261,6 +265,10 @@ function () {},

public function testRecursionInArguments()
{
if (\PHP_VERSION_ID >= 70400) {
$this->markTestSkipped('PHP 7.4 removes arguments from exception traces.');
}

$a = null;
$a = ['foo', [2, &$a]];
$exception = $this->createException($a);
Expand All @@ -272,6 +280,10 @@ public function testRecursionInArguments()

public function testTooBigArray()
{
if (\PHP_VERSION_ID >= 70400) {
$this->markTestSkipped('PHP 7.4 removes arguments from exception traces.');
}

$a = [];
for ($i = 0; $i < 20; ++$i) {
for ($j = 0; $j < 50; ++$j) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ public static function setUpBeforeClass()
// get class loaders wrapped by DebugClassLoader
if ($function[0] instanceof DebugClassLoader) {
$function = $function[0]->getClassLoader();

if (!\is_array($function)) {
continue;
}
}

if ($function[0] instanceof ComposerClassLoader) {
Expand Down

0 comments on commit 70dd18e

Please sign in to comment.