From 63fca7d32c148532229273bc0a11eee82e93a4d6 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 5 Jul 2019 15:57:04 +0200 Subject: fix autoloader --- php-sabre-http-autoload.php | 4 +++- php-sabre-http.spec | 14 +++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/php-sabre-http-autoload.php b/php-sabre-http-autoload.php index f305e1a..abbc601 100644 --- a/php-sabre-http-autoload.php +++ b/php-sabre-http-autoload.php @@ -6,7 +6,9 @@ require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('Sabre\\HTTP\\', __DIR__); // Functions -require_once __DIR__ . '/functions.php'; +if (!function_exists('Sabre\\HTTP\\parseDate')) { + require_once __DIR__ . '/functions.php'; +} \Fedora\Autoloader\Dependencies::required(array( '/usr/share/php/Sabre/Event/autoload.php', diff --git a/php-sabre-http.spec b/php-sabre-http.spec index ee84176..0546dc4 100644 --- a/php-sabre-http.spec +++ b/php-sabre-http.spec @@ -1,6 +1,6 @@ # remirepo/fedora spec file for php-sabre-http # -# Copyright (c) 2013-2017 Remi Collet +# Copyright (c) 2013-2019 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -16,7 +16,7 @@ Name: php-sabre-%{gh_project} Summary: Library for dealing with http requests and responses Version: 4.2.4 -Release: 1%{?dist} +Release: 4%{?dist} URL: https://github.com/%{gh_owner}/%{gh_project} License: BSD @@ -29,9 +29,11 @@ BuildRequires: php(language) > 5.4 BuildRequires: php-mbstring BuildRequires: php-ctype BuildRequires: php-composer(phpunit/phpunit) +# remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(sabre/event) >= 2.0.2 with php-composer(sabre/event) < 4) BuildRequires: (php-composer(sabre/uri) >= 1.0 with php-composer(sabre/uri) < 2) +# remirepo:4 %else BuildRequires: php-sabre-event >= 2.0.2 BuildRequires: php-sabre-uri @@ -56,9 +58,11 @@ BuildRequires: php-composer(fedora/autoloader) Requires: php(language) > 5.4 Requires: php-mbstring Requires: php-ctype +# remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 Requires: (php-composer(sabre/event) >= 2.0.2 with php-composer(sabre/event) < 4) Requires: (php-composer(sabre/uri) >= 1.0 with php-composer(sabre/uri) < 2) +# remirepo:4 %else Requires: php-sabre-event >= 2.0.2 Requires: php-sabre-uri @@ -129,7 +133,7 @@ cd tests : Run upstream test suite against installed library ret=0 -for cmd in php php70 php71 php72; do +for cmd in php php71 php72 php73 php74; do if which $cmd; then $cmd %{_bindir}/phpunit --bootstrap=%{buildroot}%{_datadir}/php/Sabre/HTTP/autoload.php --verbose || ret=1 fi @@ -141,6 +145,7 @@ exit $ret %files +# remirepo:1 %{!?_licensedir:%global license %%doc} %license LICENSE %doc *md @@ -149,6 +154,9 @@ exit $ret %changelog +* Fri Jul 5 2019 Remi Collet - 4.2.4-4 +- fix autoloader + * Tue Jun 5 2018 Remi Collet - 4.2.4-1 - update to 4.2.4 - use range dependencies on F27+ -- cgit