From f1371ac73ab545f3e3f250c816407accdaf0da42 Mon Sep 17 00:00:00 2001 From: Matronator <5470780+matronator@users.noreply.github.com> Date: Mon, 12 Sep 2022 22:35:35 +0200 Subject: [PATCH] update neon dependency to fix parsing --- composer.json | 2 +- composer.lock | 36 ++++++++++++++++++++---------------- src/Parsem/Parser.php | 2 +- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/composer.json b/composer.json index 336360a..3d7a88d 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ "scripts": { "test": "tester ." }, - "minimum-stability": "stable", + "minimum-stability": "dev", "funding": [ { "type": "patreon", diff --git a/composer.lock b/composer.lock index 9ad3927..37055c7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "eeb731d6818d123bb7320fd9f2816003", + "content-hash": "65ca8872e670cb2fe1a4502b00c80a33", "packages": [ { "name": "nette/neon", - "version": "v3.3.3", + "version": "v3.3.x-dev", "source": { "type": "git", "url": "https://github.com/nette/neon.git", - "reference": "22e384da162fab42961d48eb06c06d3ad0c11b95" + "reference": "5233d1671c5dff6feb94b991f3bcc7e72a1d76e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/neon/zipball/22e384da162fab42961d48eb06c06d3ad0c11b95", - "reference": "22e384da162fab42961d48eb06c06d3ad0c11b95", + "url": "https://api.github.com/repos/nette/neon/zipball/5233d1671c5dff6feb94b991f3bcc7e72a1d76e9", + "reference": "5233d1671c5dff6feb94b991f3bcc7e72a1d76e9", "shasum": "" }, "require": { @@ -70,13 +70,13 @@ ], "support": { "issues": "https://github.com/nette/neon/issues", - "source": "https://github.com/nette/neon/tree/v3.3.3" + "source": "https://github.com/nette/neon/tree/v3.3" }, - "time": "2022-03-10T02:04:26+00:00" + "time": "2022-09-06T01:40:06+00:00" }, { "name": "opis/json-schema", - "version": "2.3.0", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/opis/json-schema.git", @@ -99,6 +99,7 @@ "ext-intl": "*", "phpunit/phpunit": "^9.0" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -141,7 +142,7 @@ }, { "name": "opis/string", - "version": "2.0.1", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/opis/string.git", @@ -161,6 +162,7 @@ "require-dev": { "phpunit/phpunit": "^9.0" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -203,7 +205,7 @@ }, { "name": "opis/uri", - "version": "1.1.0", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/opis/uri.git", @@ -222,6 +224,7 @@ "require-dev": { "phpunit/phpunit": "^9" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -266,7 +269,7 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.2", + "version": "2.5.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", @@ -313,7 +316,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/2.5" }, "funding": [ { @@ -333,7 +336,7 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.26.0", + "version": "dev-main", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -354,6 +357,7 @@ "suggest": { "ext-ctype": "For best performance" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -415,7 +419,7 @@ }, { "name": "symfony/yaml", - "version": "v5.4.12", + "version": "5.4.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", @@ -470,7 +474,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.12" + "source": "https://github.com/symfony/yaml/tree/5.4" }, "funding": [ { @@ -567,7 +571,7 @@ } ], "aliases": [], - "minimum-stability": "stable", + "minimum-stability": "dev", "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, diff --git a/src/Parsem/Parser.php b/src/Parsem/Parser.php index 207289a..c529198 100644 --- a/src/Parsem/Parser.php +++ b/src/Parsem/Parser.php @@ -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));