Skip to content

Commit f68036e

Browse files
committed
Restore BC for Typed::named()
See #351 (comment)
1 parent 0a7a452 commit f68036e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/main/php/lang/Type.class.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,11 @@ public static function named($name, $context) {
335335
$t= self::named($base, $context)->newGenericType($components);
336336
}
337337
} else if ('@' === $name[$p]) {
338-
return new XPClass($name);
338+
try {
339+
return new XPClass(new \ReflectionClass($name));
340+
} catch (\ReflectionException $e) {
341+
throw new ClassNotFoundException($name, $e);
342+
}
339343
} else {
340344
$t= self::named(trim(substr($name, 0, $p)), $context);
341345
$name= substr($name, $p);

0 commit comments

Comments
 (0)