Skip to content

Releases: pmmp/BinaryUtils

0.2.6

04 Mar 15:06
ccfc189
Compare
Choose a tag to compare

Changes since 0.2.5

  • Remove annoying PHPStan doc comment - it would require many changes for little benefit, which especially doesn't make sense when we're already working to replace this library with ext-encoding anyway

0.2.5

28 Feb 13:25
2530d45
Compare
Choose a tag to compare

Changes since 0.2.4

  • Fixes to documentation for PHPStan
  • Allow newer PHPUnit versions
  • Allow phpstan/extension-installer to run by default with newer Composer

0.2.4

28 Feb 13:23
5ac7eea
Compare
Choose a tag to compare

Changes since 0.2.3

  • Fixed Binary::readBool() returning incorrect results when more than 1 byte is given
  • Binary::writeUnsignedVarInt() and Binary::writeUnsignedVarLong() no longer overwrite the parameter variable when encoding (avoids misleading backtrace outputs)

0.2.3

04 Dec 21:18
dc94786
Compare
Choose a tag to compare

Changes since 0.2.2

  • Fixed Uninitialized string offset in Binary::readByte() and Binary::readSignedByte() when given an empty string - it now throws BinaryDataException in that case instead.
  • Binary::readShort(), Binary::readInt(), Binary::readLong(), Binary::readFloat(), Binary::readDouble() and friends now throw exceptions with more useful messages containing the expected and actual lengths.
  • Added a bunch of missing @throws BinaryDataException.
  • Now tested on PHP 8.1.

0.2.2

04 Dec 21:01
f883e1c
Compare
Choose a tag to compare

Changes since 0.2.1

  • Fixed PHPStan incorrectly assuming that BinaryStream::get*() methods are pure.

0.2.1

30 May 19:47
8cd078e
Compare
Choose a tag to compare

Changes since 0.2.0

0.2.0

18 May 15:35
595c4ca
Compare
Choose a tag to compare

Changes since 0.1.x

  • PHP 7.4 is now required as a minimum.
  • A new Limits class has been added, which contains constants for the bounds of int8, int16, int32, int64, and their unsigned variants.
  • BinaryStream has the following changes:
    • buffer and offset fields are now protected.
    • reset() method has been removed (create a new BinaryStream instead).
    • setBuffer() method has been removed (create a new BinaryStream instead).
    • get() no longer accepts true for the length. To get all the bytes left in the buffer, use getRemaining() instead.
    • BIG_ENDIAN and LITTLE_ENDIAN constants have been removed.
    • All methods which return void now have native void typehints.
  • The global constant ENDIANNESS has been removed. It's no longer needed for anything thanks to the introduction of non-machine-byte-order-dependent pack() codes for floats in PHP 7.2.