@@ -87,11 +87,39 @@ public function getTypes(Direction $direction): iterable
8787 // Adds support for the "T|U" union types
8888 yield new Builder \UnionTypeBuilder ();
8989
90+ // Temporary aliases
91+ yield new Builder \TypeAliasBuilder ('non-empty-string ' , $ string , Reason::Deprecated);
92+ yield new Builder \TypeAliasBuilder ('lowercase-string ' , $ string , Reason::Deprecated);
93+ yield new Builder \TypeAliasBuilder ('non-empty-lowercase-string ' , $ string , Reason::Deprecated);
94+ yield new Builder \TypeAliasBuilder ('uppercase-string ' , $ string , Reason::Deprecated);
95+ yield new Builder \TypeAliasBuilder ('non-empty-uppercase-string ' , $ string , Reason::Deprecated);
96+ yield new Builder \TypeAliasBuilder ('numeric-string ' , $ string , Reason::Deprecated);
97+ yield new Builder \TypeAliasBuilder ('literal-string ' , $ string , Reason::Deprecated);
98+ yield new Builder \TypeAliasBuilder ('non-empty-literal-string ' , $ string , Reason::Deprecated);
99+ yield new Builder \TypeAliasBuilder ('class-string ' , $ string , Reason::Deprecated);
100+ yield new Builder \TypeAliasBuilder ('interface-string ' , $ string , Reason::Deprecated);
101+ yield new Builder \TypeAliasBuilder ('trait-string ' , $ string , Reason::Deprecated);
102+ yield new Builder \TypeAliasBuilder ('enum-string ' , $ string , Reason::Deprecated);
103+ yield new Builder \TypeAliasBuilder ('callable-string ' , $ string , Reason::Deprecated);
104+ yield new Builder \TypeAliasBuilder ('truthy-string ' , $ string , Reason::Deprecated);
105+ yield new Builder \TypeAliasBuilder ('non-falsy-string ' , $ string , Reason::Deprecated);
106+
107+ yield new Builder \TypeAliasBuilder ('positive-int ' , $ int , Reason::Deprecated);
108+ yield new Builder \TypeAliasBuilder ('non-positive-int ' , $ int , Reason::Deprecated);
109+ yield new Builder \TypeAliasBuilder ('negative-int ' , $ int , Reason::Deprecated);
110+ yield new Builder \TypeAliasBuilder ('non-negative-int ' , $ int , Reason::Deprecated);
111+ yield new Builder \TypeAliasBuilder ('non-zero-int ' , $ int , Reason::Deprecated);
112+
113+ yield new Builder \TypeAliasBuilder ('number ' , $ int , Reason::Deprecated);
114+ yield new Builder \TypeAliasBuilder ('numeric ' , $ int , Reason::Deprecated);
115+
116+ // Other
90117 if ($ direction === Direction::Normalize) {
91118 // Adds support for the "iterable<T> -> list<T>" type
92119 yield new Builder \ListFromIterableTypeBuilder ('list ' , 'mixed ' );
93120 // Adds support for the "object -> array{ ... }" type
94121 yield $ object = new Builder \ObjectToArrayTypeBuilder ('object ' );
122+ yield new Builder \TypeAliasBuilder (\stdClass::class, $ object );
95123 // Adds support for the "BackedEnum -> scalar" type
96124 yield new Builder \BackedEnumToScalarTypeBuilder ();
97125 // Adds support for the "UnitEnum -> scalar" type
@@ -105,6 +133,7 @@ public function getTypes(Direction $direction): iterable
105133 yield new Builder \ListFromArrayTypeBuilder ('list ' , 'mixed ' );
106134 // Adds support for the "array{ ... } -> object" type
107135 yield $ object = new Builder \ObjectFromArrayTypeBuilder ('object ' );
136+ yield new Builder \TypeAliasBuilder (\stdClass::class, $ object );
108137 // Adds support for the "scalar -> BackedEnum" type
109138 yield new Builder \BackedEnumFromScalarTypeBuilder ();
110139 // Adds support for the "scalar -> UnitEnum" type
@@ -114,8 +143,6 @@ public function getTypes(Direction $direction): iterable
114143 // Adds support for the "array{ ... } -> object(ClassName)" type
115144 yield new Builder \ClassFromArrayTypeBuilder ($ this ->meta );
116145 }
117-
118- yield new Builder \TypeAliasBuilder (\stdClass::class, $ object );
119146 }
120147
121148 public function getTypeCoercers (Direction $ direction ): iterable
0 commit comments