Skip to content

Releases: revinate/sequence

PHP 7.x compatibility

26 Jun 02:01
33cd8ae

Choose a tag to compare

Update revinate/php-getter-setter library

PHP 7.x compatibility

26 Jun 03:50
191b5b8

Choose a tag to compare

BC changes:

  • Moved fn namespace into func one. PHP 7.4 uses fn as token for arrow functions.

Other changes:

  • Fixed tests
  • Minor code style/performance improvements

PHP 7.x compatibility

25 Jun 20:21
d2a58a0

Choose a tag to compare

Update revinate/php-getter-setter library

PHP 7.x compatibility

17 Mar 09:53

Choose a tag to compare

BC changes:

 - Moved `fn` namespace into `func` one. PHP 7.4 uses `fn` as token for arrow functions.

Other changes:

 - Fixed tests
 - Minor code style/performance improvements

PHP 7.x compatibility

13 Mar 09:23

Choose a tag to compare

fn keyword is reserved in php^7.1
Removed the usage of a keyword

BC changes:

  • namespace fn -> func

Add fnMapFromField

06 Jun 09:00

Choose a tag to compare

Summary

Added the function fnMapFromField.

fnMapFromField is useful when combined with fnMapToField.

...
->map(fn\fnMapToField('tax', fnMapFromField('price', $fnCalcTax)))
...

Add fnMapToField

03 Jun 15:49

Choose a tag to compare

fnMapToField allows you to take the result of a mapping function and write it to a field.

Add multiple comparison function for sorting.

31 May 10:07

Choose a tag to compare

Summary

Added the ability to chain comparison functions together for improved sorting.

fn\fnCompareMulti

fn\CompareMulti lets you chain comparison functions together for sorting recorder based upon different fields.

Example

usort($records, fn\fnCompareMulti([
    fn\fnCompareFieldRev('price'),    // first by price descending
    fn\fnCompareField('name'),        // then by name ascending
])

Add scan, concatMap, and last to Sequence

30 May 15:28

Choose a tag to compare

Scan

Allows you to accumulate values as you go along.

Last

Returns the last value in a sequence.

concatMap

This is like flattenOnce, but it preserves the keys.

Rename fnCallChain to fnPipe for clarity

11 Jan 21:44

Choose a tag to compare

Merge pull request #11 from pbu88/rename_fn_call_chain

Renames fnCallChain to fnPipe and use fnCallChain as its alias