Skip to content

Releases: TemirkhanN/generic

Removed ambiguous behavior from getIterator

14 Apr 21:26
Compare
Choose a tag to compare

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

14 Apr 15:35
Compare
Choose a tag to compare
0.5.1

Fixed collection iterator highlight in phpstorm

Added map support

23 Mar 20:38
Compare
Choose a tag to compare
0.3.1

Added Result<void> support to avoid Result<null>

Generics are now covariant

17 Oct 17:20
Compare
Choose a tag to compare
  • Resolved covariance issue
  • Error type is no longer generic but ErrorInterface.
  • Added extension.neon to help resolve phpstan issues.

Added generic error support

15 Oct 22:34
Compare
Choose a tag to compare
  • Result now supports error struct declaration
  • Fixed data type check on generic result usage

Initial release

13 Oct 19:25
Compare
Choose a tag to compare

Provides result and basic collection generics