Releases: mpetrovich/dash
Releases · mpetrovich/dash
v4.0.1
v4.0.0
v3.1.0
v3.0.0
v2.1.0
New functionality
- Adds
unique()(with aliasdistinct()) that returns a collection with any duplicate values removed - Dash is now tested against PHP 7.2 and 7.3
Deprecations
- Support for PHP versions pre-7.1 will be dropped in a future version, and Dash will start to follow the official PHP version support schedule
v2.0.1
Bug fixes
Dash\custom()now returns the exact same function that was set viaDash::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
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 newDash\Currynamespace, so this behavior is no longer consistent with the built-in currying semantics. To replicate this behavior, useDash\curry()withDash\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
v1.0.1
Bug fixes
- Skips an optional unit test for specific PHP versions that don't have
array_column().
v1.0.0
Breaking changes
- Curried operations now live in a separate
Dash\Currynamespace 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 usesvar_export()instead ofvar_dump()when displaying its arguments.