bug #35267 [Debug] fix ClassNotFoundFatalErrorHandler (nicolas-grekas)
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 https://github.com/symfony/symfony/pull/35266 for details.
Replaces https://github.com/symfony/symfony/pull/35255 /cc @mpdude
Commits
-------
0c320febe1
[Debug] fix ClassNotFoundFatalErrorHandler
This commit is contained in:
commit
2f38a5a6c0
@ -199,6 +199,10 @@ class FlattenExceptionTest extends TestCase
|
||||
|
||||
public function testArguments()
|
||||
{
|
||||
if (\PHP_VERSION_ID >= 70400) {
|
||||
$this->markTestSkipped('PHP 7.4 removes arguments from exception traces.');
|
||||
}
|
||||
|
||||
$dh = opendir(__DIR__);
|
||||
$fh = tmpfile();
|
||||
|
||||
@ -261,6 +265,10 @@ class FlattenExceptionTest extends TestCase
|
||||
|
||||
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);
|
||||
@ -272,6 +280,10 @@ class FlattenExceptionTest extends TestCase
|
||||
|
||||
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) {
|
||||
|
@ -29,6 +29,10 @@ class ClassNotFoundFatalErrorHandlerTest extends TestCase
|
||||
// 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) {
|
||||
|
Reference in New Issue
Block a user