You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add WildcardConstantFixture and tests for version mode validation for baseline tdd
* Add support for wildcard class constant patterns in ConstValidator and documentation
* Enhance wildcard constant pattern validation for enums and update documentation
TypePHP supports validating parameters, return types, properties, and `@var` local assignments against wildcard constant patterns (`Class::PREFIX_*` or `StatusEnum::*`).
80
+
81
+
***Class Constants (`Class::PREFIX_*`):** TypePHP uses Reflection to safely inspect all matching constants—including `public`, `protected`, and `private` class constants—and validates that the incoming value matches one of the declared constant scalar values.
82
+
***Enums (`StatusEnum::*` or `StatusEnum::ACT*`):** Matches incoming **Enum case objects** against the wildcard case pattern.
83
+
84
+
```php
85
+
class MigrationCollectionLoader
86
+
{
87
+
public const VERSION_SELECTION_ALL = 'all';
88
+
public const VERSION_SELECTION_BLUE_GREEN = 'blue-green';
0 commit comments