Skip to content

Releases: mpetrovich/dash

v4.0.1

07 Sep 15:07
b41d2b1
Compare
Choose a tag to compare

Security fixes

  • Bumps league/flysystem to address a critical vulnerability (#27)

v4.0.0

09 Jun 14:22
Compare
Choose a tag to compare

Breaking changes

  • Dash now requires PHP 7.4 or greater

New functionality

  • Dash now works on PHP 8.0 (fixes #23)

v3.1.0

03 Nov 20:57
Compare
Choose a tag to compare

New functionality

v3.0.0

23 Feb 21:37
Compare
Choose a tag to compare

Breaking changes

  • Dash now requires PHP 5.6 or greater

New functionality

v2.1.0

13 Oct 17:33
Compare
Choose a tag to compare

New functionality

  • Adds unique() (with alias distinct()) that returns a collection with any duplicate values removed
  • Dash is now tested against PHP 7.2 and 7.3

Deprecations

v2.0.1

17 Mar 22:07
Compare
Choose a tag to compare

Bug fixes

  • Dash\custom() now returns the exact same function that was set via Dash::setCustom(). Previously, it had returned a closure with zero arguments, which broke any further usage of currying operations (eg. Dash\curry(Dash\custom())).

v2.0.0

17 Mar 20:51
Compare
Choose a tag to compare

Breaking changes

  • Auto-curry option removed from Dash::setCustom(): The optional third parameter, $makeCurryable, allowed custom methods to be auto-curried by prefixing them with an underscore when invoking them on a chain (eg. ->_fooBar()). However, in v1.0.0, underscore-prefixing of curried functions was replaced with a new Dash\Curry namespace, so this behavior is no longer consistent with the built-in currying semantics. To replicate this behavior, use Dash\curry() with Dash\thru():
$greet = function($greeting, $name) { return "$greeting, $name"; };
Dash\Dash::setCustom('greet', $greet);

// Previously:
$greetings = Dash\chain('John')
	->_greet('Hello')
	->value();

// Now:
$greetings = Dash\chain('John')
	->thru(Dash\curry($greet, 'Hello'))
	->value();

// $greetings === 'Hello, John'

v1.1.0

15 Mar 21:02
Compare
Choose a tag to compare

New functionality

  • Adds mapResult() (#8)
  • Dash\Dash has been added as an alias for the Dash\_ class (#7)

v1.0.1

19 Aug 06:25
Compare
Choose a tag to compare

Bug fixes

  • Skips an optional unit test for specific PHP versions that don't have array_column().

v1.0.0

19 Aug 06:18
Compare
Choose a tag to compare

Breaking changes

  • Curried operations now live in a separate Dash\Curry namespace and no longer contain a leading underscore in their name. See the latest currying docs for details and examples.
Before After
Dash\_filter(…) Dash\Curry\filter(…)

Improvements

  • Dash\debug() now uses var_export() instead of var_dump() when displaying its arguments.