class ReflectionDeduplicationProcessor implements EntityProcessor (View source)

Deduplication processor specifically for reflection data.

Unlike the regular DeduplicationProcessor which keeps duplicates and cross-references them via sourcePath, this processor filters out duplicates entirely since reflection entities don't have source paths (sourcePath is null).

This is necessary because PHP's get_declared_classes() can sometimes return the same class multiple times (e.g., DOMException in PHP 8.4), and without source paths to distinguish them, we need to keep only the first occurrence.

Methods

mixed|null
process(mixed $entity, array $context = [])

Process a single entity

Details

mixed|null process(mixed $entity, array $context = [])

Process a single entity

Parameters

mixed $entity

The entity to process

array $context

Additional context (e.g., ['existingEntities' => [...]])

Return Value

mixed|null

Processed entity, or null to filter it out