Skip to content

Commit

Permalink
Fix: Always decode JSON to object
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Dec 10, 2022
1 parent 5aa53a9 commit 8be5d6f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

For a full diff see [`1.0.0...main`][1.0.0...main].

### Fixed

- Decoded JSON `string` to an object, not an associative array, when constructing `Json` from file name ([#3]), by [@localheinz]

## [`1.0.0`][1.0.0]

For a full diff see [`c020e6f...1.0.0`][c020e6f...1.0.0].
Expand All @@ -24,5 +28,6 @@ For a full diff see [`c020e6f...1.0.0`][c020e6f...1.0.0].

[#1]: https://github.com/ergebnis/json/pull/1
[#2]: https://github.com/ergebnis/json/pull/2
[#3]: https://github.com/ergebnis/json/pull/3

[@localheinz]: https://github.com/localheinz
2 changes: 1 addition & 1 deletion infection.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"text": ".build/infection/infection-log.txt"
},
"minCoveredMsi": 100,
"minMsi": 70,
"minMsi": 66,
"phpUnit": {
"configDir": "test\/Unit"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static function fromFile(string $file): self
try {
$decoded = \json_decode(
$encoded,
true,
false,
512,
\JSON_THROW_ON_ERROR,
);
Expand Down

0 comments on commit 8be5d6f

Please sign in to comment.