summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-01-09 15:17:41 +0100
committerRemi Collet <remi@remirepo.net>2020-01-09 15:17:41 +0100
commit392d4b2b3a4ac75e50856821b2445d6d75fc3148 (patch)
tree4f19be4c91e12b8ae64d98eb82a02959c95c20ec
parentf702f83cd6db75203fe645669cf4b953a6668bf9 (diff)
switch to Laminas
-rw-r--r--composer.json59
-rw-r--r--php-laminas-config.spec155
2 files changed, 124 insertions, 90 deletions
diff --git a/composer.json b/composer.json
index 57a0238..63987bc 100644
--- a/composer.json
+++ b/composer.json
@@ -1,46 +1,59 @@
{
- "name": "zendframework/zend-config",
+ "name": "laminas/laminas-config",
"description": "provides a nested object property based user interface for accessing this configuration data within application code",
"license": "BSD-3-Clause",
"keywords": [
- "zf2",
+ "laminas",
"config"
],
- "homepage": "https://github.com/zendframework/zend-config",
- "autoload": {
- "psr-4": {
- "Zend\\Config\\": "src/"
+ "homepage": "https://laminas.dev",
+ "support": {
+ "docs": "https://docs.laminas.dev/laminas-config/",
+ "issues": "https://github.com/laminas/laminas-config/issues",
+ "source": "https://github.com/laminas/laminas-config",
+ "rss": "https://github.com/laminas/laminas-config/releases.atom",
+ "chat": "https://laminas.dev/chat",
+ "forum": "https://discourse.laminas.dev"
+ },
+ "config": {
+ "sort-packages": true
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.6-dev",
+ "dev-develop": "2.7-dev"
}
},
"require": {
"php": "^5.5 || ^7.0",
- "zendframework/zend-stdlib": "^2.7 || ^3.0"
+ "laminas/laminas-stdlib": "^2.7 || ^3.0",
+ "laminas/laminas-zendframework-bridge": "^1.0"
},
"require-dev": {
- "zendframework/zend-filter": "^2.6",
- "zendframework/zend-i18n": "^2.5",
- "zendframework/zend-json": "^2.6.1",
- "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3",
"fabpot/php-cs-fixer": "1.7.*",
- "phpunit/PHPUnit": "~4.0"
+ "laminas/laminas-filter": "^2.6",
+ "laminas/laminas-i18n": "^2.5",
+ "laminas/laminas-json": "^2.6.1",
+ "laminas/laminas-servicemanager": "^2.7.5 || ^3.0.3",
+ "phpunit/phpunit": "~4.0"
},
"suggest": {
- "zendframework/zend-filter": "Zend\\Filter component",
- "zendframework/zend-i18n": "Zend\\I18n component",
- "zendframework/zend-json": "Zend\\Json to use the Json reader or writer classes",
- "zendframework/zend-servicemanager": "Zend\\ServiceManager for use with the Config Factory to retrieve reader and writer instances"
+ "laminas/laminas-filter": "Laminas\\Filter component",
+ "laminas/laminas-i18n": "Laminas\\I18n component",
+ "laminas/laminas-json": "Laminas\\Json to use the Json reader or writer classes",
+ "laminas/laminas-servicemanager": "Laminas\\ServiceManager for use with the Config Factory to retrieve reader and writer instances"
},
- "minimum-stability": "dev",
- "prefer-stable": true,
- "extra": {
- "branch-alias": {
- "dev-master": "2.6-dev",
- "dev-develop": "2.7-dev"
+ "autoload": {
+ "psr-4": {
+ "Laminas\\Config\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
- "ZendTest\\Config\\": "test/"
+ "LaminasTest\\Config\\": "test/"
}
+ },
+ "replace": {
+ "zendframework/zend-config": "self.version"
}
}
diff --git a/php-laminas-config.spec b/php-laminas-config.spec
index ae121cf..e60f397 100644
--- a/php-laminas-config.spec
+++ b/php-laminas-config.spec
@@ -1,4 +1,4 @@
-# remirepo/Fedora spec file for php-zendframework-zend-config
+# remirepo/Fedora spec file for php-laminas-config
#
# Copyright (c) 2015-2020 Remi Collet
# License: CC-BY-SA
@@ -7,11 +7,13 @@
# Please, preserve the changelog entries
#
%global bootstrap 0
-%global gh_commit 2920e877a9f6dca9fa8f6bd3b1ffc2e19bb1e30d
+%global gh_commit 71ba6d5dd703196ce66b25abc4d772edb094dae1
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
-%global gh_owner zendframework
-%global gh_project zend-config
+%global gh_owner laminas
+%global gh_project laminas-config
+%global zf_name zend-config
%global php_home %{_datadir}/php
+%global namespace Laminas
%global library Config
%if %{bootstrap}
%global with_tests 0%{?_with_tests:1}
@@ -19,13 +21,13 @@
%global with_tests 0%{!?_without_tests:1}
%endif
-Name: php-%{gh_owner}-%{gh_project}
+Name: php-%{gh_project}
Version: 2.6.0
-Release: 7%{?dist}
-Summary: Zend Framework %{library} component
+Release: 1%{?dist}
+Summary: %{namespace} Framework %{library} component
License: BSD
-URL: https://zendframework.github.io/%{gh_project}/
+URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz
Source1: makesrc.sh
@@ -42,36 +44,28 @@ BuildRequires: php-xmlreader
BuildRequires: php-xmlwriter
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7 with php-autoloader(%{gh_owner}/zend-stdlib) < 4)
-# remirepo:4
-%else
-BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) < 4
-BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7
-%endif
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.0 with php-autoloader(%{gh_owner}/laminas-stdlib) < 4)
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-zendframework-bridge) >= 1.0 with php-autoloader(%{gh_owner}/laminas-zendframework-bridge) < 2)
# From composer, "require-dev": {
-# "zendframework/zend-filter": "^2.6",
-# "zendframework/zend-i18n": "^2.5",
-# "zendframework/zend-json": "^2.6.1",
-# "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3",
# "fabpot/php-cs-fixer": "1.7.*",
-# "phpunit/PHPUnit": "~4.0"
-# remirepo:1
-%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: (php-autoloader(%{gh_owner}/zend-filter) >= 2.6 with php-autoloader(%{gh_owner}/zend-filter) < 3)
-BuildRequires: (php-autoloader(%{gh_owner}/zend-i18n) >= 2.5 with php-autoloader(%{gh_owner}/zend-i18n) < 3)
+# "laminas/laminas-filter": "^2.6",
+# "laminas/laminas-i18n": "^2.5",
+# "laminas/laminas-json": "^2.6.1",
+# "laminas/laminas-servicemanager": "^2.7.5 || ^3.0.3",
+# "phpunit/phpunit": "~4.0"
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-filter) >= 2.6 with php-autoloader(%{gh_owner}/laminas-filter) < 3)
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-i18n) >= 2.5 with php-autoloader(%{gh_owner}/laminas-i18n) < 3)
# ignore max version, as test suite passes with v3
-BuildRequires: (php-autoloader(%{gh_owner}/zend-json) >= 2.6.1 with php-autoloader(%{gh_owner}/zend-json) < 4)
-BuildRequires: (php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.5 with php-autoloader(%{gh_owner}/zend-servicemanager) < 4)
-# remirepo:10
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-json) >= 2.6.1 with php-autoloader(%{gh_owner}/laminas-json) < 4)
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-servicemanager) >= 3.0 with php-autoloader(%{gh_owner}/laminas-servicemanager) < 4)
+# remirepo:8
%else
-BuildRequires: php-autoloader(%{gh_owner}/zend-filter) < 3
-BuildRequires: php-autoloader(%{gh_owner}/zend-filter) >= 2.6
-BuildRequires: php-autoloader(%{gh_owner}/zend-i18n) < 3
-BuildRequires: php-autoloader(%{gh_owner}/zend-i18n) >= 2.5
-BuildRequires: php-autoloader(%{gh_owner}/zend-json) < 4
-BuildRequires: php-autoloader(%{gh_owner}/zend-json) >= 2.6.1
-BuildRequires: php-autoloader(%{gh_owner}/zend-servicemanager) < 4
-BuildRequires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.5
+BuildRequires: php-laminas-stdlib
+BuildRequires: php-laminas-zendframework-bridge
+BuildRequires: php-laminas-filter
+BuildRequires: php-laminas-i18n
+BuildRequires: php-laminas-json
+BuildRequires: php-laminas-servicemanager
%endif
BuildRequires: php-composer(phpunit/phpunit) >= 4.0
%endif
@@ -80,52 +74,53 @@ BuildRequires: php-fedora-autoloader-devel
# From composer, "require": {
# "php": "^5.5 || ^7.0",
-# "zendframework/zend-stdlib": "^2.7 || ^3.0"
+# "laminas/laminas-stdlib": "^2.7 || ^3.0",
+# "laminas/laminas-zendframework-bridge": "^1.0"
Requires: php(language) >= 5.5
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7 with php-autoloader(%{gh_owner}/zend-stdlib) < 4)
+Requires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.0 with php-autoloader(%{gh_owner}/laminas-stdlib) < 4)
+Requires: (php-autoloader(%{gh_owner}/laminas-zendframework-bridge) >= 1.0 with php-autoloader(%{gh_owner}/laminas-zendframework-bridge) < 2)
+# From composer, "suggest": {
+# "laminas/laminas-filter": "Laminas\\Filter component",
+# "laminas/laminas-i18n": "Laminas\\I18n component",
+# "laminas/laminas-json": "Laminas\\Json to use the Json reader or writer classes",
+# "laminas/laminas-servicemanager": "Laminas\\ServiceManager for use with the Config Factory to retrieve reader and writer instances"
+Suggests: php-autoloader(%{gh_owner}/laminas-filter)
+Suggests: php-autoloader(%{gh_owner}/laminas-i18n)
+Suggests: php-autoloader(%{gh_owner}/laminas-json)
+Suggests: php-autoloader(%{gh_owner}/laminas-servicemanager)
# remirepo:4
%else
-Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4
-Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7
+Requires: php-laminas-stdlib
+Requires: php-laminas-zendframework-bridge
%endif
# Autoloader
Requires: php-composer(fedora/autoloader)
-# From phpcompatinfo report for version 2.5.2
+# From phpcompatinfo report for version 2.6.0
Requires: php-libxml
Requires: php-pcre
Requires: php-spl
Requires: php-xmlreader
Requires: php-xmlwriter
-%if ! %{bootstrap}
-# From composer, "suggest": {
-# "zendframework/zend-filter": "Zend\\Filter component",
-# "zendframework/zend-i18n": "Zend\\I18n component",
-# "zendframework/zend-json": "Zend\\Json to use the Json reader or writer classes",
-# "zendframework/zend-servicemanager": "Zend\\ServiceManager for use with the Config Factory to retrieve reader and writer instances"
-%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
-Suggests: php-autoloader(%{gh_owner}/zend-filter)
-Suggests: php-autoloader(%{gh_owner}/zend-i18n)
-Suggests: php-autoloader(%{gh_owner}/zend-json)
-Suggests: php-autoloader(%{gh_owner}/zend-servicemanager)
-%endif
-%endif
-Obsoletes: php-ZendFramework2-%{library} < 2.5
-Provides: php-ZendFramework2-%{library} = %{version}
-Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version}
+# Compatibily ensure by the bridge
+Obsoletes: php-zendframework-%{zf_name} < 2.6.0-99
+Provides: php-zendframework-%{zf_name} = %{version}-99
+Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version}
+Provides: php-composer(zendframework/%{zf_name}) = %{version}
Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version}
+Provides: php-autoloader(zendframework/%{zf_name}) = %{version}
%description
-Zend\Config is designed to simplify access to configuration data within
+%{namespace}\Config is designed to simplify access to configuration data within
applications. It provides a nested object property-based user interface
for accessing this configuration data within application code. The
configuration data may come from a variety of media supporting hierarchical
data storage.
-Documentation: https://zendframework.github.io/%{gh_project}/
+Documentation: https://docs.laminas.dev/%{gh_project}/
%prep
@@ -139,20 +134,34 @@ mv LICENSE.md LICENSE
phpab --template fedora --output src/autoload.php src
cat << 'EOF' | tee -a src/autoload.php
\Fedora\Autoloader\Dependencies::required([
- '%{php_home}/Zend/Stdlib/autoload.php',
+ '%{php_home}/%{namespace}/Stdlib/autoload.php',
]);
\Fedora\Autoloader\Dependencies::optional([
- '%{php_home}/Zend/Filter/autoload.php',
- '%{php_home}/Zend/I18n/autoload.php',
- '%{php_home}/Zend/Json/autoload.php',
- '%{php_home}/Zend/ServiceManager/autoload.php',
+ '%{php_home}/%{namespace}/Filter/autoload.php',
+ '%{php_home}/%{namespace}/I18n/autoload.php',
+ '%{php_home}/%{namespace}/Json/autoload.php',
+ '%{php_home}/%{namespace}/ServiceManager/autoload.php',
+]);
+EOF
+
+cat << 'EOF' | tee zf.php
+<?php
+require_once '%{php_home}/Fedora/Autoloader/autoload.php';
+\Fedora\Autoloader\Dependencies::required([
+ '%{php_home}/%{namespace}/ZendFrameworkBridge/autoload.php',
+ dirname(dirname(__DIR__)) . '/%{namespace}/%{library}/autoload.php',
]);
EOF
%install
-mkdir -p %{buildroot}%{php_home}/Zend/
-cp -pr src %{buildroot}%{php_home}/Zend/%{library}
+: Laminas library
+mkdir -p %{buildroot}%{php_home}/%{namespace}/
+cp -pr src %{buildroot}%{php_home}/%{namespace}/%{library}
+
+: Zend equiv
+mkdir -p %{buildroot}%{php_home}/Zend/%{library}
+cp -pr zf.php %{buildroot}%{php_home}/Zend/%{library}/autoload.php
%check
@@ -160,12 +169,19 @@ cp -pr src %{buildroot}%{php_home}/Zend/%{library}
mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
<?php
-require_once '%{buildroot}%{php_home}/Zend/%{library}/autoload.php';
-\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\%{library}\\', dirname(__DIR__) . '/test');
+require_once '%{buildroot}%{php_home}/%{namespace}/%{library}/autoload.php';
+\Fedora\Autoloader\Autoload::addPsr4('%{namespace}Test\\%{library}\\', dirname(__DIR__) . '/test');
EOF
+: check compat autoloader
+php -r '
+require "%{buildroot}%{php_home}/Zend/%{library}/autoload.php";
+return (class_exists("\\Zend\\%{library}\\Config") ? 0 : 1);
+'
+
+: upstream test suite
ret=0
-for cmd in php php56 php70 php71 php72 php73 php74; do
+for cmd in php php72 php73 php74; do
if which $cmd; then
$cmd %{_bindir}/phpunit || ret=1
fi
@@ -177,14 +193,19 @@ exit $ret
%files
+# remirepo:1
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md
%doc composer.json
%{php_home}/Zend/%{library}
+%{php_home}/%{namespace}/%{library}
%changelog
+* Thu Jan 9 2020 Remi Collet <remi@remirepo.net> - 2.6.0-1
+- switch to Laminas
+
* Tue Feb 5 2019 Remi Collet <remi@remirepo.net> - 2.6.0-7
- fix FTBFS with PHP 7.3, patch from
https://github.com/zendframework/zend-config/pull/54