From d73459d626a82c30043e1e71564bb753264067d9 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 23 Jan 2020 12:15:15 +0100 Subject: fix autoloader, ensure functions are not defined twice --- php-laminas-diactoros2.spec | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/php-laminas-diactoros2.spec b/php-laminas-diactoros2.spec index 3165b15..f8efada 100644 --- a/php-laminas-diactoros2.spec +++ b/php-laminas-diactoros2.spec @@ -38,7 +38,7 @@ Name: php-%{gh_project}%{major} Version: 2.2.2 -Release: 1%{?gh_release}%{?dist} +Release: 2%{?gh_release}%{?dist} Summary: PSR HTTP Message implementations v%{major} License: BSD @@ -157,7 +157,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', '%{phpdir}/Psr/Http/Message/http-factory-autoload.php', __DIR__.'/functions/create_uploaded_file.php', @@ -168,14 +169,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 - 2.2.2-2 +- fix autoloader, ensure functions are not defined twice + * Wed Jan 22 2020 Remi Collet - 2.2.2-1 - update to 2.2.2 - rename to php-laminas-diactoros2 -- cgit