summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-12-06 11:43:41 +0100
committerRemi Collet <remi@remirepo.net>2017-12-06 11:43:41 +0100
commitd96a296a6fae3966f1a58fafaddad3e84e1f5f77 (patch)
tree8756545b833e884f2dd7d98d98d661b3ee2ccd9d
parent7afd8bd2f9d29d75236d7814bb71da0b84cb34a8 (diff)
switch from zend-loader to fedora/autoloader
-rw-r--r--php-zendframework-zendxml.spec28
1 files changed, 13 insertions, 15 deletions
diff --git a/php-zendframework-zendxml.spec b/php-zendframework-zendxml.spec
index f5ea414..dbaf9ef 100644
--- a/php-zendframework-zendxml.spec
+++ b/php-zendframework-zendxml.spec
@@ -21,7 +21,7 @@
Name: php-%{gh_owner}-%{gh_project}
Version: 1.0.2
-Release: 2%{?dist}
+Release: 5%{?dist}
Summary: Zend Framework %{library} component
Group: Development/Libraries
@@ -43,9 +43,9 @@ BuildRequires: php-spl
# "phpunit/phpunit": "^3.7 || ^4.0",
# "squizlabs/php_codesniffer": "~1.5"
BuildRequires: php-composer(phpunit/phpunit) >= 3.7
-# Autoloader
-BuildRequires: php-composer(%{gh_owner}/zend-loader)
%endif
+# Autoloader
+BuildRequires: php-fedora-autoloader-devel
# From composer, "require": {
# "php": "^5.3.3 || ^7.0"
@@ -56,10 +56,13 @@ Requires: php-dom
Requires: php-libxml
Requires: php-pcre
Requires: php-spl
+# Autoloader
+Requires: php-composer(fedora/autoloader)
Obsoletes: php-ZendFramework2-%{library} < 2.5
Provides: php-ZendFramework2-%{library} = 1:%{version}
Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version}
+Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version}
%description
@@ -73,7 +76,8 @@ mv LICENSE.md LICENSE
%build
-# Empty build section, nothing required
+: Create autoloader
+phpab --template fedora --output library/%{library}/autoload.php library/%{library}
%install
@@ -86,17 +90,8 @@ cp -pr library/%{library} %{buildroot}%{php_home}/%{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(
- 'fallback_autoloader' => true,
- 'autoregister_zf' => true,
- 'namespaces' => array(
- 'ZendTest\\Xml' => dirname(__DIR__).'/tests/ZendXmlTest',
- '%{library}' => '%{buildroot}%{php_home}/%{library}'
- )
- )
-));
+require_once '%{buildroot}%{php_home}/%{library}/autoload.php';
+\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\Xml\\', dirname(__DIR__) . '/test');
EOF
cd tests
@@ -121,6 +116,9 @@ exit $ret
%changelog
+* Wed Dec 6 2017 Remi Collet <remi@remirepo.net> - 1.0.2-5
+- switch from zend-loader to fedora/autoloader
+
* Sat Jun 11 2016 Shawn Iwinski <shawn@iwin.ski> - 1.0.2-2
- Allow F22 / EPEL7 / EPEL6 (ZF 2.4)