Skip to content

Commit

Permalink
Check if extension without instantiation (elemental compatibility) (#154
Browse files Browse the repository at this point in the history
)

* Check if extension without instantiation

* Replace is_a with reflection subclass test for robustness
  • Loading branch information
S-GrabhamMadden authored Dec 4, 2023
1 parent 01c4839 commit e111a61
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 (Injector::inst()->get($this->className) instanceof Extension) {
if ($reflection->isSubclassOf(Extension::class)) {
$owners = iterator_to_array($this->getOwnerClasses($className));
$owners[] = $this->className;
$tagString = sprintf('\\%s $owner', implode("|\\", array_values($owners)));
Expand Down

0 comments on commit e111a61

Please sign in to comment.