Skip to content

3.0.0

Compare
Choose a tag to compare
@arokettu arokettu released this 17 Sep 14:18
· 83 commits to 3.x since this release

3.0.0 was branched from 2.6.1

  • PHP 8.1 is required
  • Decoding:
    • Removed deprecated options: dictionaryType (use dictType), useGMP (use bigInt: Bencode\BigInt::GMP)
    • Bencode\BigInt and Bencode\Collection are now enums,
      therefore dictType, listType, bigInt params no longer accept bare string values
      (like 'array' or 'object' or 'gmp').
  • Encoding:
    • Traversables no longer become dictionaries by default.
      You need to wrap them with DictType.
    • Stringables no longer become strings by default.
      Use useStringable: true to return old behavior.
    • dump($filename, $data) became dump($data, $filename) for consistency with streams.
  • Decoder and Encoder objects that can be pre-configured and then used with consistent options.
  • bencodeSerialize now declares mixed return type