From 0f1658d2c8e2877a15d60eb98c3457881f493969 Mon Sep 17 00:00:00 2001 From: Anton Smirnov Date: Sun, 4 Oct 2020 17:06:20 +0300 Subject: [PATCH] Update doc and changelog --- CHANGELOG.md | 6 ++++++ docs/main.rst | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) 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 ==================