From 74d0415167c59d387b62c68583673120d5304fe7 Mon Sep 17 00:00:00 2001 From: Simon Erkelens Date: Thu, 16 Mar 2023 22:18:05 +1300 Subject: [PATCH] Revert instanceOf check Despite what the documentation says about `ReflectionClass::instanceOf()`, (or `->isIntance()`), the result seems to be unreliable. Reverting back to fully instantiating the object to see if it is an extension. Resolves #147 --- src/Generators/AbstractTagGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Generators/AbstractTagGenerator.php b/src/Generators/AbstractTagGenerator.php index af4ebee..875617a 100644 --- a/src/Generators/AbstractTagGenerator.php +++ b/src/Generators/AbstractTagGenerator.php @@ -215,7 +215,7 @@ protected function generateOwnerTags() if ($reflection->isAbstract()) { return; } - if ($reflection instanceof Extension) { + if (Injector::inst()->get($this->className) instanceof Extension) { $owners = iterator_to_array($this->getOwnerClasses($className)); $owners[] = $this->className; $tagString = sprintf('\\%s $owner', implode("|\\", array_values($owners)));