From 2ab796d80e4060429ca3d88df8c63983be2f051d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 23 Jan 2020 12:15:24 +0100 Subject: fix autoloader, ensure functions are not defined twice --- php-laminas-diactoros.spec | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/php-laminas-diactoros.spec b/php-laminas-diactoros.spec index 4b71c84..6bc1c55 100644 --- a/php-laminas-diactoros.spec +++ b/php-laminas-diactoros.spec @@ -36,7 +36,7 @@ Name: php-%{gh_project} Version: 1.8.7p1 -Release: 2%{?gh_release}%{?dist} +Release: 3%{?gh_release}%{?dist} Summary: PSR HTTP Message implementations License: BSD @@ -138,7 +138,8 @@ mv LICENSE.md LICENSE : Create autoloader phpab --template fedora --output src/autoload.php src cat <<'AUTOLOAD' | tee -a src/autoload.php -\Fedora\Autoloader\Dependencies::required(array( +if (!function_exists('Laminas\\Diactoros\\createUploadedFile')) { + \Fedora\Autoloader\Dependencies::required(array( '%{phpdir}/Psr/Http/Message/autoload.php', __DIR__.'/functions/create_uploaded_file.php', __DIR__.'/functions/marshal_headers_from_sapi.php', @@ -148,14 +149,16 @@ cat <<'AUTOLOAD' | tee -a src/autoload.php __DIR__.'/functions/normalize_server.php', __DIR__.'/functions/normalize_uploaded_files.php', __DIR__.'/functions/parse_cookie_header.php', -)); + )); +} AUTOLOAD cat << 'EOF' | tee zf.php - 1.8.7p1-3 +- fix autoloader, ensure functions are not defined twice + * Fri Jan 17 2020 Remi Collet - 1.8.7p1-2 - cleanup -- cgit