Skip to content

v0.99.64

Choose a tag to compare

@lkrms lkrms released this 29 Nov 06:37
· 305 commits to main since this release
v0.99.64
1c2fa49

Changed

Collection

  • Move ListInterface methods to CollectionInterface
  • Use PHPStan conditional parameter types to vary forEach(), map(), filter() and find() callback signatures by $mode
  • Return a modified instance from collection methods that previously operated on a single instance:
    • set()
    • unset()
    • add()
    • merge()
    • pop()
    • shift()
  • Adopt iterable as return type for protected getItems() and filterItems() methods
  • In list collections, silently replace invalid keys instead of throwing an exception
  • Replace AbstractTypedCollection and Collection with non-final Collection
  • Replace AbstractTypedList and ListCollection with non-final ListCollection
  • Rename:
    • ListTrait -> ListCollectionTrait
    • ReadableCollectionTrait -> ReadOnlyCollectionTrait
  • Rename ImmutableArrayAccessTrait to ReadOnlyArrayAccessTrait and move it back to the Collection namespace

Http

  • Rename HttpHeadersInterface::add() to append() to resolve conflict with CollectionInterface::add()
  • In HttpHeaders:
    • Implement methods added to CollectionInterface
    • Replace generateItems() with getItems() now that the ReadOnlyCollectionTrait method can return iterable
    • Implement CollectionInterface::map()

Utility

  • Update Debug::getCaller() to work with PHP 8.4's backtrace changes

Removed

Collection

  • Remove ListInterface
  • Remove "immutable" collections and traits:
    • ImmutableCollection
    • ImmutableCollectionTrait
    • ImmutableListCollection
    • ImmutableListTrait
  • Remove redundant collection methods empty() and copy()

Core

  • Remove ImmutableArrayAccessTrait (moved to Collection component as ReadOnlyArrayAccessTrait)

Fixed

Collection

  • Fix issue where numeric keys are reindexed when shift() is called on a collection

Core

  • Remove references to E_STRICT constant (deprecated in PHP 8.4)