Skip to content

Commit

Permalink
bug #35267 [Debug] fix ClassNotFoundFatalErrorHandler (nicolas-grekas)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] fix ClassNotFoundFatalErrorHandler

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Spotted by the CI on 4.4, see #35266 for details.
Replaces #35255 /cc @mpdude

Commits
-------

0c320fe [Debug] fix ClassNotFoundFatalErrorHandler
  • Loading branch information
nicolas-grekas committed Jan 8, 2020
2 parents aaf6915 + 0c320fe commit 2f38a5a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
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
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 2f38a5a

Please sign in to comment.