Ramsey Collection Versions Save

:card_index_dividers: A PHP library for representing and manipulating collections.

2.0.0

1 year ago

Added

  • Add support for CollectionInterface::reduce() (#87)
  • All exceptions now implement a base CollectionException interface
  • Introduce Sort enum
  • Support column(), sort(), and where() on non-object collection types

Changed

  • Minimum PHP version supported is 8.1
  • Every method now has parameter and return type hints; if extending classes or implementing interfaces, you may need to change method signatures to upgrade
  • The second parameter of CollectionInterface::sort() now uses the new Sort enum instead of a string
  • Audit all template annotations and clean up Psalm and PHPStan types for correctness; if using static analysis in projects, this may require changes to your type annotations
  • ArrayInterface no longer extends \Serializable, and the serialize() and unserialize() methods have been removed from AbstractArray; however, AbstractArray still supports serialization through implementing __serialize() and __unserialize()

1.3.0

1 year ago

Fixed

  • Make type aliases compatible in diff, intersect, and merge (#111)
  • Use offsetUnset() method to remove from the collection in AbstractCollection (#104)
  • Use the correct base type of array-key for template K on AbstractTypedMap

Changed

  • Minimum PHP version supported is 7.4

1.2.2

2 years ago

Fixed

  • Merging of sets now excludes duplicates, since a set does not allow duplicate values.

1.2.1

2 years ago

Fixed

  • Standardize template annotations and fix iterable types

1.2.0

2 years ago

Added

  • Support PHP 8.1.0

Changed

  • Minimum PHP version supported is 7.3

1.1.4

2 years ago

Fixed

  • Fixed incorrect callable type annotation on CollectionInterface::map().

1.1.3

3 years ago

Fixed

  • Fixed incorrect callable type annotation on CollectionInterface::map().

1.1.2

3 years ago

Fixed

  • Fixed Psalm annotations causing Psalm errors in downstream projects.
  • Fixed AbstractCollection::column() attempting to access a property or method on a non-object.

1.1.1

3 years ago

Fixed

  • Fixed broken AbstractCollection::map() implementation.

1.1.0

3 years ago

Fixed

  • Fixed AbstractCollection::diff(), AbstractCollection::intersect() and AbstractCollection::merge() when used with Generic collections.
  • Fixed AbstractCollection::diff() and AbstractCollection::intersect() returning inconsistent results when used on collections containing objects.
  • Removed warning about deprecated dependency when running composer install