From 54fa30069e5a38b2d8507069f8b7c4e4ce951416 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 23 Nov 2017 16:13:04 +0100 Subject: switch from zend-loader to fedora/autoloader --- php-zendframework-zend-servicemanager.spec | 78 +++++++++++++----------------- 1 file changed, 33 insertions(+), 45 deletions(-) diff --git a/php-zendframework-zend-servicemanager.spec b/php-zendframework-zend-servicemanager.spec index 634b8df..1d951e6 100644 --- a/php-zendframework-zend-servicemanager.spec +++ b/php-zendframework-zend-servicemanager.spec @@ -21,7 +21,7 @@ Name: php-%{gh_owner}-%{gh_project} Version: 3.3.0 -Release: 1%{?dist} +Release: 3%{?dist} Summary: Zend Framework %{library} component Group: Development/Libraries @@ -30,14 +30,13 @@ URL: https://zendframework.github.io/%{gh_project}/ Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildArch: noarch # Tests %if %{with_tests} BuildRequires: php(language) >= 5.6 BuildRequires: php-composer(container-interop/container-interop) >= 1.2 BuildRequires: php-composer(psr/container) >= 1.0 -BuildRequires: php-composer(%{gh_owner}/zend-stdlib) >= 3.1 +BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 3.1 BuildRequires: php-reflection BuildRequires: php-date BuildRequires: php-json @@ -52,9 +51,7 @@ BuildRequires: php-composer(phpunit/phpunit) >= 5.7 BuildRequires: php-composer(ocramius/proxy-manager) >= 1.0 BuildRequires: php-composer(mikey179/vfsStream) >= 1.6 # Autoloader -BuildRequires: php-composer(%{gh_owner}/zend-loader) >= 2.5 -# For dependencies autoloader -BuildRequires: php-zendframework-zend-loader >= 2.5.1-3 +BuildRequires: php-fedora-autoloader-devel %endif # From composer, "require": { @@ -67,8 +64,8 @@ Requires: php-composer(container-interop/container-interop) >= 1.2 Requires: php-composer(container-interop/container-interop) < 2 Requires: php-composer(psr/container) >= 1.0 Requires: php-composer(psr/container) < 2 -Requires: php-composer(%{gh_owner}/zend-stdlib) >= 3.1 -Requires: php-composer(%{gh_owner}/zend-stdlib) < 4 +Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 3.1 +Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4 # From phpcompatinfo report for version 3.2.0 Requires: php-reflection Requires: php-date @@ -82,13 +79,13 @@ Requires: php-spl Suggests: php-composer(ocramius/proxy-manager) %endif # Autoloader -Requires: php-composer(%{gh_owner}/zend-loader) >= 2.5 -Requires: php-zendframework-zend-loader >= 2.5.1-3 +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} +Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version} Provides: php-composer(container-interop/container-interop-implementation) = 1.2 Provides: php-composer(psr/container-implementation) = 1.0 @@ -106,7 +103,9 @@ Documentation: https://zendframework.github.io/%{gh_project}/ mv LICENSE.md LICENSE -: Create dependency autoloader + +%build +: Create dependency autoloader - deprecated cat << 'EOF' | tee autoload.php array( - 'namespaces' => array( - 'ZendTest\\%{library}' => dirname(__DIR__).'/test/', - 'Zend\\%{library}' => '%{buildroot}%{php_home}/Zend/%{library}' -)))); -require_once '%{php_home}/Zend/autoload.php'; +require_once '%{buildroot}%{php_home}/Zend/%{library}/autoload.php'; +\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\ServiceManager\\', dirname(__DIR__) . '/test'); EOF -# remirepo:11 -run=0 ret=0 -if which php56; then - php56 %{_bindir}/phpunit --include-path=%{buildroot}%{php_home} || : ignore - run=1 -fi -if which php71; then - php71 %{_bindir}/phpunit6 --include-path=%{buildroot}%{php_home} || ret=1 - run=1 -fi -if [ $run -eq 0 ]; then -%{_bindir}/phpunit --include-path=%{buildroot}%{php_home} --verbose -# remirepo:2 -fi +for cmd in php php70 php71 php72; do + if which $cmd; then + $cmd %{_bindir}/phpunit --verbose || ret=1 + fi +done exit $ret %else : Test suite disabled %endif -%clean -rm -rf %{buildroot} - - %files -%defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md @@ -183,6 +168,9 @@ rm -rf %{buildroot} %changelog +* Thu Nov 23 2017 Remi Collet - 3.3.0-3 +- switch from zend-loader to fedora/autoloader + * Thu Mar 2 2017 Remi Collet - 3.3.0-1 - update to 3.3.0 - raise dependency on container-interop/container-interop 1.2 -- cgit