Skip to content

2.9.0

Choose a tag to compare

@GrahamCampbell GrahamCampbell released this 10 Jun 22:35
· 4 commits to master since this release
9501100
  • Added PHP 8.5 support.
  • Fixed to_number() to parse number strings using the JSON number grammar.
  • Fixed reverse() and string slicing to operate on UTF-8 characters rather than bytes.
  • Fixed slicing of array-like (ArrayAccess + Countable) values.
  • Fixed equality and contains() to use JSON semantics, e.g. 1 == 1.0 is now true.
  • Fixed multi-select hashes to end projections, so following tokens apply to the projected list.
  • Fixed sort() and sort_by() to compare numbers numerically.
  • Changed sort(), sort_by(), max(), min(), max_by() and min_by() to order strings by code point.
  • Fixed max_by() and min_by() to error on mixed-type keys instead of returning arbitrary elements.
  • Fixed max() returning null or erroring when the first array element is falsy, e.g. max([0, 1]).
  • Fixed sum() and join() to return 0 and an empty string respectively for empty arrays.
  • Fixed 0.0 to be truthy in filters and logical operators, like every other number.
  • Fixed the compiled runtime to apply JMESPath truthiness to || and &&.
  • Fixed @(foo), foo[-] and oversized index literals to throw syntax errors.
  • Fixed PHP warnings emitted while parsing certain invalid expressions.
  • Fixed the caret position in syntax error messages for errors at the end of an expression.
  • Fixed map() to error on non-array second arguments instead of returning [].
  • Fixed Env::cleanCompileDir() when JP_PHP_COMPILE=on.