summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-01-27 08:28:23 +0100
committerRemi Collet <remi@remirepo.net>2020-01-27 08:28:23 +0100
commit2b1a0b67d413b58e1c9de27dc4aba488e5273fd2 (patch)
tree6660e563760c6928322a75bf9f91dad8be1f5f0a
parent3576136d1af47d861b4244ba5949ff05a3ddd6b5 (diff)
update to 0.12.27
add patch for PHP 7.4 from https://github.com/swaggest/php-json-schema/pull/101
-rw-r--r--101.patch29
-rw-r--r--php-swaggest-json-schema.spec12
2 files changed, 39 insertions, 2 deletions
diff --git a/101.patch b/101.patch
new file mode 100644
index 0000000..c06d2b2
--- /dev/null
+++ b/101.patch
@@ -0,0 +1,29 @@
+From 2d8ed28626848ce0b8cb0bdc71f39d557a87cadc Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Mon, 27 Jan 2020 08:24:35 +0100
+Subject: [PATCH] fix Trying to access array offset on value of type null (7.4)
+
+---
+ src/Wrapper.php | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/Wrapper.php b/src/Wrapper.php
+index 0a0a24a..19090cf 100644
+--- a/src/Wrapper.php
++++ b/src/Wrapper.php
+@@ -105,7 +105,7 @@ public function getProperties()
+ */
+ public function getProperty($name)
+ {
+- return $this->schema->properties[$name];
++ return isset($this->schema->properties[$name]) ? $this->schema->properties[$name] : null;
+ }
+
+ /**
+@@ -216,4 +216,4 @@ public function jsonSerialize()
+ return $this->schema->jsonSerialize();
+ }
+
+-}
+\ No newline at end of file
++}
diff --git a/php-swaggest-json-schema.spec b/php-swaggest-json-schema.spec
index 5c24445..b11f6e4 100644
--- a/php-swaggest-json-schema.spec
+++ b/php-swaggest-json-schema.spec
@@ -9,7 +9,7 @@
%global with_tests 0%{!?_without_tests:1}
# Github
-%global gh_commit 0f509795092872601752f8a1f20f3cad4670370d
+%global gh_commit 9ec863a05a40e9b4547bc0c43dc6992cf17307a3
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner swaggest
%global gh_project php-json-schema
@@ -22,7 +22,7 @@
%global major %nil
Name: php-%{pk_vendor}-%{pk_project}%{major}
-Version: 0.12.25
+Version: 0.12.27
Release: 1%{?gh_date?%{gh_date}git%{gh_short}}%{?dist}
Summary: High definition PHP structures with JSON-schema based validation
@@ -31,6 +31,8 @@ URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: %{name}-%{version}-%{?gh_short}.tgz
Source1: makesrc.sh
+Patch0: https://patch-diff.githubusercontent.com/raw/swaggest/php-json-schema/pull/101.patch
+
BuildArch: noarch
%if %{with_tests}
BuildRequires: php(language) >= 5.4
@@ -97,6 +99,7 @@ Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}/autoload.php
%prep
%setup -q -n %{gh_project}-%{gh_commit}
+%patch0 -p1
: Fix layout
mkdir src/spec
@@ -154,6 +157,11 @@ exit $ret
%changelog
+* Mon Jan 27 2020 Remi Collet <remi@remirepo.net> - 0.12.27-1
+- update to 0.12.27
+- add patch for PHP 7.4 from
+ https://github.com/swaggest/php-json-schema/pull/101
+
* Tue Jan 7 2020 Remi Collet <remi@remirepo.net> - 0.12.25-1
- update to 0.12.25