Skip to content

Commit a6c3aa0

Browse files
authored
Revert "Ignore traits for non-existing classes (#56)" (#57)
This reverts commit 7f7251d.
1 parent 7f7251d commit a6c3aa0

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

src/AnnotationProcessor/GenerateAnnotationProcessor.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ public function processAnnotation($annotation, PropertyInformation $info): void
2626
{
2727
// Standalone Enumerator annotation.
2828
if ($annotation instanceof Enumerator) {
29-
if (!\class_exists($annotation->getType())) {
30-
return;
31-
}
3229
$info->addEnumeratorToGenerate($annotation);
3330
$annotation->property = $info->getName();
3431
if (! $info->getType() && $annotation->getType()) {

test/AnnotationProcessor/GenerateAnnotationProcessorTest.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -179,18 +179,4 @@ public function testGetProcessableAnnotationNamespace(): void
179179
(new GenerateAnnotationProcessor())->getProcessableAnnotationNamespace()
180180
);
181181
}
182-
183-
public function testEnumeratorOnMissingClass(): void
184-
{
185-
$enumerator = new Enumerator();
186-
$enumerator->type = 'ClassDoesNotExist';
187-
188-
$property = new ReflectionProperty('test');
189-
$information = new PropertyInformation($property);
190-
$processor = new GenerateAnnotationProcessor();
191-
192-
$processor->processAnnotation($enumerator, $information);
193-
194-
self::assertFalse($information->willGenerateEnumeratorAccessors());
195-
}
196182
}

0 commit comments

Comments
 (0)