Msgpack.php Versions Save

A pure PHP implementation of the MessagePack serialization format / msgpack.org[PHP]

v0.9.1

2 years ago
  • Added support for the Timestamp extension type
  • Added PHP 8.1 to the test matrix and bumped test coverage to 100%

v0.9.0

2 years ago
  • 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

3 years ago
  • 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

3 years ago

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

v0.7.1

3 years ago
  • Added PHP 8 support
  • Added MessagePack\TypeTransformer\StreamTransformer to pack stream resources into MP_BIN
  • Removed trailing dot from error messages

v0.7.0

4 years ago

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

4 years ago

Gave transformers a higher priority than raw extensions while packing

v0.6.0

4 years ago

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

5 years ago

Changed

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

v0.5.3

5 years ago

Added

  • MessagePack\BufferUnpacker::skip()

Changed

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