Commit 0f1658d2 authored by Anton Smirnov's avatar Anton Smirnov
Browse files

Update doc and changelog

parent 1d693ff7
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
# Changelog

## 2.3.0
*Oct 4, 2020*

* Shorten `dictionaryType` to `dictType`. `dictionaryType` will be removed in 3.0
* Trigger silent deprecations for deprecated stuff

## 2.2.0

*Oct 3, 2020*
+3 −1
Original line number Diff line number Diff line
@@ -120,13 +120,15 @@ Decoding
    // You can control lists and dictionaries types with options
    $data = Bencode::decode(
        "...",
        dictionaryType: ArrayObject::class, // pass class name, new $type($array) will be created
        dictType: ArrayObject::class, // pass class name, new $type($array) will be created
        listType: function ($array) { // or callback for greater flexibility
            return new ArrayObject($array, ArrayObject::ARRAY_AS_PROPS);
        },
    ]);
    // default value for both types is 'array'. you can also use 'object' for stdClass

.. note:: Parameter order is not guaranteed for options, use named parameters

Working with files
==================