diff --git a/CHANGELOG.md b/CHANGELOG.md index 5416ab4..d3c70df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # 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* diff --git a/docs/main.rst b/docs/main.rst index 5728323..9befc77 100644 --- a/docs/main.rst +++ b/docs/main.rst @@ -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 - listType: function ($array) { // or callback for greater flexibility + 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 ==================