Skip to content

Commit

Permalink
Revert instanceOf check
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Firesphere authored Mar 16, 2023
1 parent e490382 commit 74d0415
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Generators/AbstractTagGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
Expand Down

0 comments on commit 74d0415

Please sign in to comment.