Skip to content

Releases: rybakit/msgpack.php

v0.9.1

16 Feb 00:59
Compare
Choose a tag to compare
  • Added support for the Timestamp extension type
  • Added PHP 8.1 to the test matrix and bumped test coverage to 100%

v0.9.0

25 Oct 20:50
Compare
Choose a tag to compare
  • Moved the MessagePack\Ext class to MessagePack\Type\Ext
  • Moved the MessagePack\TypeTransformer\CanPack interface to MessagePack\CanPack
  • Moved the MessagePack\TypeTransformer\Extension interface to MessagePack\Extension
  • Introduced the MessagePack\CanBePacked interface, updated the MessagePack\Type\Map, MessagePack\Type\Bin and MessagePack\Type\Ext classes to implement the interface
  • Removed the obsolete MessagePack\TypeTransformer\MapTransformer and MessagePack\TypeTransformer\BinTransformer transformers, added MessagePack\TypeTransformer\TraversableTransformer
  • Overflowed map integer keys are now always unpacked to strings, even if the BIGINT_AS_GMP or BIGINT_AS_DEC unpacking option is set
  • Added more examples and improved existing ones
  • Added Psalm, a static analysis tool for PHP

v0.8.0

18 Mar 10:01
Compare
Choose a tag to compare
  • Made the PackOptions::FORCE_STR option the default
  • Micro-optimized the creation of GMP objects
  • Updated README and example scripts
  • Switched to GH actions

v0.7.2

18 Dec 21:22
Compare
Choose a tag to compare

Added Packer::packFloat32() and Packer::packFloat64()

v0.7.1

04 Dec 22:25
Compare
Choose a tag to compare
  • Added PHP 8 support
  • Added MessagePack\TypeTransformer\StreamTransformer to pack stream resources into MP_BIN
  • Removed trailing dot from error messages

v0.7.0

29 Jan 09:22
Compare
Choose a tag to compare

Added

  • BufferUnpacker::getRemainingCount()
  • BufferUnpacker::hasRemaining()
  • BufferUnpacker::release()
  • UnpackOptions::BIGINT_AS_DEC

Removed

  • InsufficientDataException::unexpectedLength()
  • IntegerOverflowException
  • UnpackOptions::BIGINT_AS_EXCEPTION

Changed

  • BufferUnpacker::tryUnpack() no longer releases the read buffer, to release the buffer use BufferUnpacker::release()

Fixed

  • Fixed the BufferUnpacker constructor to accept UnpackOptions instead of PackOptions
  • Fixed checking the buffer size required to unpack Ext (previously the Ext "type" byte wasn't taken into account which could result in a notice Uninitialized string offset for extensions with zero-length data)
  • Forbade non-int/string map keys (previously they were silently cast to int/string which could result in a warning Illegal offset type)

Misc

  • Added a target file for PHP-Fuzzer
  • Added .gitattributes
  • Switched default PHP version in Docker to 7.4
  • Applied minor optimizations

v0.6.1

02 Oct 18:05
Compare
Choose a tag to compare

Gave transformers a higher priority than raw extensions while packing

v0.6.0

01 Oct 17:34
Compare
Choose a tag to compare

Added

  • Methods:
    • BufferUnpacker::extendWith()
    • BufferUnpacker::withBuffer()
    • BufferUnpacker::read()
    • Packer::extendWith()
  • Interfaces:
    • TypeTransformer\Extension
  • Classes:
    • Tests\Perf\Benchmark\PausableBenchmark

Renamed

  • Type\BinaryType\Bin
  • TypeTransformer\BinaryTransformerTypeTransformer\BinTransformer
  • TypeTransformer\PackableTypeTransformer\CanPack

Changed

  • BufferUnpacker::__construct() now accepts Extension[] $extensions as the third argument
  • Packer::__construct() now accepts CanPack[] $transformers as the second argument

Removed

  • Methods:
    • BufferUnpacker::__clone()
      Cloning a BufferUnpacker object no longer resets the internal buffer, to get the old behavior
      use $unpacker = $unpacker->withBuffer('')
    • BufferUnpacker::registerTransformer()
    • Packer::registerTransformer()
  • Interfaces:
    • TypeTransformer\Unpackable

v0.5.4

01 Jan 22:25
4e393df
Compare
Choose a tag to compare

Changed

  • Optimized unpacking fixed maps and arrays
  • Tweaked examples and README
  • Removed HHVM from the build matrix, added php 7.3

v0.5.3

15 Jun 23:00
Compare
Choose a tag to compare

Added

  • MessagePack\BufferUnpacker::skip()

Changed

  • The second argument ($whence) was removed from MessagePack\BufferUnpacker::seek()