KnownProblemsRegistry
class KnownProblemsRegistry (View source)
Registry for known validation problems in stubs.
Some PHP entities (functions, methods) have known issues where stubs cannot perfectly match reflection data. Common cases:
- Overloaded function signatures (multiple valid signatures, reflection returns only one)
- Version-specific parameter changes
- Internal implementation details that differ from public API
This registry uses a Provider pattern to load problems from type-safe PHP code, providing compile-time validation and IDE support.
Methods
Check if an entity has a known problem for a specific check and PHP version.
Check if validation should be skipped for an entity.
Get skip reason for an entity (for logging/reporting).
Reset the singleton instance (useful for testing).
Get all registered problems (for debugging/reporting).
Get problems index (for debugging/reporting).
Details
__construct(KnownProblemsProvider $provider = new DefaultKnownProblemsProvider())
No description
static KnownProblemsRegistry
getInstance(KnownProblemsProvider|null $provider = null)
Get singleton instance of the registry.
bool
hasProblem(string $entityType, string $entityId, string $checkName, string $phpVersion)
Check if an entity has a known problem for a specific check and PHP version.
bool
shouldSkipValidation(string $entityType, string $entityId, string $checkName, string $phpVersion)
Check if validation should be skipped for an entity.
string|null
getSkipReason(string $entityType, string $entityId, string $checkName, string $phpVersion)
Get skip reason for an entity (for logging/reporting).
static void
reset()
Reset the singleton instance (useful for testing).
array
getAllProblems()
Get all registered problems (for debugging/reporting).
array
getProblemsIndex()
Get problems index (for debugging/reporting).