diff options
-rw-r--r-- | php-justinrainbow-json-schema-pr292.patch | 25 | ||||
-rw-r--r-- | php-justinrainbow-json-schema.spec | 26 |
2 files changed, 47 insertions, 4 deletions
diff --git a/php-justinrainbow-json-schema-pr292.patch b/php-justinrainbow-json-schema-pr292.patch new file mode 100644 index 0000000..80e17db --- /dev/null +++ b/php-justinrainbow-json-schema-pr292.patch @@ -0,0 +1,25 @@ +Adapted from v2.0.5 from: + + +From 14c9472c2ba0c8fdd5d99dc634f4db976d51237f Mon Sep 17 00:00:00 2001 +From: Remi Collet <fedora@famillecollet.com> +Date: Thu, 21 Jul 2016 18:37:10 +0200 +Subject: [PATCH] Fix #291 failed tests with lestest PHP + +Since 5.6.24, 7.0.9, 7.1.0beta1, negative timestamps are valid. +--- + tests/Constraints/FormatTest.php | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/tests/Constraints/FormatTest.php b/tests/Constraints/FormatTest.php +index f604c08..3ffe5b1 100644 +--- a/tests/Constraints/FormatTest.php ++++ b/tests/Constraints/FormatTest.php +@@ -141,7 +141,6 @@ class FormatTest extends BaseTestCase + array('1999-01-11T00:00:00+100', 'date-time'), + array('1999-01-11T00:00:00+1:00', 'date-time'), + +- array('-1', 'utc-millisec'), + array(PHP_INT_MAX, 'utc-millisec'), + + array('grey', 'color'), diff --git a/php-justinrainbow-json-schema.spec b/php-justinrainbow-json-schema.spec index 089c2b0..b34c121 100644 --- a/php-justinrainbow-json-schema.spec +++ b/php-justinrainbow-json-schema.spec @@ -30,7 +30,7 @@ Name: php-%{gh_owner}-%{gh_project} Version: 2.0.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A library to validate a json schema Group: Development/Libraries @@ -44,6 +44,8 @@ Source3: %{name}-makesrc.sh # Autoloader Patch0: %{name}-rpm.patch +# https://github.com/justinrainbow/json-schema/pull/292 +Patch1: %{name}-pr292.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -112,6 +114,7 @@ Autoloader: %{php_home}/JsonSchema2/autoload.php %setup -q -n %{gh_project}-%{gh_commit} -a 1 %patch0 -p0 -b .rpm +%patch1 -p1 cp %{SOURCE2} src/JsonSchema/autoload.php @@ -166,11 +169,22 @@ php bin/validate-json-test \ /usr/share/composer/res/composer-schema.json : Upstream test suite +# remirepo:11 +run=0 +ret=0 +if which php56; then + php56 %{_bindir}/phpunit || ret=1 + run=1 +fi +if which php71; then + php71 %{_bindir}/phpunit || ret=1 + run=1 +fi +if [ $run -eq 0 ]; then %{_bindir}/phpunit --verbose - -if which php70; then - php70 %{_bindir}/phpunit --verbose +# remirepo:2 fi +exit $ret %else : Test suite disabled %endif @@ -195,6 +209,10 @@ rm -rf %{buildroot} %changelog +* Thu Jul 21 2016 Remi Collet <remi@fedoraproject.org> - 2.0.5-2 +- fix failed test, FTBFS detected by Koschei + open https://github.com/justinrainbow/json-schema/pull/292 + * Thu Jun 2 2016 Remi Collet <remi@fedoraproject.org> - 2.0.5-1 - update to 2.0.5 |