-
-
Notifications
You must be signed in to change notification settings - Fork 110
Open
Description
Describe the bug
We're having issues with a class_alias in the Moodle code base.
\moodle_exception gets defined as an alias without namespace, but Intelephense can't resolve the type ([P1009])
To Reproduce
This code snippet reproduces the problem:
<?php
namespace core\exception;
class moodle_exception {
}
class_alias(moodle_exception::class, \moodle_exception::class);The \moodle_exception type gets resolved when I remove the namespace (line 3).
The snippet is a reduced example from the class in the Moodle code base that exhibits this problem: https://github.com/moodle/moodle/blob/5586d836a9a0b36308b3d73a2a00cd174c272115/public/lib/classes/exception/moodle_exception.php#L105-L108
Reactions are currently unavailable