mirror of
https://github.com/php/php-src.git
synced 2026-03-29 19:52:20 +02:00
This is a fix for symfony/symfony#32995. The behavior is: * Throwing exception when loading parent/interface is allowed (and we will also throw one if the class is simply not found). * If this happens, the bucket key for the class is reset, so it's possibly to try registering the same class again. * However, if the class has already been used due to a variance obligation, the exception is upgraded to a fatal error, as we cannot safely unregister the class stub anymore.
21 lines
347 B
PHP
21 lines
347 B
PHP
--TEST--
|
|
Ensure extends does trigger autoload.
|
|
--FILE--
|
|
<?php
|
|
spl_autoload_register(function ($name) {
|
|
echo "In autoload: ";
|
|
var_dump($name);
|
|
});
|
|
|
|
class C extends UndefBase
|
|
{
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
In autoload: string(9) "UndefBase"
|
|
|
|
Fatal error: Uncaught Error: Class 'UndefBase' not found in %s:%d
|
|
Stack trace:
|
|
#0 {main}
|
|
thrown in %s on line %d
|