Skip to content

Latest commit

 

History

History
136 lines (73 loc) · 6.67 KB

CHANGELOG.md

File metadata and controls

136 lines (73 loc) · 6.67 KB

Changelog

1.6.0 (2024-04-24)

Features

  • add find and findLast functions (08588d2)
  • add toList and toArray functions to Collection (c883b50)

Bug Fixes

  • Add T as a possible return type for lastOr and firstOr (b60ea9c)

1.5.0 (2024-01-08)

Features

  • add every, none and some functions to collection (cb1fe18)
  • add first, firstOr, last, lastOr functions to collection (74ce180)
  • add fromIterable function for Collection (1f7d851)
  • add isEmpty and hasItems to collection (1d6b0b8)

1.5.0 (2024-01-05)

Features

Added a couple of functions to the Collection class to enable a smoother developer experience when trying use it in a more functional style

The following functions were added:

  • fromIterable - enables users of the collection to construction the collection from an iterable value like iterators, generators, etc.
  • every - Returns true if given callback returns truthy values for all items
  • none - Returns true if given callback returns falsy values for all items
  • some - Returns true if given callback returns truthy values on some items
  • first - Get the first element of the collection that matches a callback, if given. Throws exception if collection is empty or predicate is never satisfied
  • firstOr - Same as first but returns $fallbackValue if collection is empty or predicate is never satisfied
  • last - Get the last element of the collection that matches a callback, if given. Throws exception if collection is empty or predicate is never satisfied
  • lastOr - Same as last but returns $fallbackValue if collection is empty or predicate is never satisfied
  • isEmpty - Returns whether the collection is empty
  • hasItems - Returns whether the collection has items

1.4.0 (2023-12-19)

Features

  • annotate generic ArrayAccess implementation, fix generic IteratorAggregate implementation annotation (d654dbe)

1.3.1 (2023-12-05)

Bug Fixes

  • phpdoc: let InMemoryRepository implement interface instead of extending it (ef575a5)

1.3.0 (2023-11-29)

Features

  • accept items in constructor arguments for in memory repository (687479e)

1.2.0 (2023-05-22)

Features

  • add generic/template support for queries/commands (5d2e689)
  • add generic/template support for queries/commands (6d25a9c)

1.1.1 (2023-03-31)

Bug Fixes

  • Improve Collection::filter method to not retain indices. (#13) (1848c02), closes #12

1.1.0 (2023-01-20)

Features

  • Add ChainRepository to support multiple repositories. (87deb1d)
  • Add more functionality to Collection class (6e0c0a9)
  • Implement ArrayAccess for in-memory paginator. (6abd60e)

Bug Fixes

  • Use ForType instead of For for attributes (7dd103e)

1.0.2 (2023-01-16)

Bug Fixes

  • Rename class to match PSR-4 autoloading standards. (6e8d82e)

1.0.1 (2023-01-16)

Bug Fixes

  • Remove package from docstring. (a74b1ac)

1.0.0 (2023-01-16)

⚠ BREAKING CHANGES

  • Make Collection an instantiable class.
  • Change Repository interface.
  • Use item and collection types as constructor arguments
  • Update contracts for command and query bus.

Features

  • Add ValueObject contract and implementations. (c1a00b4)
  • Add command and query bus. (848da2c)

Code Refactoring

  • Change Repository interface. (4e1b14a)
  • Make Collection an instantiable class. (3ca9db5)
  • Update contracts for command and query bus. (a5b8957)
  • Use item and collection types as constructor arguments (050ffcc)

Miscellaneous Chores

  • Apply PHP CS fixer fixes. (8072b49)
  • Apply PHP CS fixer fixes. (8e8c960)