From cb3beae52639a7b293523e617246ad203b37849b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 23 Nov 2017 15:36:17 +0100 Subject: switch from zend-loader to fedora/autoloader --- php-zendframework-zend-stdlib.spec | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/php-zendframework-zend-stdlib.spec b/php-zendframework-zend-stdlib.spec index c9e0732..8b2452c 100644 --- a/php-zendframework-zend-stdlib.spec +++ b/php-zendframework-zend-stdlib.spec @@ -21,7 +21,7 @@ Name: php-%{gh_owner}-%{gh_project} Version: 3.1.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Zend Framework %{library} component Group: Development/Libraries @@ -36,13 +36,11 @@ BuildArch: noarch # Tests %if %{with_tests} BuildRequires: php(language) >= 5.6 -BuildRequires: php-composer(%{gh_owner}/zend-hydrator) >= 1.1 -BuildRequires: php-date BuildRequires: php-iconv BuildRequires: php-intl BuildRequires: php-mbstring BuildRequires: php-pcre -BuildRequires: php-reflection +BuildRequires: php-posix BuildRequires: php-spl # From composer, "require-dev": { # "athletic/athletic": "~0.1", @@ -51,22 +49,21 @@ BuildRequires: php-spl # "squizlabs/php_codesniffer": "^2.6.2" BuildRequires: php-composer(phpunit/phpunit) >= 4.0 # Autoloader -BuildRequires: php-composer(%{gh_owner}/zend-loader) >= 2.5 +BuildRequires: php-fedora-autoloader-devel %endif # From composer, "require": { # "php": "^5.6 || ^7.0", Requires: php(language) >= 5.6 -# From phpcompatinfo report for version 2.7.4 -Requires: php-date +# From phpcompatinfo report for version 3.1.0 Requires: php-iconv Requires: php-intl Requires: php-mbstring Requires: php-pcre -Requires: php-reflection +Requires: php-posix Requires: php-spl # Autoloader -Requires: php-composer(%{gh_owner}/zend-loader) >= 2.5 +Requires: php-composer(fedora/autoloader) Obsoletes: php-ZendFramework2-%{library} < 2.5 Provides: php-ZendFramework2-%{library} = %{version} @@ -94,7 +91,7 @@ mv LICENSE.md LICENSE %build -# Empty build section, nothing required +phpab --template fedora --output src/autoload.php src %install @@ -107,20 +104,14 @@ cp -pr src %{buildroot}%{php_home}/Zend/%{library} mkdir vendor cat << 'EOF' | tee vendor/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\\Stdlib\\', dirname(__DIR__) . '/test'); EOF ret=0 for cmd in php php56 php70 php71 php72; do if which $cmd; then - $cmd %{_bindir}/phpunit --include-path=%{buildroot}%{php_home} --verbose || ret=1 + $cmd %{_bindir}/phpunit --verbose || ret=1 fi done exit $ret @@ -138,6 +129,9 @@ exit $ret %changelog +* Thu Nov 23 2017 Remi Collet - 3.1.0-5 +- switch from zend-loader to fedora/autoloader + * Tue Oct 24 2017 Remi Collet - 3.1.0-4 - fix FTBFS from Koschei, add patch for PHP 7.2 from https://github.com/zendframework/zend-stdlib/pull/81 -- cgit