summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-zendframework-zend-mvc-console.spec118
1 files changed, 66 insertions, 52 deletions
diff --git a/php-zendframework-zend-mvc-console.spec b/php-zendframework-zend-mvc-console.spec
index 7c513da..48bc81f 100644
--- a/php-zendframework-zend-mvc-console.spec
+++ b/php-zendframework-zend-mvc-console.spec
@@ -21,7 +21,7 @@
Name: php-%{gh_owner}-%{gh_project}
Version: 1.1.11
-Release: 1%{?dist}
+Release: 4%{?dist}
Summary: Zend Framework Mvc-%{library} component
Group: Development/Libraries
@@ -35,15 +35,15 @@ 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-console) >= 2.6
-BuildRequires: php-composer(%{gh_owner}/zend-eventmanager) >= 2.6.2
-BuildRequires: php-composer(%{gh_owner}/zend-modulemanager) >= 2.7.1
-BuildRequires: php-composer(%{gh_owner}/zend-mvc) >= 3.0.3
-BuildRequires: php-composer(%{gh_owner}/zend-router) >= 3.0
-BuildRequires: php-composer(%{gh_owner}/zend-servicemanager) >= 2.7.5
-BuildRequires: php-composer(%{gh_owner}/zend-stdlib) >= 2.7.5
-BuildRequires: php-composer(%{gh_owner}/zend-text) >= 2.6
-BuildRequires: php-composer(%{gh_owner}/zend-view) >= 2.6.3
+BuildRequires: php-autoloader(%{gh_owner}/zend-console) >= 2.6
+BuildRequires: php-autoloader(%{gh_owner}/zend-eventmanager) >= 2.6.2
+BuildRequires: php-autoloader(%{gh_owner}/zend-modulemanager) >= 2.7.1
+BuildRequires: php-autoloader(%{gh_owner}/zend-mvc) >= 3.0.3
+BuildRequires: php-autoloader(%{gh_owner}/zend-router) >= 3.0
+BuildRequires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.5
+BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7.5
+BuildRequires: php-autoloader(%{gh_owner}/zend-text) >= 2.6
+BuildRequires: php-autoloader(%{gh_owner}/zend-view) >= 2.6.3
BuildRequires: php-spl
# From composer, "require-dev": {
# "squizlabs/php_codesniffer": "^2.3.1",
@@ -51,13 +51,11 @@ BuildRequires: php-spl
# "zendframework/zend-filter": "^2.6.1",
# "zendframework/zend-form": "^2.7"
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
+BuildRequires: php-autoloader(%{gh_owner}/zend-filter) >= 2.6.1
+BuildRequires: php-autoloader(%{gh_owner}/zend-form) >= 2.7
%endif
+# Autoloader
+BuildRequires: php-fedora-autoloader-devel
# From composer, "require": {
# "php": "^5.6 || ^7.0",
@@ -74,38 +72,38 @@ 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-console) >= 2.6
-Requires: php-composer(%{gh_owner}/zend-console) < 3
-Requires: php-composer(%{gh_owner}/zend-eventmanager) >= 2.6.2
-Requires: php-composer(%{gh_owner}/zend-eventmanager) < 4
-Requires: php-composer(%{gh_owner}/zend-modulemanager) >= 2.7.1
-Requires: php-composer(%{gh_owner}/zend-modulemanager) < 3
-Requires: php-composer(%{gh_owner}/zend-mvc) >= 3.0.3
-Requires: php-composer(%{gh_owner}/zend-mvc) < 4
-Requires: php-composer(%{gh_owner}/zend-router) >= 3.0
-Requires: php-composer(%{gh_owner}/zend-router) < 4
-Requires: php-composer(%{gh_owner}/zend-servicemanager) >= 2.7.5
-Requires: php-composer(%{gh_owner}/zend-servicemanager) < 4
-Requires: php-composer(%{gh_owner}/zend-stdlib) >= 2.7.5
-Requires: php-composer(%{gh_owner}/zend-stdlib) < 4
-Requires: php-composer(%{gh_owner}/zend-text) >= 2.6
-Requires: php-composer(%{gh_owner}/zend-text) < 3
-Requires: php-composer(%{gh_owner}/zend-view) >= 2.6.3
-Requires: php-composer(%{gh_owner}/zend-view) < 3
+Requires: php-autoloader(%{gh_owner}/zend-console) >= 2.6
+Requires: php-autoloader(%{gh_owner}/zend-console) < 3
+Requires: php-autoloader(%{gh_owner}/zend-eventmanager) >= 2.6.2
+Requires: php-autoloader(%{gh_owner}/zend-eventmanager) < 4
+Requires: php-autoloader(%{gh_owner}/zend-modulemanager) >= 2.7.1
+Requires: php-autoloader(%{gh_owner}/zend-modulemanager) < 3
+Requires: php-autoloader(%{gh_owner}/zend-mvc) >= 3.0.3
+Requires: php-autoloader(%{gh_owner}/zend-mvc) < 4
+Requires: php-autoloader(%{gh_owner}/zend-router) >= 3.0
+Requires: php-autoloader(%{gh_owner}/zend-router) < 4
+Requires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.5
+Requires: php-autoloader(%{gh_owner}/zend-servicemanager) < 4
+Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7.5
+Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4
+Requires: php-autoloader(%{gh_owner}/zend-text) >= 2.6
+Requires: php-autoloader(%{gh_owner}/zend-text) < 3
+Requires: php-autoloader(%{gh_owner}/zend-view) >= 2.6.3
+Requires: php-autoloader(%{gh_owner}/zend-view) < 3
+# Autoloader
+Requires: php-composer(fedora/autoloader)
# From phpcompatinfo report for version 1.1.10
Requires: php-spl
%if ! %{bootstrap}
# From composer, "suggest": {
# "zendframework/zend-filter": "^2.6.1, to filter rendered results"
%if 0%{?fedora} >= 21
-Suggests: php-composer(%{gh_owner}/zend-json-filter)
+Suggests: php-composer(%{gh_owner}/zend-filter)
%endif
-# 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
@@ -128,15 +126,33 @@ three components.
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
+: Create 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/Console/autoload.php',
+ '%{php_home}/Zend/EventManager/autoload.php',
+ '%{php_home}/Zend/ModuleManager/autoload.php',
+ '%{php_home}/Zend/Mvc/autoload.php',
+ '%{php_home}/Zend/Router/autoload.php',
+ '%{php_home}/Zend/ServiceManager/autoload.php',
+ '%{php_home}/Zend/Stdlib/autoload.php',
+ '%{php_home}/Zend/Text/autoload.php',
+ '%{php_home}/Zend/View/autoload.php',
+]);
+\Fedora\Autoloader\Dependencies::optional([
+ '%{php_home}/Zend/Filter/autoload.php',
+]);
+EOF
%install
@@ -151,16 +167,11 @@ install -m644 autoload.php %{buildroot}%{php_home}/Zend/Mvc-%{library}-autoload.
mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
<?php
-define('RPM_BUILDROOT', '%{buildroot}%{php_home}/Zend');
-
-require_once '%{php_home}/Zend/Loader/AutoloaderFactory.php';
-Zend\Loader\AutoloaderFactory::factory(array(
- 'Zend\Loader\StandardAutoloader' => array(
- 'namespaces' => array(
- 'ZendTest\\Mvc\\%{library}' => dirname(__DIR__).'/test/',
- 'Zend\\Mvc\\%{library}' => '%{buildroot}%{php_home}/Zend/Mvc/%{library}'
-))));
-require_once '%{php_home}/Zend/autoload.php';
+require_once '%{buildroot}%{php_home}/Zend/Mvc/%{library}/autoload.php';
+\Fedora\Autoloader\Dependencies::required([
+ '%{php_home}/Zend/Form/autoload.php',
+]);
+\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\Mvc\\%{library}\\', dirname(__DIR__) . '/test');
EOF
ret=0
@@ -185,6 +196,9 @@ exit $ret
%changelog
+* Tue Dec 12 2017 Remi Collet <remi@remirepo.net> - 1.1.11-4
+- switch from zend-loader to fedora/autoloader
+
* Thu Dec 15 2016 Remi Collet <remi@fedoraproject.org> - 1.1.11-1
- update to 1.1.11
- raise dependency on zendframework/zend-mvc 3.0.3