Skip to content

Releases: headsnet/collections

Factory methods for instantiation, removed ArrayAccess

08 Jan 12:28
48c15c8
Compare
Choose a tag to compare

What's Changed

  • BC BREAK - Require item class name to be provided via abstract method getItemClassName() instead of via the collection constructor.
  • BC BREAK - Removed support for ArrayAccess, and replicate functionality via more meaningful methods such as Collection::has() and Collection::get().
  • BC BREAK - Collection::toArray() renamed to Collection::all().
  • Added the factory methods Collection::from() and Collection::empty().
  • Added helper methods Collection::isEmpty() and Collection::isNotEmpty().
  • Added helper method Collection::mapTo() to map to a new Collection of a different type.
  • Added Collection::reverse() helper to reverse the order of the collection.
  • Support creating collections from Doctrine Collections using Collection::fromDoctrine().
  • Support creating collections by mapping array of other objects using Collection::mapFrom().

Modernise with generics

07 Jan 07:47
cf88ef0
Compare
Choose a tag to compare

What's Changed

  • Modernise codebase by @benr77 in #2
  • Install Easy Coding Standard by @benr77 in #3
  • Configure CI build with Github Actions by @benr77 in #4
  • Add code coverage badge generation to CI build by @benr77 in #5
  • Add installation, usage and contributing sections to README by @benr77 in #6
  • Ensure first() and last() methods return null if collection empty by @benr77 in #7
  • Add firstOrFail() and lastOrFail() methods by @benr77 in #8
  • Add test cases that ensure the collection immutability by @benr77 in #9
  • Add change log file by @benr77 in #10

Full Changelog: v0.1.1...v0.2.0

Fix deprecations

22 May 09:30
51cad6c
Compare
Choose a tag to compare
Merge pull request #1 from headsnet/fix-deprecations

Fix deprecation notices