Skip to content

Releases: crazyxman/simdjson_php

3.0.0

17 Oct 13:15
Compare
Choose a tag to compare
  • Add SimdJsonValueError. In php 8.0+, it extends ValueError, and it extends Error in older php versions.
    This provides an API similar to the JSON module, which started throwing ValueError for invalid depths in php 8.0.
  • Throw SimdJsonValueError instead of emitting notices if $depth is too small or too large in all simdjson PHP functions.
    simdjson_is_valid(), simdjson_key_count() and simdjson_key_exists() now have non-null return types.
  • Throw a SimdJsonException in simdjson_key_exists on error conditions such as invalid json, to be consistent with other simdjson PHP functions.
  • Add an optional boolean $throw_if_uncountable = false to simdjson_key_count.
    When this is overridden to be true, simdjson_key_count will throw a SimdJsonException if the JSON pointer refers to a value that exists but is neither an array nor an object instead of returning 0.
  • Rename the parameter $assoc to $associative in simdjson_decode and simdjson_key_value, to match naming practices used in json_decode()

2.1.0

14 Oct 01:08
aec72eb
Compare
Choose a tag to compare
  • Allow out of range 64-bit values in JSON integer syntax and allow floating point values outside of the max/min finite floating point values (i.e. parsing to +/- infinity).

    This allows simdjson_decode() to be used as a replacement for json_decode() in more use cases.

  • Return the correct value in simdjson_key_count() for JSON pointers to arrays/objects exceeding size 0xFFFFFF.
    Previously, this would be limited to returning at most 0xFFFFFF(16777215).

  • Throw 'SimdJsonException extends RuntimeException' instead of RuntimeException.

  • Set the error code from simdjson as SimdJsonException->getCode()

  • Expose error_code constants from simdjson as SIMDJSON_ERR_$ERRCODENAME

2.0.5

12 Oct 23:11
c0034f2
Compare
Choose a tag to compare
  • Reuse PHP's 1-byte and 0-byte interned strings in simdjson_decode, reducing memory usage for those strings. (e.g. for the key/value in '{"x":""}')
  • Return correct count in simdjson_key_count. Properly return counts larger than 0xFFFFFF instead of returning 0xFFFFFF.

2.0.4

01 Oct 15:38
3767ea6
Compare
Choose a tag to compare
  • Add -fvisibility=hidden to compiler options to reduce compiled extension size by avoiding exporting symbols by default.
  • If the requested json parsing $depth is excessively large when reallocating larger buffers for the C simdjson parser,
    then internally use a smaller $depth that would behave identically with lower memory usage. (#66)
  • Update simdjson to properly reject surrogate pairs with an invalid low surrogate. (https://en.wikipedia.org/wiki/UTF-16)

2.0.3

30 Aug 16:09
d463508
Compare
Choose a tag to compare
  • Fix error validating package.xml when uploading to PECL due to blank username of lead without a PECL account.

2.0.2

30 Aug 15:02
c1ff2c1
Compare
Choose a tag to compare
  • Fix license metadata in package.xml

2.0.1

30 Aug 11:27
af6270e
Compare
Choose a tag to compare
  • On 32-bit builds, convert decoded 64-bit integers to floats if they would be out of range.

2.0.0

29 Aug 13:12
355055f
Compare
Choose a tag to compare
  • Initial PECL release