summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--1187.patch23
-rw-r--r--php-sabre-dav4.spec13
2 files changed, 32 insertions, 4 deletions
diff --git a/1187.patch b/1187.patch
new file mode 100644
index 0000000..c61fc7f
--- /dev/null
+++ b/1187.patch
@@ -0,0 +1,23 @@
+From f3c91ec654abe9774570ca0602a0e4916e3bf5b5 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Tue, 20 Aug 2019 11:44:24 +0200
+Subject: [PATCH] fix Trying to access array offset on value of type null in
+ 7.4
+
+---
+ lib/DAV/Xml/Property/Href.php | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/DAV/Xml/Property/Href.php b/lib/DAV/Xml/Property/Href.php
+index 2d55e0ace5..d60bd15887 100644
+--- a/lib/DAV/Xml/Property/Href.php
++++ b/lib/DAV/Xml/Property/Href.php
+@@ -59,7 +59,7 @@ public function __construct($hrefs)
+ */
+ public function getHref()
+ {
+- return $this->hrefs[0];
++ return $this->hrefs[0] ?? null;
+ }
+
+ /**
diff --git a/php-sabre-dav4.spec b/php-sabre-dav4.spec
index c3c4ce2..432f975 100644
--- a/php-sabre-dav4.spec
+++ b/php-sabre-dav4.spec
@@ -23,7 +23,7 @@
Name: php-%{pk_vendor}-%{pk_project}%{major}
Summary: WebDAV Framework for PHP
Version: 4.0.1
-Release: 1%{?dist}
+Release: 2%{?dist}
URL: https://github.com/%{gh_owner}/%{gh_project}
# sabre is BSD
@@ -33,6 +33,7 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit
# replace composer autoloader
Patch0: %{name}-autoload.patch
+Patch1: https://patch-diff.githubusercontent.com/raw/sabre-io/dav/pull/1187.patch
BuildArch: noarch
%if %{with_tests}
@@ -168,6 +169,7 @@ Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}/autoload.php
mv lib/DAV/Browser/assets/openiconic/ICON-LICENSE .
%patch0 -p1 -b .rpm
+%patch1 -p1
: relocate
for dir in CalDAV CardDAV DAV DAVACL; do
@@ -211,11 +213,9 @@ sed -e 's:@BUILDROOT@:%{buildroot}:' -i bootstrap.php
# TODO testDeliverInsignificantRequest fails locally, not in mock
-# TODO 7.4 see https://github.com/sabre-io/dav/pull/1187
-
: Run upstream test suite against installed library
ret=0
-for cmd in php php71 php72 php73; do
+for cmd in php php71 php72 php73 php74; do
if which $cmd; then
$cmd %{_bindir}/phpunit6 \
--filter '^((?!(testDeliverInsignificantRequest)).)*$' \
@@ -242,6 +242,11 @@ exit $ret
%changelog
+* Tue Aug 20 2019 Remi Collet <remi@remirepo.net> - 4.0.1-2
+- update to 4.0.1
+- add patch for 7.4 from
+ https://github.com/sabre-io/dav/pull/1187
+
* Tue Aug 20 2019 Remi Collet <remi@remirepo.net> - 4.0.1-1
- update to 4.0.1