From b0b2b534b983cf388f269c5caebded20ed03e87a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 7 Jan 2020 14:15:28 +0100 Subject: switch to Laminas --- php-laminas-servicemanager.spec | 125 ++++++++++++++++++++++++---------------- 1 file changed, 74 insertions(+), 51 deletions(-) (limited to 'php-laminas-servicemanager.spec') diff --git a/php-laminas-servicemanager.spec b/php-laminas-servicemanager.spec index 80042e7..ecfc3f5 100644 --- a/php-laminas-servicemanager.spec +++ b/php-laminas-servicemanager.spec @@ -1,4 +1,4 @@ -# remirepo/Fedora spec file for php-zendframework-zend-servicemanager +# remirepo/Fedora spec file for php-laminas-servicemanager # # Copyright (c) 2015-2020 Remi Collet # License: CC-BY-SA @@ -7,11 +7,13 @@ # Please, preserve the changelog entries # %global bootstrap 0 -%global gh_commit a1ed6140d0d3ee803fec96582593ed024950067b +%global gh_commit 044cb8e380682563fb277ed5f6de4f690e4e6239 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -%global gh_owner zendframework -%global gh_project zend-servicemanager +%global gh_owner laminas +%global gh_project laminas-servicemanager +%global zf_name zend-servicemanager %global php_home %{_datadir}/php +%global namespace Laminas %global library ServiceManager %if %{bootstrap} %global with_tests 0%{?_with_tests:1} @@ -19,47 +21,50 @@ %global with_tests 0%{!?_without_tests:1} %endif -Name: php-%{gh_owner}-%{gh_project} +Name: php-%{gh_project} Version: 3.4.0 -Release: 4%{?dist} -Summary: Zend Framework %{library} component +Release: 1%{?dist} +Summary: Laminas Framework %{library} component License: BSD -URL: https://zendframework.github.io/%{gh_project}/ +URL: https://github.com/%{gh_owner}/%{gh_project} Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh +Patch0: https://patch-diff.githubusercontent.com/raw/laminas/laminas-servicemanager/pull/28.patch + BuildArch: noarch # Tests %if %{with_tests} BuildRequires: php(language) >= 5.6 # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -BuildRequires: (php-composer(container-interop/container-interop) >= 1.2 with php-composer(container-interop/container-interop) < 2) -BuildRequires: (php-composer(psr/container) >= 1.0 with php-composer(psr/container) < 2) -BuildRequires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1 with php-autoloader(%{gh_owner}/zend-stdlib) < 4) +BuildRequires: (php-composer(%{gh_owner}/laminas-zendframework-bridge) >= 1.0 with php-composer(%{gh_owner}/laminas-zendframework-bridge) < 2) +BuildRequires: (php-composer(container-interop/container-interop) >= 1.2 with php-composer(container-interop/container-interop) < 2) +BuildRequires: (php-composer(psr/container) >= 1.0 with php-composer(psr/container) < 2) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.2.1 with php-autoloader(%{gh_owner}/laminas-stdlib) < 4) # remirepo:8 %else +BuildRequires: php-laminas-stdlib >= 3.2.1 +BuildRequires: php-laminas-zendframework-bridge BuildRequires: php-composer(container-interop/container-interop) < 2 BuildRequires: php-composer(container-interop/container-interop) >= 1.2 BuildRequires: php-composer(psr/container) < 2 BuildRequires: php-composer(psr/container) >= 1.0 -BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) < 4 -BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1 %endif BuildRequires: php-reflection BuildRequires: php-date BuildRequires: php-json BuildRequires: php-spl # From composer, "require-dev": { -# "mikey179/vfsStream": "^1.6.5", +# "laminas/laminas-coding-standard": "~1.0.0", +# "mikey179/vfsstream": "^1.6.5", # "ocramius/proxy-manager": "^1.0 || ^2.0", # "phpbench/phpbench": "^0.13.0", # "phpunit/phpunit": "^5.7.25 || ^6.4.4" -# "zendframework/zend-coding-standard": "~1.0.0" # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -BuildRequires: (php-composer(mikey179/vfsStream) >= 1.6.5 with php-composer(mikey179/vfsStream) < 2) +BuildRequires: (php-composer(mikey179/vfsstream) >= 1.6.5 with php-composer(mikey179/vfsstream) < 2) BuildRequires: (php-composer(ocramius/proxy-manager) >= 1.0 with php-composer(ocramius/proxy-manager) < 3) # remirepo:6 %else @@ -76,32 +81,34 @@ BuildRequires: php-fedora-autoloader-devel # From composer, "require": { # "php": "^5.6 || ^7.0", # "container-interop/container-interop": "^1.2", -# "psr/container": "^1.0", -# "zendframework/zend-stdlib": "^3.1" +# "laminas/laminas-stdlib": "^3.2.1", +# "laminas/laminas-zendframework-bridge": "^1.0", +# "psr/container": "^1.0" Requires: php(language) >= 5.6 # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -Requires: (php-composer(container-interop/container-interop) >= 1.2 with php-composer(container-interop/container-interop) < 2) -Requires: (php-composer(psr/container) >= 1.0 with php-composer(psr/container) < 2) -Requires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1 with php-autoloader(%{gh_owner}/zend-stdlib) < 4) +Requires: (php-composer(container-interop/container-interop) >= 1.2 with php-composer(container-interop/container-interop) < 2) +Requires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.2.1 with php-autoloader(%{gh_owner}/laminas-stdlib) < 4) +Requires: (php-composer(%{gh_owner}/laminas-zendframework-bridge) >= 1.0 with php-composer(%{gh_owner}/laminas-zendframework-bridge) < 2) +Requires: (php-composer(psr/container) >= 1.0 with php-composer(psr/container) < 2) # remirepo:8 %else Requires: php-composer(container-interop/container-interop) >= 1.2 Requires: php-composer(container-interop/container-interop) < 2 +Requires: php-laminas-stdlib >= 3.2.1 +Requires: php-laminas-zendframework-bridge Requires: php-composer(psr/container) >= 1.0 Requires: php-composer(psr/container) < 2 -Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1 -Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4 %endif -# From phpcompatinfo report for version 3.2.0 +# From phpcompatinfo report for version 3.4.0 Requires: php-reflection Requires: php-date Requires: php-json Requires: php-spl %if ! %{bootstrap} # From composer, "suggest": { -# "ocramius/proxy-manager": "ProxyManager 1.* to handle lazy initialization of services", -# "zendframework/zend-stdlib": "zend-stdlib ^2.5 if you wish to use the MergeReplaceKey or MergeRemoveKey features in Config instances" +# "laminas/laminas-stdlib": "laminas-stdlib ^2.5 if you wish to use the MergeReplaceKey or MergeRemoveKey features in Config instances", +# "ocramius/proxy-manager": "ProxyManager 1.* to handle lazy initialization of services" %if 0%{?fedora} >= 21 || 0%{?rhel} >= 8 Suggests: php-composer(ocramius/proxy-manager) %endif @@ -109,59 +116,63 @@ Suggests: php-composer(ocramius/proxy-manager) Requires: php-composer(fedora/autoloader) %endif -Obsoletes: php-ZendFramework2-%{library} < 2.5 -Provides: php-ZendFramework2-%{library} = %{version} -Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} +# Compatibily ensure by the bridge +Obsoletes: php-zendframework-%{zf_name} < 3.4.0-99 +Provides: php-zendframework-%{zf_name} = %{version}-99 +Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} +Provides: php-composer(zendframework/%{zf_name}) = %{version} Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version} +Provides: php-autoloader(zendframework/%{zf_name}) = %{version} Provides: php-composer(container-interop/container-interop-implementation) = 1.2 Provides: php-composer(psr/container-implementation) = 1.0 %description -The Service Locator design pattern is implemented by the Zend\ServiceManager +The Service Locator design pattern is implemented by the %{gh_project} component. The Service Locator is a service/object locator, tasked with retrieving other objects. -Documentation: https://zendframework.github.io/%{gh_project}/ +Documentation: https://docs.laminas.dev/%{gh_project}/ %prep %setup -q -n %{gh_project}-%{gh_commit} - +%patch0 -p1 mv LICENSE.md LICENSE %build -: Create dependency autoloader - deprecated -cat << 'EOF' | tee autoload.php - - 3.4.0-1 +- switch to Laminas +- add fix for PHP 7.4 from + https://github.com/laminas/laminas-servicemanager/pull/28 + * Wed Oct 9 2019 Remi Collet - 3.4.0-4 - fix test autoloader -- cgit