summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json65
-rw-r--r--php-justinrainbow-json-schema5-rpm.patch24
-rw-r--r--php-justinrainbow-json-schema5.spec11
3 files changed, 57 insertions, 43 deletions
diff --git a/composer.json b/composer.json
index 6e72ab9..20e85fc 100644
--- a/composer.json
+++ b/composer.json
@@ -1,9 +1,12 @@
{
"name": "justinrainbow/json-schema",
+ "type": "library",
"description": "A library to validate a json schema.",
- "keywords": ["json", "schema"],
+ "keywords": [
+ "json",
+ "schema"
+ ],
"homepage": "https://github.com/justinrainbow/json-schema",
- "type": "library",
"license": "MIT",
"authors": [
{
@@ -23,43 +26,51 @@
"email": "seroscho@googlemail.com"
}
],
- "repositories": [{
- "type": "package",
- "package": {
- "name": "json-schema/JSON-Schema-Test-Suite",
- "version": "1.2.0",
- "source": {
- "url": "https://github.com/json-schema/JSON-Schema-Test-Suite",
- "type": "git",
- "reference": "1.2.0"
- }
- }
- }],
"require": {
"php": ">=5.3.3"
},
"require-dev": {
+ "friendsofphp/php-cs-fixer": "~2.2.20",
"json-schema/JSON-Schema-Test-Suite": "1.2.0",
- "friendsofphp/php-cs-fixer": "^2.1",
"phpunit/phpunit": "^4.8.35"
},
- "autoload": {
- "psr-4": { "JsonSchema\\": "src/JsonSchema/" }
- },
- "autoload-dev": {
- "psr-4": { "JsonSchema\\Tests\\": "tests/" }
- },
- "bin": ["bin/validate-json"],
"extra": {
"branch-alias": {
"dev-master": "5.0.x-dev"
}
},
+ "autoload": {
+ "psr-4": {
+ "JsonSchema\\": "src/JsonSchema/"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "JsonSchema\\Tests\\": "tests/"
+ }
+ },
+ "repositories": [
+ {
+ "type": "package",
+ "package": {
+ "name": "json-schema/JSON-Schema-Test-Suite",
+ "version": "1.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/json-schema/JSON-Schema-Test-Suite",
+ "reference": "1.2.0"
+ }
+ }
+ }
+ ],
+ "bin": [
+ "bin/validate-json"
+ ],
"scripts": {
- "test" : "phpunit",
- "testOnly" : "phpunit --colors --filter",
- "coverage" : "phpunit --coverage-text",
- "style-check" : "php-cs-fixer fix --dry-run --verbose --diff",
- "style-fix" : "php-cs-fixer fix --verbose"
+ "coverage": "phpunit --coverage-text",
+ "style-check": "php-cs-fixer fix --dry-run --verbose --diff",
+ "style-fix": "php-cs-fixer fix --verbose",
+ "test": "phpunit",
+ "testOnly": "phpunit --colors --filter"
}
}
diff --git a/php-justinrainbow-json-schema5-rpm.patch b/php-justinrainbow-json-schema5-rpm.patch
index e354326..8485708 100644
--- a/php-justinrainbow-json-schema5-rpm.patch
+++ b/php-justinrainbow-json-schema5-rpm.patch
@@ -1,6 +1,6 @@
diff -up ./bin/validate-json.rpm ./bin/validate-json
---- ./bin/validate-json.rpm 2017-03-23 08:58:50.000000000 +0100
-+++ ./bin/validate-json 2017-03-23 09:23:35.797857285 +0100
+--- ./bin/validate-json.rpm 2019-01-15 07:24:47.000000000 +0100
++++ ./bin/validate-json 2019-01-15 07:25:27.730125985 +0100
@@ -6,32 +6,7 @@
* @author Christian Weiske <christian.weiske@netresearch.de>
*/
@@ -36,9 +36,9 @@ diff -up ./bin/validate-json.rpm ./bin/validate-json
$arOptions = array();
$arArgs = array();
diff -up ./src/JsonSchema/Uri/UriRetriever.php.rpm ./src/JsonSchema/Uri/UriRetriever.php
---- ./src/JsonSchema/Uri/UriRetriever.php.rpm 2017-03-23 08:58:50.000000000 +0100
-+++ ./src/JsonSchema/Uri/UriRetriever.php 2017-03-23 09:23:35.797857285 +0100
-@@ -323,7 +323,8 @@ class UriRetriever implements BaseUriRet
+--- ./src/JsonSchema/Uri/UriRetriever.php.rpm 2019-01-15 07:24:47.000000000 +0100
++++ ./src/JsonSchema/Uri/UriRetriever.php 2019-01-15 07:25:27.731125991 +0100
+@@ -342,7 +342,8 @@ class UriRetriever implements BaseUriRet
}
// translate references to local files within the json-schema package
@@ -49,9 +49,9 @@ diff -up ./src/JsonSchema/Uri/UriRetriever.php.rpm ./src/JsonSchema/Uri/UriRetri
return $uri;
}
diff -up ./tests/Uri/UriRetrieverTest.php.rpm ./tests/Uri/UriRetrieverTest.php
---- ./tests/Uri/UriRetrieverTest.php.rpm 2017-03-23 08:58:50.000000000 +0100
-+++ ./tests/Uri/UriRetrieverTest.php 2017-03-23 09:28:28.992372836 +0100
-@@ -295,7 +295,8 @@ EOF;
+--- ./tests/Uri/UriRetrieverTest.php.rpm 2019-01-15 07:24:47.000000000 +0100
++++ ./tests/Uri/UriRetrieverTest.php 2019-01-15 07:26:27.403439007 +0100
+@@ -296,7 +296,8 @@ EOF;
public function testPackageURITranslation()
{
$retriever = new UriRetriever();
@@ -61,7 +61,7 @@ diff -up ./tests/Uri/UriRetrieverTest.php.rpm ./tests/Uri/UriRetrieverTest.php
$uri = $retriever->translate('package://foo/bar.json');
$this->assertEquals("${root}foo/bar.json", $uri);
-@@ -304,7 +305,8 @@ EOF;
+@@ -305,7 +306,8 @@ EOF;
public function testDefaultDistTranslations()
{
$retriever = new UriRetriever();
@@ -71,7 +71,7 @@ diff -up ./tests/Uri/UriRetrieverTest.php.rpm ./tests/Uri/UriRetrieverTest.php
$this->assertEquals(
$root . 'json-schema-draft-03.json',
-@@ -322,11 +324,12 @@ EOF;
+@@ -323,11 +325,12 @@ EOF;
$retriever = new UriRetriever();
// load schema from package
@@ -85,8 +85,8 @@ diff -up ./tests/Uri/UriRetrieverTest.php.rpm ./tests/Uri/UriRetrieverTest.php
+ $this->assertEquals('c2ef5714b639cea176fdeeafe418aa09', md5(json_encode($schema)));
}
- public function testJsonSchemaOrgMediaTypeHack()
-@@ -365,7 +367,7 @@ EOF;
+ public function testInvalidContentTypeEndpointsDefault()
+@@ -389,7 +392,7 @@ EOF;
'JsonSchema\Exception\JsonDecodingException',
'JSON syntax is malformed'
);
diff --git a/php-justinrainbow-json-schema5.spec b/php-justinrainbow-json-schema5.spec
index ccb7f7b..cae3033 100644
--- a/php-justinrainbow-json-schema5.spec
+++ b/php-justinrainbow-json-schema5.spec
@@ -1,19 +1,19 @@
# remirepo/fedora spec file for php-justinrainbow-json-schema5
#
-# Copyright (c) 2016-2018 Remi Collet
+# Copyright (c) 2016-2019 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-%global gh_commit 8560d4314577199ba51bf2032f02cd1315587c23
+%global gh_commit dcb6e1006bb5fd1e392b4daa68932880f37550d4
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner justinrainbow
%global gh_project json-schema
%global php_home %{_datadir}/php
%global with_tests 0%{!?_without_tests:1}
%global major 5
-%global minor 2.7
+%global minor 2.8
# Some sample files, only used for tests
@@ -157,7 +157,7 @@ php bin/validate-json-test \
: Upstream test suite
ret=0
-for cmd in php php70 php71 php72; do
+for cmd in php php70 php71 php72 php73; do
if which $cmd; then
$cmd -d memory_limit=1G %{_bindir}/phpunit -d memory_limit=1G --verbose || ret=1
fi
@@ -179,6 +179,9 @@ exit $ret
%changelog
+* Tue Jan 15 2019 Remi Collet <remi@remirepo.net> - 5.2.8-1
+- update to 5.2.8
+
* Thu Feb 15 2018 Remi Collet <remi@remirepo.net> - 5.2.7-1
- Update to 5.2.7