summaryrefslogtreecommitdiff
path: root/tests/classes
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-09-11 15:31:04 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-09-12 16:41:18 +0200
commit4b9ebd837b6fc20bd907ae858375737e91365ede (patch)
treed3384a015615af07d26e296fca42802b8a02b750 /tests/classes
parent679cbee870691936f7f426c0cb7ecaa70018b563 (diff)
downloadphp-git-4b9ebd837b6fc20bd907ae858375737e91365ede.tar.gz
Allow throwing exception while loading parent class
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.
Diffstat (limited to 'tests/classes')
-rw-r--r--tests/classes/autoload_010.phpt5
-rw-r--r--tests/classes/autoload_011.phpt5
-rw-r--r--tests/classes/bug75765.phpt8
3 files changed, 15 insertions, 3 deletions
diff --git a/tests/classes/autoload_010.phpt b/tests/classes/autoload_010.phpt
index e65c2565a2..b8aa660730 100644
--- a/tests/classes/autoload_010.phpt
+++ b/tests/classes/autoload_010.phpt
@@ -14,4 +14,7 @@ class C implements UndefI
--EXPECTF--
In autoload: string(6) "UndefI"
-Fatal error: Interface 'UndefI' not found in %s on line %d
+Fatal error: Uncaught Error: Interface 'UndefI' not found in %s:%d
+Stack trace:
+#0 {main}
+ thrown in %s on line %d
diff --git a/tests/classes/autoload_011.phpt b/tests/classes/autoload_011.phpt
index aaea38c6f0..d255a0d23b 100644
--- a/tests/classes/autoload_011.phpt
+++ b/tests/classes/autoload_011.phpt
@@ -14,4 +14,7 @@ class C extends UndefBase
--EXPECTF--
In autoload: string(9) "UndefBase"
-Fatal error: Class 'UndefBase' not found in %s on line %d
+Fatal error: Uncaught Error: Class 'UndefBase' not found in %s:%d
+Stack trace:
+#0 {main}
+ thrown in %s on line %d
diff --git a/tests/classes/bug75765.phpt b/tests/classes/bug75765.phpt
index 213d514dea..650ca65e96 100644
--- a/tests/classes/bug75765.phpt
+++ b/tests/classes/bug75765.phpt
@@ -13,4 +13,10 @@ try {
?>
--EXPECTF--
-Fatal error: Class 'B' not found in %s on line %d
+bool(false)
+bool(false)
+
+Fatal error: Uncaught Error: Class 'B' not found in %s:%d
+Stack trace:
+#0 {main}
+ thrown in %s on line %d