1
0
mirror of https://github.com/halaxa/json-machine.git synced 2025-02-21 06:32:36 +01:00
json-machine/CHANGELOG.md

25 lines
1.2 KiB
Markdown
Raw Normal View History

2020-04-17 12:43:32 +02:00
# master
## New features
- [Custom decoder](README.md#custom-decoder)
2020-04-17 13:08:40 +02:00
- `ext-json` is not required in `composer.json` anymore, because custom decoder might not need it.
However **built-in decoders depend on it** so it must be present if you use them.
2020-04-17 12:43:32 +02:00
## BC breaks
2020-04-17 13:08:40 +02:00
- Function `httpClientChunks()` is **deprecated** so that compatibility with Symfony HttpClient
2020-04-17 12:43:32 +02:00
is not on the maintainer of JSON Machine. The code is simple and everyone can make their own
2020-04-17 13:08:40 +02:00
function and maintain it. The code was moved to [examples](src/examples/symfonyHttpClient.php).
- Function `objects()` is **deprecated**. The way `objects()` works is that it casts decoded arrays
to objects. It brings some unnecessary overhead and risks on huge datasets.
Alternative is to configure `ExtJsonDecoder` to decode items as objects.
```php
<?php
use JsonMachine\JsonDecoder\ExtJsonDecoder;
use JsonMachine\JsonMachine;
$jsonMachine = new JsonMachine::fromFile('path/to.json', '', new ExtJsonDecoder);
```
Therefore no additional casting is required.
2020-04-17 12:43:32 +02:00
- Invalid json object keys will now throw and won't be ignored anymore.
## Fixed bugs
- Decoding of json object keys checks for errors and does not silently ignore them.