diff --git a/composer.json b/composer.json index 4ac909c..0aee4f8 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "php": ">=7.1.0", "ext-mbstring": "*", "ext-json": "*", - "justinrainbow/json-schema": "^5.2.10", + "justinrainbow/json-schema": "^6.6", "nesbot/carbon": "^2.63.0", "jmikola/geojson": "^1.0" }, diff --git a/phpunit.xml.dist b/phpunit.xml.dist index ffe54a2..30f43ba 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,20 +1,17 @@ - - - - - - - - tests - - - - - - src - - + + + + src + + + + + + + + + tests + + diff --git a/tests/SchemaTest.php b/tests/SchemaTest.php index 30dc1e1..499fe48 100644 --- a/tests/SchemaTest.php +++ b/tests/SchemaTest.php @@ -584,9 +584,14 @@ public function testSpecsUriFormat(): void 'pointer' => '/0', // it considers file names to be invalid uris 'message' => 'Invalid URL format', - 'constraint' => 'format', - 'context' => 1, - 'format' => 'uri', + // Constraint errors are arrays since justinrainbow/json-schema:^6 + 'constraint' => [ + 'name' => 'urlFormat', + 'params' => [ + 'format' => 'uri' + ], + ], + 'context' => 1 ]], $validator->getErrors()); }