diff options
-rw-r--r-- | php-zendframework-zend-memory.spec | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/php-zendframework-zend-memory.spec b/php-zendframework-zend-memory.spec index ad4b737..78bd76d 100644 --- a/php-zendframework-zend-memory.spec +++ b/php-zendframework-zend-memory.spec @@ -21,7 +21,7 @@ Name: php-%{gh_owner}-%{gh_project} Version: 2.5.2 -Release: 1%{?dist} +Release: 4%{?dist} Summary: Zend Framework %{library} component Group: Development/Libraries @@ -39,11 +39,11 @@ BuildRequires: php-spl # "zendframework/zend-cache": "^2.7", # "squizlabs/php_codesniffer": "^2.3.1", # "phpunit/PHPUnit": "^4.8" -BuildRequires: php-composer(%{gh_owner}/zend-cache) >= 2.7 +BuildRequires: php-autoloader(%{gh_owner}/zend-cache) >= 2.7 BuildRequires: php-composer(phpunit/phpunit) >= 4.8 -# Autoloader -BuildRequires: php-composer(%{gh_owner}/zend-loader) >= 2.5 %endif +# Autoloader +BuildRequires: php-fedora-autoloader-devel # From composer, "require": { # "php": "^5.5 || ^7.0" @@ -52,17 +52,18 @@ Requires: php(language) >= 5.5 # From composer, "suggest": { # "zendframework/zend-cache": "To support swapping memory objects into and out of non-memory cache storage" %if 0%{?fedora} >= 21 -Suggests: php-composer(%{gh_owner}/zend-cache) +Suggests: php-autoloader(%{gh_owner}/zend-cache) %endif -# Autoloader -Requires: php-composer(%{gh_owner}/zend-loader) >= 2.5 %endif +# Autoloader +Requires: php-composer(fedora/autoloader) # From phpcompatinfo report for version 2.5.1 Requires: php-spl 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} %description @@ -87,7 +88,13 @@ mv LICENSE.md LICENSE %build -# Empty build section, nothing required +: Create autoloader +phpab --template fedora --output src/autoload.php src +cat << 'EOF' | tee -a src/autoload.php +\Fedora\Autoloader\Dependencies::optional([ + '%{php_home}/Zend/Cache/autoload.php', +]); +EOF %install @@ -100,18 +107,12 @@ cp -pr src %{buildroot}%{php_home}/Zend/%{library} mkdir vendor cat << 'EOF' | tee vendor/autoload.php <?php -require_once '%{php_home}/Zend/Loader/AutoloaderFactory.php'; -Zend\Loader\AutoloaderFactory::factory(array( - 'Zend\Loader\StandardAutoloader' => 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\\%{library}\\', dirname(__DIR__) . '/test'); EOF ret=0 -for cmd in php php70 php71 php72; do +for cmd in php php56 php70 php71 php72; do if which $cmd; then $cmd %{_bindir}/phpunit --verbose || ret=1 fi @@ -131,6 +132,9 @@ exit $ret %changelog +* Thu Nov 23 2017 Remi Collet <remi@remirepo.net> - 2.5.2-4 +- switch from zend-loader to fedora/autoloader + * Wed May 11 2016 Remi Collet <remi@fedoraproject.org> - 2.5.2-1 - update to 2.5.2 - raise dependency on PHP >= 5.5 |