Skip to content

Commit

Permalink
add definition in case parent definition is added in an extension
Browse files Browse the repository at this point in the history
  • Loading branch information
romalytvynenko committed Oct 11, 2024
1 parent 0fd1e99 commit 278779c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Infer/Analyzer/ClassAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ public function analyze(string $name): ClassDefinition
$parentDefinition = new ClassDefinition($parentName = $classReflection->getParentClass()->name);

Context::getInstance()->extensionsBroker->afterClassDefinitionCreated(new ClassDefinitionCreatedEvent($parentDefinition->name, $parentDefinition));

// In case parent definition is added in an extension.
$parentDefinition = $this->index->getClassDefinition($parentName) ?: $parentDefinition;
}

/*
Expand Down

0 comments on commit 278779c

Please sign in to comment.