From 35c7962ad5426748d3372c3eed9f6b024f94baa2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 30 Jan 2022 15:23:24 +0000 Subject: [PATCH 1/3] composer(deps): bump ergebnis/json-schema-validator from 2.0.0 to 3.0.0 Bumps [ergebnis/json-schema-validator](https://github.com/ergebnis/json-schema-validator) from 2.0.0 to 3.0.0. - [Release notes](https://github.com/ergebnis/json-schema-validator/releases) - [Changelog](https://github.com/ergebnis/json-schema-validator/blob/main/CHANGELOG.md) - [Commits](https://github.com/ergebnis/json-schema-validator/compare/2.0.0...3.0.0) --- updated-dependencies: - dependency-name: ergebnis/json-schema-validator dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- composer.json | 2 +- composer.lock | 29 +++++++++++++++-------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/composer.json b/composer.json index 5702f699..872b5c02 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "ext-json": "*", "ergebnis/json-pointer": "^2.1.0", "ergebnis/json-printer": "^3.2.0", - "ergebnis/json-schema-validator": "^2.0.0", + "ergebnis/json-schema-validator": "^3.0.0", "justinrainbow/json-schema": "^5.2.11" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 8cd03211..0536c7fc 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "889ed56e1c77fcb3aeae3d2cfeadde69", + "content-hash": "fc9f4fac7effb4223e0efd4658fc2702", "packages": [ { "name": "ergebnis/json-pointer", @@ -140,33 +140,34 @@ }, { "name": "ergebnis/json-schema-validator", - "version": "2.0.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/ergebnis/json-schema-validator.git", - "reference": "dacd8a47c1cc2c426ec71e952da3609ebe901fac" + "reference": "365d771958311eb1da6fa3a045f2e372cc62baa0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-schema-validator/zipball/dacd8a47c1cc2c426ec71e952da3609ebe901fac", - "reference": "dacd8a47c1cc2c426ec71e952da3609ebe901fac", + "url": "https://api.github.com/repos/ergebnis/json-schema-validator/zipball/365d771958311eb1da6fa3a045f2e372cc62baa0", + "reference": "365d771958311eb1da6fa3a045f2e372cc62baa0", "shasum": "" }, "require": { + "ergebnis/json-pointer": "^2.1.0", "ext-json": "*", "justinrainbow/json-schema": "^5.2.10", "php": "^7.4 || ^8.0" }, "require-dev": { - "ergebnis/composer-normalize": "^2.18.0", - "ergebnis/data-provider": "^1.0.0", - "ergebnis/license": "^1.1.0", - "ergebnis/php-cs-fixer-config": "~3.4.0", - "fakerphp/faker": "^1.17.0", - "infection/infection": "~0.25.3", - "phpunit/phpunit": "~9.5.10", + "ergebnis/composer-normalize": "^2.21.0", + "ergebnis/data-provider": "^1.1.0", + "ergebnis/license": "^1.2.0", + "ergebnis/php-cs-fixer-config": "~4.0.0", + "fakerphp/faker": "^1.18.0", + "infection/infection": "~0.26.4", + "phpunit/phpunit": "~9.5.13", "psalm/plugin-phpunit": "~0.16.1", - "vimeo/psalm": "^4.15.0" + "vimeo/psalm": "^4.19" }, "type": "library", "extra": { @@ -207,7 +208,7 @@ "type": "github" } ], - "time": "2021-12-13T16:54:56+00:00" + "time": "2022-01-30T12:07:47+00:00" }, { "name": "justinrainbow/json-schema", From 15bb1dbbf8f1568a43a5e1a659b3ee80ee6c30cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Sun, 30 Jan 2022 16:28:19 +0100 Subject: [PATCH 2/3] Fix: Use JsonPointer as provided by ergebnis/json-pointer --- src/SchemaNormalizer.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/SchemaNormalizer.php b/src/SchemaNormalizer.php index ba637f5e..af6f3f94 100644 --- a/src/SchemaNormalizer.php +++ b/src/SchemaNormalizer.php @@ -13,6 +13,7 @@ namespace Ergebnis\Json\Normalizer; +use Ergebnis\Json\Pointer; use Ergebnis\Json\SchemaValidator; use JsonSchema\Exception\InvalidSchemaMediaTypeException; use JsonSchema\Exception\JsonDecodingException; @@ -53,7 +54,7 @@ public function normalize(Json $json): Json $resultBeforeNormalization = $this->schemaValidator->validate( SchemaValidator\Json::fromString($json->encoded()), SchemaValidator\Json::fromString(\json_encode($schema)), - SchemaValidator\JsonPointer::empty(), + Pointer\JsonPointer::document(), ); if (!$resultBeforeNormalization->isValid()) { @@ -73,7 +74,7 @@ public function normalize(Json $json): Json $resultAfterNormalization = $this->schemaValidator->validate( SchemaValidator\Json::fromString($normalized->encoded()), SchemaValidator\Json::fromString(\json_encode($schema)), - SchemaValidator\JsonPointer::empty(), + Pointer\JsonPointer::document(), ); if (!$resultAfterNormalization->isValid()) { @@ -238,7 +239,7 @@ private function resolveSchema( $result = $this->schemaValidator->validate( SchemaValidator\Json::fromString(\json_encode($data)), SchemaValidator\Json::fromString(\json_encode($anyOfSchema)), - SchemaValidator\JsonPointer::empty(), + Pointer\JsonPointer::document(), ); if ($result->isValid()) { @@ -261,7 +262,7 @@ private function resolveSchema( $result = $this->schemaValidator->validate( SchemaValidator\Json::fromString(\json_encode($data)), SchemaValidator\Json::fromString(\json_encode($oneOfSchema)), - SchemaValidator\JsonPointer::empty(), + Pointer\JsonPointer::document(), ); if ($result->isValid()) { From 3ebf8d85e71aa3bc0dabafac9c62a0ea14261991 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Sun, 30 Jan 2022 16:28:42 +0100 Subject: [PATCH 3/3] Fix: Update CHANGELOG.md --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca9f2b38..8cdebccb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), For a full diff see [`2.2.0...main`][2.2.0...main]. +### Changed + +- Required `ergebnis/json-schema-validator:^3.0.0` ([#666]), by [@dependabot] + ## [`2.2.0`][2.2.0] For a full diff see [`2.1.0...2.2.0`][2.1.0...2.2.0]. @@ -476,6 +480,7 @@ For a full diff see [`5d8b3e2...0.1.0`][5d8b3e2...0.1.0]. [#632]: https://github.com/ergebnis/json-normalizer/pull/632 [#639]: https://github.com/ergebnis/json-normalizer/pull/639 [#641]: https://github.com/ergebnis/json-normalizer/pull/641 +[#666]: https://github.com/ergebnis/json-normalizer/pull/666 [@BackEndTea]: https://github.com/BackEndTea [@dependabot]: https://github.com/dependabot