summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-01-26 06:45:57 +0100
committerRemi Collet <remi@remirepo.net>2018-01-26 06:45:57 +0100
commitcecbe2ea6e939ae17c8a0273dbce6715ecb8632d (patch)
tree20cddc3dac59449bc3dd367cccde16c9c6668d88
parent36ecb2f6826c3a74d4f21806710ec5247838d8b2 (diff)
Revert "switch from zend-loader to fedora/autoloader"
This reverts commit 36ecb2f6826c3a74d4f21806710ec5247838d8b2.
-rw-r--r--php-zendframework-zend-xmlrpc.spec69
1 files changed, 28 insertions, 41 deletions
diff --git a/php-zendframework-zend-xmlrpc.spec b/php-zendframework-zend-xmlrpc.spec
index bbd291d..e6974c2 100644
--- a/php-zendframework-zend-xmlrpc.spec
+++ b/php-zendframework-zend-xmlrpc.spec
@@ -21,7 +21,7 @@
Name: php-%{gh_owner}-%{gh_project}
Version: 2.6.1
-Release: 2%{?dist}
+Release: 1%{?dist}
Summary: Zend Framework %{library} component
Group: Development/Libraries
@@ -42,18 +42,18 @@ BuildRequires: php-libxml
BuildRequires: php-pcre
BuildRequires: php-spl
BuildRequires: php-xmlwriter
-BuildRequires: php-autoloader(%{gh_owner}/zend-http) >= 2.5.4
-BuildRequires: php-autoloader(%{gh_owner}/zend-math) >= 2.7
-BuildRequires: php-autoloader(%{gh_owner}/zend-server) >= 2.7
-BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7
-BuildRequires: php-autoloader(%{gh_owner}/zendxml) >= 1.0.2
+BuildRequires: php-composer(%{gh_owner}/zend-http) >= 2.5.4
+BuildRequires: php-composer(%{gh_owner}/zend-math) >= 2.7
+BuildRequires: php-composer(%{gh_owner}/zend-server) >= 2.7
+BuildRequires: php-composer(%{gh_owner}/zend-stdlib) >= 2.7
+BuildRequires: php-composer(%{gh_owner}/zendxml) >= 1.0.2
# From composer, "require-dev": {
# "phpunit/PHPUnit": "^4.8",
# "squizlabs/php_codesniffer": "^2.3.1"
BuildRequires: php-composer(phpunit/phpunit) >= 4.8
-%endif
# Autoloader
-BuildRequires: php-fedora-autoloader-devel
+BuildRequires: php-composer(%{gh_owner}/zend-loader) >= 2.5
+%endif
# From composer, "require": {
# "php": "^5.6 || ^7.0",
@@ -64,24 +64,22 @@ BuildRequires: php-fedora-autoloader-devel
# "zendframework/zendxml": "^1.0.2"
Requires: php(language) >= 5.6
%if ! %{bootstrap}
-Requires: php-autoloader(%{gh_owner}/zend-http) >= 2.5.4
-Requires: php-autoloader(%{gh_owner}/zend-http) < 3
-Requires: php-autoloader(%{gh_owner}/zend-math) >= 2.7
-Requires: php-autoloader(%{gh_owner}/zend-math) < 4
-Requires: php-autoloader(%{gh_owner}/zend-server) >= 2.7
-Requires: php-autoloader(%{gh_owner}/zend-server) < 3
-Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7
-Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4
-Requires: php-autoloader(%{gh_owner}/zendxml) >= 1.0.2
-Requires: php-autoloader(%{gh_owner}/zendxml) < 2
+Requires: php-composer(%{gh_owner}/zend-http) >= 2.5.4
+Requires: php-composer(%{gh_owner}/zend-http) < 3
+Requires: php-composer(%{gh_owner}/zend-math) >= 2.7
+Requires: php-composer(%{gh_owner}/zend-math) < 4
+Requires: php-composer(%{gh_owner}/zend-server) >= 2.7
+Requires: php-composer(%{gh_owner}/zend-server) < 3
+Requires: php-composer(%{gh_owner}/zend-stdlib) >= 2.7
+Requires: php-composer(%{gh_owner}/zend-stdlib) < 4
+Requires: php-composer(%{gh_owner}/zendxml) >= 1.0.2
+Requires: php-composer(%{gh_owner}/zendxml) < 2
# From composer, "suggest": {
# "zendframework/zend-cache": "To support Zend\\XmlRpc\\Server\\Cache usage"
%if 0%{?fedora} >= 21
-Suggests: php-autoloader(%{gh_owner}/zend-cache)
+Suggests: php-composer(%{gh_owner}/zend-cache)
%endif
%endif
-# Autoloader
-Requires: php-composer(fedora/autoloader)
# From phpcompatinfo report for version 2.5.2
Requires: php-simplexml
Requires: php-date
@@ -95,7 +93,6 @@ Requires: php-xmlwriter
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
@@ -117,20 +114,7 @@ mv LICENSE.md LICENSE
%build
-: Generate autoloader
-phpab --template fedora --output src/autoload.php src
-cat << 'EOF' | tee -a src/autoload.php
-\Fedora\Autoloader\Dependencies::required([
- '%{php_home}/Zend/Http/autoload.php',
- '%{php_home}/Zend/Math/autoload.php',
- '%{php_home}/Zend/Server/autoload.php',
- '%{php_home}/Zend/Stdlib/autoload.php',
- '%{php_home}/ZendXml/autoload.php',
-]);
-\Fedora\Autoloader\Dependencies::optional([
- '%{php_home}/Zend/Cache/autoload.php',
-]);
-EOF
+# Empty build section, nothing required
%install
@@ -143,8 +127,14 @@ cp -pr src %{buildroot}%{php_home}/Zend/%{library}
mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
<?php
-require_once '%{buildroot}%{php_home}/Zend/%{library}/autoload.php';
-\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\%{library}\\', dirname(__DIR__) . '/test');
+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 'test/TestAsset/functions.php';
EOF
@@ -169,9 +159,6 @@ exit $ret
%changelog
-* Mon Dec 11 2017 Remi Collet <remi@remirepo.net> - 2.6.1-2
-- switch from zend-loader to fedora/autoloader
-
* Fri Aug 11 2017 Remi Collet <remi@remirepo.net> - 2.6.1-1
- Update to 2.6.1