Releases: TemirkhanN/generic
Releases · TemirkhanN/generic
Removed ambiguous behavior from getIterator
Previously iterator returned Traversable for map and collection.
Phpstorm and Phpstan can resolve it correctly though IDE will still think that type is either the declared one or something else.
Since php is dumb and handles differently array<type>
and Traversable<type>
we have to declare that Traversable always has an array key as Traversable<array-key, type>
Fixed collection iterator highlight
0.5.1 Fixed collection iterator highlight in phpstorm
Added map support
0.3.1 Added Result<void> support to avoid Result<null>
Generics are now covariant
- Resolved covariance issue
- Error type is no longer generic but ErrorInterface.
- Added extension.neon to help resolve phpstan issues.
Added generic error support
- Result now supports error struct declaration
- Fixed data type check on generic result usage
Initial release
Provides result and basic collection generics