Skip to content

Commit

Permalink
update neon dependency to fix parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
matronator committed Sep 12, 2022
1 parent 4027c83 commit f1371ac
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 18 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"scripts": {
"test": "tester ."
},
"minimum-stability": "stable",
"minimum-stability": "dev",
"funding": [
{
"type": "patreon",
Expand Down
36 changes: 20 additions & 16 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Parsem/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static function decodeByExtension(string $filename, ?string $contents = n
$parsed = $contents ? Yaml::parse($contents, Yaml::PARSE_OBJECT_FOR_MAP) : Yaml::parseFile($filename, Yaml::PARSE_OBJECT_FOR_MAP);
break;
case 'neon':
$parsed = $contents ? (object) Neon::decode($contents) : (object) Neon::decodeFile($filename);
$parsed = $contents ? Neon::decode($contents, true) : Neon::decodeFile($filename, true);
break;
case 'json':
$parsed = $contents ? json_decode($contents) : json_decode(file_get_contents($filename));
Expand Down

0 comments on commit f1371ac

Please sign in to comment.