Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Msgpack Laravel Package

rybakit/msgpack

Pure PHP MessagePack serializer. Fully compliant with the latest spec, supports streaming unpacking, unsigned 64-bit integers, object serialization via custom types/extensions, and is well tested with good performance. Install via Composer; pack/unpack easily.

View on GitHub
Deep Wiki
Context7
v0.9.2

What's Changed

New Contributors

Full Changelog: https://github.com/rybakit/msgpack.php/compare/v0.9.1...v0.9.2

v0.9.1
  • Added support for the Timestamp extension type
  • Added PHP 8.1 to the test matrix and bumped test coverage to 100%
v0.9.0
  • 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
  • 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

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

v0.7.1
  • Added PHP 8 support
  • Added MessagePack\TypeTransformer\StreamTransformer to pack stream resources into MP_BIN
  • Removed trailing dot from error messages
v0.7.0

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

Gave transformers a higher priority than raw extensions while packing

v0.6.0

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

Changed

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

Added

  • MessagePack\BufferUnpacker::skip()

Changed

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

Added

  • MessagePack\BufferUnpacker::seek()
v0.5.1

Fixed

  • Maps detection optimization that was introduced in v0.4.1 (7af790bdfbe630616a90b678d124e5bac2ad696b)
v0.5.0

Added

  • The MessagePack\TypeTransformer\Unpackable interface
  • Tests for example scripts

Removed

  • The MessagePack\TypeTransformer\Extension interface
v0.4.1

Added

  • Methods:
    • MessagePack\PackOptions::isForceBinMode()
    • MessagePack\PackOptions::isForceMapMode()
    • MessagePack\UnpackOptions::isBigIntAsExceptionMode()

Changed

  • Optimized the detection of maps during packing
v0.4.0

This release drops support for old PHP versions and HHVM. The minimum PHP version requirement is 7.1.1.

Added

  • Methods:
    • MessagePack\Exception\InsufficientDataException::unexpectedLength()
    • MessagePack\Exception\InvalidOptionException::outOfRange()
    • MessagePack\Exception\PackingFailedException::unsupportedType()
    • MessagePack\Exception\UnpackingFailedException::unknownCode()
    • MessagePack\Exception\UnpackingFailedException::unexpectedCode()
    • MessagePack\PackOptions::fromDefaults()
    • MessagePack\UnpackOptions::fromDefaults()
  • Typehits
  • More tests
  • More examples

Changed

  • Method signatures:
    • MessagePack\Exception\IntegerOverflowException::__construct()
    • MessagePack\Exception\PackingFailedException::__construct()
    • MessagePack\Tests\Perf\Runner::__construct()
    • MessagePack\Tests\Perf\Runner::run()
  • Visibility:
    • MessagePack\Packer::UTF8_REGEX from public to private
  • Coding standards rules (.php_cs.dist)
  • Applied minor optimizations

Removed

  • Classes:
    • MessagePack\Exception\InvalidCodeException
  • Methods:
    • MessagePack\Exception\InsufficientDataException::fromOffset()
    • MessagePack\Exception\InvalidOptionException::fromValidOptions()
v0.3.1

Added

  • MessagePack\BufferUnpacker::__clone()

Changed

  • Made MessagePack\Packer::registerTransformer() and MessagePack\BufferUnpacker::registerTransformer() fluent
  • Optimized MessagePack\Packer::pack() for nulls and bools
v0.3.0

Added

  • Classes

    • MessagePack\Exception\InvalidCodeException
    • MessagePack\Exception\InvalidOptionException
    • MessagePack\Type\Binary
    • MessagePack\Type\Map
    • MessagePack\TypeTransformer\BinaryTransformer
    • MessagePack\TypeTransformer\MapTransformer
    • MessagePack\MessagePack
    • MessagePack\PackOptions
    • MessagePack\UnpackOptions
  • Interfaces

    • MessagePack\TypeTransformer\Packable
    • MessagePack\TypeTransformer\Extension
  • Methods

    • MessagePack\BufferUnpacker::registerTransformer()
    • MessagePack\BufferUnpacker::unpackNil()
    • MessagePack\BufferUnpacker::unpackBool()
    • MessagePack\BufferUnpacker::unpackInt()
    • MessagePack\BufferUnpacker::unpackFloat()
    • MessagePack\BufferUnpacker::unpackArray()
    • MessagePack\BufferUnpacker::unpackArrayHeader()
    • MessagePack\BufferUnpacker::unpackMap()
    • MessagePack\BufferUnpacker::unpackMapHeader()
    • MessagePack\BufferUnpacker::unpackExt()
    • MessagePack\Packer::registerTransformer()
    • MessagePack\Packer::packArrayHeader()
    • MessagePack\Packer::packMapHeader()
  • Code examples

  • [@slow](https://github.com/slow) and [@pecl_comp](https://github.com/pecl_comp) groups of tests which can be assigned to the MP_BENCH_TESTS environment variable

  • PHP CS Fixer configuration file, .php_cs.dist

Changed

  • Changed the signature of the following methods:
    • MessagePack\BufferUnpacker::__construct()
    • MessagePack\Packer::__construct()
    • MessagePack\Packer::packExt()
  • The MessagePack\Ext class was marked as final
  • Changed the return format of MessagePack\Tests\DataProvider::provideData()
  • Optimized unpacking empty strings, array and maps
  • Optimized working with extension types
  • Optimized working with type transformers

Removed

  • Classes

    • MessagePack\Unpacker
    • MessagePack\TypeTransformer\Collection
  • Interfaces

    • MessagePack\TypeTransformer\TypeTransformer
  • Methods

    • MessagePack\BufferUnpacker::setTransformers()
    • MessagePack\BufferUnpacker::getTransformers()
    • MessagePack\BufferUnpacker::setIntOverflowMode()
    • MessagePack\BufferUnpacker::getIntOverflowMode()
    • MessagePack\Packer::setTransformers()
    • MessagePack\Packer::getTransformers()
    • MessagePack\Packer::setTypeDetectionMode()
    • MessagePack\Ext::getType()
    • MessagePack\Ext::getData()
  • Constants

    • MessagePack\BufferUnpacker::INT_AS_EXCEPTION
    • MessagePack\BufferUnpacker::INT_AS_STR
    • MessagePack\BufferUnpacker::INT_AS_GMP
    • MessagePack\Packer::FORCE_STR
    • MessagePack\Packer::FORCE_BIN
    • MessagePack\Packer::FORCE_ARR
    • MessagePack\Packer::FORCE_MAP
v0.2.2
  • Added named constructor for InsufficientDataException
  • Fixed properties initialization in BufferUnpackerTarget/PackerTarget constructors
  • Replaced is_double() with is_float()
  • Updated license year
v0.2.1

Optimized utf8/bin auto detection when pcre.jit=0

v0.2.0

Core

  • Added php7 support
  • Introduced type detection modes
  • Renamed MessagePack\Packer::packDouble() to MessagePack\Packer::packFloat()
  • Applied various performance optimizations

Tests

  • Added more tests and php runtimes (php 7.0/7.1, hhvm 3.9/3.12/latest)
  • Renamed some benchmark targets, added new ones
  • Added tests/Perf/Filter/RegexpFilter.php, renamed tests/Perf/Filter/NameFilter.php to tests/Perf/Filter/ListFilter.php, tests/Perf/Benchmark/TimeBenchmark.php to tests/Perf/Benchmark/DurationBenchmark.php
v0.1.0
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport