This needs to be fixed before we ship 4.3.3. Given the importance of this class. This is one of the few exceptions to changing this late. Other parts were fixed up in an earlier PR and this is finishing the fix on that bug.
public static function using($namespace): ?string
{
$namespace = static::prado3NamespaceToPhpNamespace($namespace);
if (isset(self::$_usings[$namespace])) {
return $namespace . '\\';
}
if (class_exists($namespace, false) ||
interface_exists($namespace, false) ||
trait_exists($namespace, false)) {
return $namespace;
}
...
needs to be this:
public static function using($namespace): ?string
{
$namespace = static::prado3NamespaceToPhpNamespace($namespace);
if (isset(self::$_usings[$namespace])) {
return $namespace . '\\';
}
if (class_exists($namespace, false) ||
interface_exists($namespace, false) ||
trait_exists($namespace, false)) {
if (($shortPos = strrpos($namespace, '\\')) !== false) {
$shortName = substr($namespace, $shortPos + 1);
if (!class_exists($shortName, false) &&
!interface_exists($shortName, false) &&
!trait_exists($shortName, false)) {
class_alias($namespace, $shortName);
}
}
return $namespace;
}
This needs to be fixed before we ship 4.3.3. Given the importance of this class. This is one of the few exceptions to changing this late. Other parts were fixed up in an earlier PR and this is finishing the fix on that bug.
prado/framework/Prado.php
Line 432 in 469bf5c
needs to be this: