Skip to content

Commit 922f571

Browse files
riki137Richard Riki Popeliš
andauthored
related vendor fix (#457)
Co-authored-by: Richard Riki Popeliš <popelis@efabrica.sk>
1 parent 0134a4c commit 922f571

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Change Log
22

33
## [Unreleased][unreleased]
4-
54
### Updated
65
- Coding standard
6+
### Fixed
7+
- RelatedFilesCollector collecting classes that were not present in vendor
78

89
## [0.17.0] - 2024-03-27
910
### Fixed

src/LatteContext/Collector/RelatedFilesCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function collectData(Node $node, Scope $scope): array
8989
$newClassNames = [$this->nameResolver->resolve($node->class)];
9090
}
9191
foreach ($newClassNames as $newClassName) {
92-
if ($newClassName !== null && !in_array($newClassName, ['this', 'self', 'static', 'parent'], true)) {
92+
if ($newClassName !== null && !in_array($newClassName, ['this', 'self', 'static', 'parent'], true) && class_exists($newClassName)) {
9393
$classReflection = $this->reflectionProvider->getClass($newClassName);
9494
if (!$classReflection->isInterface() && !$classReflection->isTrait()) {
9595
$filename = $this->getFilename($classReflection);

0 commit comments

Comments
 (0)