diff --git a/composer.json b/composer.json index a743d278a..8fcd1ea93 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ }, "require": { "php": "^5.3.2 || ^7.0", - "justinrainbow/json-schema": "^1.4.4", + "justinrainbow/json-schema": "^1.6", "composer/spdx-licenses": "^1.0", "composer/semver": "^1.0", "seld/jsonlint": "^1.4", diff --git a/composer.lock b/composer.lock index 2310a1ec7..7bc8d3320 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "93e6b0b69e1d2831beb016b291320e65", - "content-hash": "e50c021dd9230b14ee88fe3d62c3923f", + "hash": "fdf4b487fa59607376721ebec4ff4783", + "content-hash": "454148e20b837d9755dee7862f9c7a5d", "packages": [ { "name": "composer/semver", @@ -132,16 +132,16 @@ }, { "name": "justinrainbow/json-schema", - "version": "1.5.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "a4bee9f4b344b66e0a0d96c7afae1e92edf385fe" + "reference": "f9e27c3e202faf14fd581ef41355d83bb4b7eb7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/a4bee9f4b344b66e0a0d96c7afae1e92edf385fe", - "reference": "a4bee9f4b344b66e0a0d96c7afae1e92edf385fe", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/f9e27c3e202faf14fd581ef41355d83bb4b7eb7d", + "reference": "f9e27c3e202faf14fd581ef41355d83bb4b7eb7d", "shasum": "" }, "require": { @@ -194,7 +194,7 @@ "json", "schema" ], - "time": "2015-09-08 22:28:04" + "time": "2016-01-06 14:37:04" }, { "name": "seld/cli-prompt", @@ -336,16 +336,16 @@ }, { "name": "symfony/console", - "version": "v2.8.0", + "version": "v2.8.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "d232bfc100dfd32b18ccbcab4bcc8f28697b7e41" + "reference": "2e06a5ccb19dcf9b89f1c6a677a39a8df773635a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/d232bfc100dfd32b18ccbcab4bcc8f28697b7e41", - "reference": "d232bfc100dfd32b18ccbcab4bcc8f28697b7e41", + "url": "https://api.github.com/repos/symfony/console/zipball/2e06a5ccb19dcf9b89f1c6a677a39a8df773635a", + "reference": "2e06a5ccb19dcf9b89f1c6a677a39a8df773635a", "shasum": "" }, "require": { @@ -392,20 +392,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2015-11-30 12:35:10" + "time": "2015-12-22 10:25:57" }, { "name": "symfony/filesystem", - "version": "v2.8.0", + "version": "v2.8.1", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "3e661a0d521ac67496515fa6e6704bd61bcfff60" + "reference": "a7ad724530a764d70c168d321ac226ba3d2f10fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/3e661a0d521ac67496515fa6e6704bd61bcfff60", - "reference": "3e661a0d521ac67496515fa6e6704bd61bcfff60", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/a7ad724530a764d70c168d321ac226ba3d2f10fc", + "reference": "a7ad724530a764d70c168d321ac226ba3d2f10fc", "shasum": "" }, "require": { @@ -441,20 +441,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2015-11-23 10:19:46" + "time": "2015-12-22 10:25:57" }, { "name": "symfony/finder", - "version": "v2.8.0", + "version": "v2.8.1", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "ead9b07af4ba77b6507bee697396a5c79e633f08" + "reference": "dd41ae57f4f737be271d944a0cc5f5f21203a7c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/ead9b07af4ba77b6507bee697396a5c79e633f08", - "reference": "ead9b07af4ba77b6507bee697396a5c79e633f08", + "url": "https://api.github.com/repos/symfony/finder/zipball/dd41ae57f4f737be271d944a0cc5f5f21203a7c6", + "reference": "dd41ae57f4f737be271d944a0cc5f5f21203a7c6", "shasum": "" }, "require": { @@ -490,25 +490,28 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2015-10-30 20:15:42" + "time": "2015-12-05 11:09:21" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.0.0", + "version": "v1.0.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0b6a8940385311a24e060ec1fe35680e17c74497" + "reference": "49ff736bd5d41f45240cec77b44967d76e0c3d25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0b6a8940385311a24e060ec1fe35680e17c74497", - "reference": "0b6a8940385311a24e060ec1fe35680e17c74497", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/49ff736bd5d41f45240cec77b44967d76e0c3d25", + "reference": "49ff736bd5d41f45240cec77b44967d76e0c3d25", "shasum": "" }, "require": { "php": ">=5.3.3" }, + "suggest": { + "ext-mbstring": "For best performance" + }, "type": "library", "extra": { "branch-alias": { @@ -546,20 +549,20 @@ "portable", "shim" ], - "time": "2015-11-04 20:28:58" + "time": "2015-11-20 09:19:13" }, { "name": "symfony/process", - "version": "v2.8.0", + "version": "v2.8.1", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "1b988a88e3551102f3c2d9e1d47a18c3a78d6312" + "reference": "62c254438b5040bc2217156e1570cf2206e8540c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/1b988a88e3551102f3c2d9e1d47a18c3a78d6312", - "reference": "1b988a88e3551102f3c2d9e1d47a18c3a78d6312", + "url": "https://api.github.com/repos/symfony/process/zipball/62c254438b5040bc2217156e1570cf2206e8540c", + "reference": "62c254438b5040bc2217156e1570cf2206e8540c", "shasum": "" }, "require": { @@ -595,7 +598,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2015-11-30 12:35:10" + "time": "2015-12-23 11:03:46" } ], "packages-dev": [ @@ -1502,16 +1505,16 @@ }, { "name": "symfony/yaml", - "version": "v2.8.0", + "version": "v2.8.1", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "f79824187de95064a2f5038904c4d7f0227fedb5" + "reference": "ac84cbb98b68a6abbc9f5149eb96ccc7b07b8966" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/f79824187de95064a2f5038904c4d7f0227fedb5", - "reference": "f79824187de95064a2f5038904c4d7f0227fedb5", + "url": "https://api.github.com/repos/symfony/yaml/zipball/ac84cbb98b68a6abbc9f5149eb96ccc7b07b8966", + "reference": "ac84cbb98b68a6abbc9f5149eb96ccc7b07b8966", "shasum": "" }, "require": { @@ -1547,7 +1550,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2015-11-30 12:35:10" + "time": "2015-12-26 13:37:56" } ], "aliases": [], diff --git a/tests/Composer/Test/Json/ComposerSchemaTest.php b/tests/Composer/Test/Json/ComposerSchemaTest.php index 14521faae..b58eebccc 100644 --- a/tests/Composer/Test/Json/ComposerSchemaTest.php +++ b/tests/Composer/Test/Json/ComposerSchemaTest.php @@ -23,18 +23,18 @@ class ComposerSchemaTest extends \PHPUnit_Framework_TestCase { $json = '{ }'; $this->assertEquals(array( - array('property' => 'name', 'message' => 'The property name is required'), - array('property' => 'description', 'message' => 'The property description is required'), + array('property' => 'name', 'message' => 'The property name is required', 'constraint' => 'required'), + array('property' => 'description', 'message' => 'The property description is required', 'constraint' => 'required'), ), $this->check($json)); $json = '{ "name": "vendor/package" }'; $this->assertEquals(array( - array('property' => 'description', 'message' => 'The property description is required'), + array('property' => 'description', 'message' => 'The property description is required', 'constraint' => 'required'), ), $this->check($json)); $json = '{ "description": "generic description" }'; $this->assertEquals(array( - array('property' => 'name', 'message' => 'The property name is required'), + array('property' => 'name', 'message' => 'The property name is required', 'constraint' => 'required'), ), $this->check($json)); } @@ -51,6 +51,8 @@ class ComposerSchemaTest extends \PHPUnit_Framework_TestCase array( 'property' => 'minimum-stability', 'message' => 'Does not match the regex pattern ^dev|alpha|beta|rc|RC|stable$', + 'constraint' => 'pattern', + 'pattern' => '^dev|alpha|beta|rc|RC|stable$', ), ), $this->check($json), 'empty string'); @@ -59,6 +61,8 @@ class ComposerSchemaTest extends \PHPUnit_Framework_TestCase array( 'property' => 'minimum-stability', 'message' => 'Does not match the regex pattern ^dev|alpha|beta|rc|RC|stable$', + 'constraint' => 'pattern', + 'pattern' => '^dev|alpha|beta|rc|RC|stable$', ), ), $this->check($json), 'dummy');