From 1299c439141331897ca37250df235976a45f3113 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 11 Dec 2017 15:08:19 +0100 Subject: switch from zend-loader to fedora/autoloader --- .gitignore | 8 +++ ...ndframework-zend-expressive-platesrenderer.spec | 73 ++++++++++++---------- 2 files changed, 48 insertions(+), 33 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fc9aa8c --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +clog +package-*.xml +*.tgz +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/php-zendframework-zend-expressive-platesrenderer.spec b/php-zendframework-zend-expressive-platesrenderer.spec index 4e7a5e5..d75152a 100644 --- a/php-zendframework-zend-expressive-platesrenderer.spec +++ b/php-zendframework-zend-expressive-platesrenderer.spec @@ -22,7 +22,7 @@ Name: php-%{gh_owner}-%{gh_project} Version: 1.3.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Plates integration for %{library} Group: Development/Libraries @@ -37,9 +37,9 @@ BuildArch: noarch BuildRequires: php(language) >= 5.6 BuildRequires: php-composer(container-interop/container-interop) >= 1.2 BuildRequires: php-composer(league/plates) >= 3.3 -BuildRequires: php-composer(%{gh_owner}/zend-expressive-helpers) >= 2.2 -BuildRequires: php-composer(%{gh_owner}/zend-expressive-router) >= 1.3.2 -BuildRequires: php-composer(%{gh_owner}/zend-expressive-template) >= 1.0.4 +BuildRequires: php-autoloader(%{gh_owner}/zend-expressive-helpers) >= 2.2 +BuildRequires: php-autoloader(%{gh_owner}/zend-expressive-router) >= 1.3.2 +BuildRequires: php-autoloader(%{gh_owner}/zend-expressive-template) >= 1.0.4 BuildRequires: php-reflection BuildRequires: php-spl # From composer, "require-dev": { @@ -52,11 +52,9 @@ BuildRequires: php-spl %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", @@ -70,12 +68,14 @@ Requires: php-composer(container-interop/container-interop) >= 1.2 Requires: php-composer(container-interop/container-interop) < 2 Requires: php-composer(league/plates) >= 3.3 Requires: php-composer(league/plates) < 4 -Requires: php-composer(%{gh_owner}/zend-expressive-helpers) >= 2.2 -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-autoloader(%{gh_owner}/zend-expressive-helpers) >= 2.2 +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 +# Autoloader +Requires: php-composer(fedora/autoloader) # From phpcompatinfo report for version 1.2.0 Requires: php-reflection Requires: php-spl @@ -85,15 +85,13 @@ Requires: php-spl # "aura/di": "^3.2 to make use of Aura.Di dependency injection container", # "zendframework/zend-servicemanager": "^3.2 to use zend-servicemanager for dependency injection" %if 0%{?fedora} >= 21 -Suggests: php-composer(%{gh_owner}/aura/di) -Suggests: php-composer(%{gh_owner}/zend-servicemanager) +Suggests: php-autoloader(aura/di) +Suggests: php-autoloader(%{gh_owner}/zend-servicemanager) %endif -# 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 @@ -107,7 +105,9 @@ Documentation: http://zend-expressive.readthedocs.io/ mv LICENSE.md LICENSE -: Create dependency autoloader + +%build +: Create dependency autoloader - deprecated cat << 'EOF' | tee autoload.php 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\Autoload::addPsr4('ZendTest\\%{library}\\%{sublib}', dirname(__DIR__) . '/test'); EOF ret=0 @@ -168,6 +172,9 @@ exit $ret %changelog +* Mon Dec 11 2017 Remi Collet - 1.3.2-2 +- switch from zend-loader to fedora/autoloader + * Thu Nov 2 2017 Remi Collet - 1.3.2-1 - Update to 1.3.2 -- cgit