summaryrefslogtreecommitdiffstats
path: root/php-zendframework-zend-stdlib.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-11-23 15:36:17 +0100
committerRemi Collet <remi@remirepo.net>2017-11-23 15:36:17 +0100
commitcb3beae52639a7b293523e617246ad203b37849b (patch)
treec80e10cd48146b58f74a62d2dd90c55e32262691 /php-zendframework-zend-stdlib.spec
parentac4c0cc2049225302dba0e37cce9e3c7f3ae4c94 (diff)
switch from zend-loader to fedora/autoloader
Diffstat (limited to 'php-zendframework-zend-stdlib.spec')
-rw-r--r--php-zendframework-zend-stdlib.spec32
1 files 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
<?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\\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 <remi@fedoraproject.org> - 3.1.0-5
+- switch from zend-loader to fedora/autoloader
+
* Tue Oct 24 2017 Remi Collet <remi@fedoraproject.org> - 3.1.0-4
- fix FTBFS from Koschei, add patch for PHP 7.2 from
https://github.com/zendframework/zend-stdlib/pull/81