diff --git a/src/Php/CompilerBase.php b/src/Php/CompilerBase.php index 2bd65923..dac0b2b7 100644 --- a/src/Php/CompilerBase.php +++ b/src/Php/CompilerBase.php @@ -1455,9 +1455,6 @@ class CompilerBase extends \PhpAot\Core\Translator */ protected function hasNativeClass(string $name): bool { - if (!str_starts_with($name, 'Test')) { - debug_print_backtrace(); - } return array_key_exists($this->escapeClass($name), $this->classes); } diff --git a/src/Php/Translator.php b/src/Php/Translator.php index edebf6a8..9f8463c0 100644 --- a/src/Php/Translator.php +++ b/src/Php/Translator.php @@ -692,7 +692,7 @@ class Translator extends Preprocessor $fullName = $this->getNamespacedClassName($this->class); if ($this->hasNativeClass($fullName)) { - $this->classDef = $this->classes[$fullName]; + $this->classDef = $this->getClassDef($fullName); } else { $this->classDef = new ClassDef($this->class, $flags, $this->namespace); $this->addClass($fullName, $this->classDef);