Skip to content

0.3.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@dktapps dktapps released this 02 Apr 14:52
· 8 commits to master since this release
f1cac6e

⚠️ This extension is still experimental. DO NOT use this in production.

Changes since 0.2.x

API changes

  • ByteBuffer now has separate offsets for read and write. This allows it to more closely mimic the behaviour of BinaryStream, which implicitly has separate offsets (BinaryStream->getOffset() is only used for reading; writing just appends to the internal string)
    • Added ByteBuffer->getReadOffset()
    • Added ByteBuffer->setReadOffset()
    • Added ByteBuffer->getWriteOffset()
    • Added ByteBuffer->setWriteOffset()
    • Removed ByteBuffer->getOffset()
    • Removed ByteBuffer->setOffset()
    • Removed ByteBuffer->rewind() (use setReadOffset(0) or setWriteOffset(0) depending on your use case)
  • Renamed ByteBuffer->getReserved() -> ByteBuffer->getReservedLength()
  • Added ByteBuffer->getUsedLength()
  • Added ByteBuffer->clear()

Other changes

  • Now tested on PHP 8.3
  • All non-macro-generated API methods are now in an internal BaseByteBuffer class, to allow as much of the arginfo as possible to be generated by PHP's gen-stub.php. ByteBuffer extends BaseByteBuffer and there is no observable change to ByteBuffer API and behaviour from this change.