summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-zendframework-zend-mvc-plugin-identity.spec66
1 files changed, 33 insertions, 33 deletions
diff --git a/php-zendframework-zend-mvc-plugin-identity.spec b/php-zendframework-zend-mvc-plugin-identity.spec
index 4f2020a..2f87a38 100644
--- a/php-zendframework-zend-mvc-plugin-identity.spec
+++ b/php-zendframework-zend-mvc-plugin-identity.spec
@@ -21,7 +21,7 @@
Name: php-%{gh_owner}-%{gh_project}
Version: 1.0.0
-Release: 1%{?dist}
+Release: 4%{?dist}
Summary: Zend Framework Mvc-Plugin-%{library} component
Group: Development/Libraries
@@ -35,21 +35,17 @@ BuildArch: noarch
%if %{with_tests}
BuildRequires: php(language) >= 5.6
BuildRequires: php-composer(container-interop/container-interop) >= 1.1
-BuildRequires: php-composer(%{gh_owner}/zend-mvc) >= 3.0
-BuildRequires: php-composer(%{gh_owner}/zend-authentication) >= 2.5.3
-BuildRequires: php-composer(%{gh_owner}/zend-servicemanager) >= 2.7.5
+BuildRequires: php-autoloader(%{gh_owner}/zend-mvc) >= 3.0
+BuildRequires: php-autoloader(%{gh_owner}/zend-authentication) >= 2.5.3
+BuildRequires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.5
BuildRequires: php-spl
# From composer, "require-dev": {
# "phpunit/PHPUnit": "^4.5",
# "squizlabs/php_codesniffer": "^2.3.1"
BuildRequires: php-composer(phpunit/phpunit) >= 4.5
-BuildRequires: php-composer(%{gh_owner}/zend-filter) >= 2.6.1
-BuildRequires: php-composer(%{gh_owner}/zend-form) >= 2.7
-# Autoloader
-BuildRequires: php-composer(%{gh_owner}/zend-loader) >= 2.5
-# For dependencies autoloader
-BuildRequires: php-zendframework-zend-loader >= 2.5.1-3
%endif
+# Autoloader
+BuildRequires: php-fedora-autoloader-devel
# From composer, "require": {
# "php": "^5.6 || ^7.0",
@@ -60,21 +56,19 @@ BuildRequires: php-zendframework-zend-loader >= 2.5.1-3
Requires: php(language) >= 5.6
Requires: php-composer(container-interop/container-interop) >= 1.1
Requires: php-composer(container-interop/container-interop) < 2
-Requires: php-composer(%{gh_owner}/zend-mvc) >= 3.0
-Requires: php-composer(%{gh_owner}/zend-mvc) < 4
-Requires: php-composer(%{gh_owner}/zend-authentication) >= 2.5.3
-Requires: php-composer(%{gh_owner}/zend-authentication) < 3
-Requires: php-composer(%{gh_owner}/zend-servicemanager) >= 2.7.5
-Requires: php-composer(%{gh_owner}/zend-servicemanager) < 4
+Requires: php-autoloader(%{gh_owner}/zend-mvc) >= 3.0
+Requires: php-autoloader(%{gh_owner}/zend-mvc) < 4
+Requires: php-autoloader(%{gh_owner}/zend-authentication) >= 2.5.3
+Requires: php-autoloader(%{gh_owner}/zend-authentication) < 3
+Requires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.5
+Requires: php-autoloader(%{gh_owner}/zend-servicemanager) < 4
+# Autoloader
+Requires: php-composer(fedora/autoloader)
# From phpcompatinfo report for version 1.0.0
Requires: php-spl
-%if ! %{bootstrap}
-# Autoloader
-Requires: php-composer(%{gh_owner}/zend-loader) >= 2.5
-Requires: php-zendframework-zend-loader >= 2.5.1-3
-%endif
Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version}
+Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version}
%description
@@ -90,15 +84,24 @@ the current identity as provided by zend-authentication.
mv LICENSE.md LICENSE
-: Create dependency autoloader
+
+%build
+: Create dependency autoloader - deprecated
cat << 'EOF' | tee autoload.php
<?php
require_once '%{php_home}/Interop/Container/autoload.php';
EOF
-
-%build
-# Empty build section, nothing required
+: Generate autoloader
+phpab --template fedora --output src/autoload.php src
+cat << 'EOF' | tee -a src/autoload.php
+\Fedora\Autoloader\Dependencies::required([
+ '%{php_home}/Interop/Container/autoload.php',
+ '%{php_home}/Zend/Mvc/autoload.php',
+ '%{php_home}/Zend/Authentication/autoload.php',
+ '%{php_home}/Zend/ServiceManager/autoload.php',
+]);
+EOF
%install
@@ -113,14 +116,8 @@ install -m644 autoload.php %{buildroot}%{php_home}/Zend/Mvc-Plugin-%{library}-au
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\\Mvc\\Plugin\\%{library}' => dirname(__DIR__).'/test/',
- 'Zend\\Mvc\\Plugin\\%{library}' => '%{buildroot}%{php_home}/Zend/Mvc/Plugin/%{library}'
-))));
-require_once '%{php_home}/Zend/autoload.php';
+require_once '%{buildroot}%{php_home}/Zend/Mvc/Plugin/%{library}/autoload.php';
+\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\Mvc\\Plugin\\%{library}\\', dirname(__DIR__) . '/test');
EOF
ret=0
@@ -145,6 +142,9 @@ exit $ret
%changelog
+* Wed Dec 13 2017 Remi Collet <remi@remirepo.net> - 1.0.0-4
+- switch from zend-loader to fedora/autoloader
+
* Wed Jun 29 2016 Remi Collet <remi@fedoraproject.org> - 1.0.0-1
- initial package