Skip to content

Commit

Permalink
Update doc and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
arokettu committed Oct 4, 2020
1 parent 1d693ff commit 0f1658d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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*
Expand Down
6 changes: 4 additions & 2 deletions docs/main.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
==================

Expand Down

0 comments on commit 0f1658d

Please sign in to comment.