summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-zendframework-zend-expressive-zendviewrenderer.spec94
1 files changed, 51 insertions, 43 deletions
diff --git a/php-zendframework-zend-expressive-zendviewrenderer.spec b/php-zendframework-zend-expressive-zendviewrenderer.spec
index 6954f4a..5526b3c 100644
--- a/php-zendframework-zend-expressive-zendviewrenderer.spec
+++ b/php-zendframework-zend-expressive-zendviewrenderer.spec
@@ -22,7 +22,7 @@
Name: php-%{gh_owner}-%{gh_project}
Version: 1.4.0
-Release: 1%{?dist}
+Release: 3%{?dist}
Summary: zend-view PhpRenderer integration for Expressive
Group: Development/Libraries
@@ -40,15 +40,15 @@ BuildRequires: php-pcre
BuildRequires: php-spl
BuildRequires: php-composer(container-interop/container-interop) >= 1.2
BuildRequires: php-composer(psr/http-message) >= 1.0.1
-BuildRequires: php-composer(%{gh_owner}/zend-expressive-helpers) >= 1.4
-BuildRequires: php-composer(%{gh_owner}/zend-expressive-router) >= 1.3.2
-BuildRequires: php-composer(%{gh_owner}/zend-expressive-template) >= 1.0.1
-BuildRequires: php-composer(%{gh_owner}/zend-filter) >= 2.6.1
-BuildRequires: php-composer(%{gh_owner}/zend-i18n) >= 2.6
-BuildRequires: php-composer(%{gh_owner}/zend-servicemanager) >= 2.7.8
-BuildRequires: php-composer(%{gh_owner}/zend-view) >= 2.8.1
+BuildRequires: php-autoloader(%{gh_owner}/zend-expressive-helpers) >= 1.4
+BuildRequires: php-autoloader(%{gh_owner}/zend-expressive-router) >= 1.3.2
+BuildRequires: php-autoloader(%{gh_owner}/zend-expressive-template) >= 1.0.1
+BuildRequires: php-autoloader(%{gh_owner}/zend-filter) >= 2.6.1
+BuildRequires: php-autoloader(%{gh_owner}/zend-i18n) >= 2.6
+BuildRequires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.8
+BuildRequires: php-autoloader(%{gh_owner}/zend-view) >= 2.8.1
# not in composer.json (dev dep of zend-expressive-helpers)
-BuildRequires: php-composer(%{gh_owner}/zend-diactoros)
+BuildRequires: php-autoloader(%{gh_owner}/zend-diactoros)
# From composer, "require-dev": {
# "malukenho/docheader": "^0.1.5",
# "phpunit/phpunit": "^6.0.8 || ^5.7.15",
@@ -59,11 +59,9 @@ BuildRequires: php-composer(%{gh_owner}/zend-diactoros)
%global phpunit %{_bindir}/phpunit
%endif
BuildRequires: %{phpunit}
-# Autoloader
-BuildRequires: php-composer(%{gh_owner}/zend-loader) >= 2.5
-# For dependencies autoloader
-BuildRequires: php-zendframework-zend-loader >= 2.5.1-4
%endif
+# Autoloader
+BuildRequires: php-fedora-autoloader-devel
# From composer, "require": {
# "php": "^5.6 || ^7.0",
@@ -79,30 +77,28 @@ Requires: php-composer(container-interop/container-interop) >= 1.2
Requires: php-composer(container-interop/container-interop) < 2
Requires: php-composer(psr/http-message) >= 1.0.1
Requires: php-composer(psr/http-message) < 2
-Requires: php-composer(%{gh_owner}/zend-expressive-helpers) >= 1.4
-Requires: php-composer(%{gh_owner}/zend-expressive-helpers) < 5
-Requires: php-composer(%{gh_owner}/zend-expressive-router) >= 1.3.2
-Requires: php-composer(%{gh_owner}/zend-expressive-router) < 3
-Requires: php-composer(%{gh_owner}/zend-expressive-template) >= 1.0.4
-Requires: php-composer(%{gh_owner}/zend-expressive-template) < 2
-Requires: php-composer(%{gh_owner}/zend-filter) >= 2.6.1
-Requires: php-composer(%{gh_owner}/zend-filter) < 3
-Requires: php-composer(%{gh_owner}/zend-i18n) >= 2.6
-Requires: php-composer(%{gh_owner}/zend-i18n) < 3
-Requires: php-composer(%{gh_owner}/zend-servicemanager) >= 2.7.8
-Requires: php-composer(%{gh_owner}/zend-servicemanager) < 4
-Requires: php-composer(%{gh_owner}/zend-view) >= 2.8.1
-Requires: php-composer(%{gh_owner}/zend-view) < 3
+Requires: php-autoloader(%{gh_owner}/zend-expressive-helpers) >= 1.4
+Requires: php-autoloader(%{gh_owner}/zend-expressive-helpers) < 5
+Requires: php-autoloader(%{gh_owner}/zend-expressive-router) >= 1.3.2
+Requires: php-autoloader(%{gh_owner}/zend-expressive-router) < 3
+Requires: php-autoloader(%{gh_owner}/zend-expressive-template) >= 1.0.4
+Requires: php-autoloader(%{gh_owner}/zend-expressive-template) < 2
+Requires: php-autoloader(%{gh_owner}/zend-filter) >= 2.6.1
+Requires: php-autoloader(%{gh_owner}/zend-filter) < 3
+Requires: php-autoloader(%{gh_owner}/zend-i18n) >= 2.6
+Requires: php-autoloader(%{gh_owner}/zend-i18n) < 3
+Requires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.8
+Requires: php-autoloader(%{gh_owner}/zend-servicemanager) < 4
+Requires: php-autoloader(%{gh_owner}/zend-view) >= 2.8.1
+Requires: php-autoloader(%{gh_owner}/zend-view) < 3
+# Autoloader
+Requires: php-composer(fedora/autoloader)
# From phpcompatinfo report for version 1.1.0
Requires: php-pcre
Requires: php-spl
-%if ! %{bootstrap}
-# Autoloader
-Requires: php-composer(%{gh_owner}/zend-loader) >= 2.5
-Requires: php-zendframework-zend-loader >= 2.5.1-4
-%endif
Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version}
+Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version}
%description
@@ -116,7 +112,21 @@ mv LICENSE.md LICENSE
%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}/Psr/Http/Message/autoload.php',
+ '%{php_home}/Zend/Expressive/Helper/autoload.php',
+ '%{php_home}/Zend/Expressive/Router/autoload.php',
+ '%{php_home}/Zend/Expressive/Template/autoload.php',
+ '%{php_home}/Zend/Filter/autoload.php',
+ '%{php_home}/Zend/I18n/autoload.php',
+ '%{php_home}/Zend/ServiceManager/autoload.php',
+ '%{php_home}/Zend/View/autoload.php',
+]);
+EOF
%install
@@ -129,16 +139,11 @@ cp -pr src %{buildroot}%{php_home}/Zend/%{library}/%{sublib}
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\\%{library}\\%{sublib}' => dirname(__DIR__).'/test/',
- 'Zend\\%{library}\\%{sublib}' => '%{buildroot}%{php_home}/Zend/%{library}/%{sublib}'
-))));
-require_once '%{php_home}/Zend/autoload.php';
+require_once '%{buildroot}%{php_home}/Zend/%{library}/%{sublib}/autoload.php';
+\Fedora\Autoloader\Dependencies::required([
+ '%{php_home}/Zend/Diactoros/autoload.php',
+]);
+\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\%{library}\\%{sublib}', dirname(__DIR__) . '/test');
EOF
ret=0
@@ -163,6 +168,9 @@ exit $ret
%changelog
+* Tue Dec 12 2017 Remi Collet <remi@remirepo.net> - 1.4.0-3
+- switch from zend-loader to fedora/autoloader
+
* Wed Mar 15 2017 Remi Collet <remi@remirepo.net> - 1.4.0-1
- Update to 1.4.0
- use phpunit6 on F26+