summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-01-10 15:47:09 +0100
committerRemi Collet <remi@remirepo.net>2020-01-10 15:47:09 +0100
commitde8a249f50f57724446f0ffac82088a91761ac85 (patch)
treeb305957213f0d18ffcc7a39f2801dae420007b75
parentca81e21f1cdb24d0d56b1fe55874f42f1bd21e26 (diff)
switch to Laminas
update to 3.3.1
-rw-r--r--composer.json69
-rw-r--r--php-laminas-router.spec165
2 files changed, 130 insertions, 104 deletions
diff --git a/composer.json b/composer.json
index 3973ec8..6d16f62 100644
--- a/composer.json
+++ b/composer.json
@@ -1,61 +1,61 @@
{
- "name": "zendframework/zend-router",
+ "name": "laminas/laminas-router",
"description": "Flexible routing system for HTTP and console applications",
"license": "BSD-3-Clause",
"keywords": [
- "zf",
- "zend",
- "zendframework",
+ "laminas",
"mvc",
"routing"
],
+ "homepage": "https://laminas.dev",
"support": {
- "docs": "https://docs.zendframework.com/zend-router/",
- "issues": "https://github.com/zendframework/zend-router/issues",
- "source": "https://github.com/zendframework/zend-router",
- "rss": "https://github.com/zendframework/zend-router/releases.atom",
- "slack": "https://zendframework-slack.herokuapp.com",
- "forum": "https://discourse.zendframework.com/c/questions/components"
+ "docs": "https://docs.laminas.dev/laminas-router/",
+ "issues": "https://github.com/laminas/laminas-router/issues",
+ "source": "https://github.com/laminas/laminas-router",
+ "rss": "https://github.com/laminas/laminas-router/releases.atom",
+ "chat": "https://laminas.dev/chat",
+ "forum": "https://discourse.laminas.dev"
+ },
+ "config": {
+ "sort-packages": true
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.3.x-dev",
+ "dev-develop": "4.0.x-dev"
+ },
+ "laminas": {
+ "component": "Laminas\\Router",
+ "config-provider": "Laminas\\Router\\ConfigProvider"
+ }
},
"require": {
"php": "^5.6 || ^7.0",
"container-interop/container-interop": "^1.2",
- "zendframework/zend-http": "^2.8.1",
- "zendframework/zend-servicemanager": "^2.7.8 || ^3.3",
- "zendframework/zend-stdlib": "^3.2.1"
+ "laminas/laminas-http": "^2.8.1",
+ "laminas/laminas-servicemanager": "^2.7.8 || ^3.3",
+ "laminas/laminas-stdlib": "^3.2.1",
+ "laminas/laminas-zendframework-bridge": "^1.0"
},
"require-dev": {
- "phpunit/phpunit": "^5.7.22 || ^6.4.1",
- "zendframework/zend-coding-standard": "~1.0.0",
- "zendframework/zend-i18n": "^2.7.4"
+ "laminas/laminas-coding-standard": "~1.0.0",
+ "laminas/laminas-i18n": "^2.7.4",
+ "phpunit/phpunit": "^5.7.22 || ^6.4.1 || ^7.5.18"
},
"conflict": {
- "zendframework/zend-mvc": "<3.0.0"
+ "laminas/laminas-mvc": "<3.0.0"
},
"suggest": {
- "zendframework/zend-i18n": "^2.7.4, if defining translatable HTTP path segments"
+ "laminas/laminas-i18n": "^2.7.4, if defining translatable HTTP path segments"
},
"autoload": {
"psr-4": {
- "Zend\\Router\\": "src/"
+ "Laminas\\Router\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
- "ZendTest\\Router\\": "test/"
- }
- },
- "config": {
- "sort-packages": true
- },
- "extra": {
- "branch-alias": {
- "dev-master": "3.3.x-dev",
- "dev-develop": "4.0.x-dev"
- },
- "zf": {
- "component": "Zend\\Router",
- "config-provider": "Zend\\Router\\ConfigProvider"
+ "LaminasTest\\Router\\": "test/"
}
},
"scripts": {
@@ -67,5 +67,8 @@
"cs-fix": "phpcbf",
"test": "phpunit --colors=always",
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml"
+ },
+ "replace": {
+ "zendframework/zend-router": "self.version"
}
}
diff --git a/php-laminas-router.spec b/php-laminas-router.spec
index bf6d60a..999a761 100644
--- a/php-laminas-router.spec
+++ b/php-laminas-router.spec
@@ -1,4 +1,4 @@
-# remirepo/Fedora spec file for php-zendframework-zend-router
+# remirepo/Fedora spec file for php-laminas-router
#
# Copyright (c) 2016-2020 Remi Collet
# License: CC-BY-SA
@@ -7,11 +7,13 @@
# Please, preserve the changelog entries
#
%global bootstrap 0
-%global gh_commit b113a4cfd910ee4723079fa58a9bcf3198631620
+%global gh_commit c94f13f39dfbc4313efdbfcd9772487b4b009026
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
-%global gh_owner zendframework
-%global gh_project zend-router
+%global gh_owner laminas
+%global gh_project laminas-router
+%global zf_name zend-router
%global php_home %{_datadir}/php
+%global namespace Laminas
%global library Router
%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}
-Version: 3.3.0
+Name: php-%{gh_project}
+Version: 3.3.1
Release: 1%{?dist}
-Summary: Zend Framework %{library} component
+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
@@ -37,35 +39,27 @@ BuildRequires: php-pcre
BuildRequires: php-spl
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: (php-composer(container-interop/container-interop) >= 1.2 with php-composer(container-interop/container-interop) < 2)
-BuildRequires: (php-autoloader(%{gh_owner}/zend-http) >= 2.8.1 with php-autoloader(%{gh_owner}/zend-http) < 3)
-BuildRequires: (php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.7 with php-autoloader(%{gh_owner}/zend-servicemanager) < 4)
-BuildRequires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1 with php-autoloader(%{gh_owner}/zend-stdlib) < 4)
-# remirepo:10
-%else
-BuildRequires: php-composer(container-interop/container-interop) < 2
-BuildRequires: php-composer(container-interop/container-interop) >= 1.2
-BuildRequires: php-autoloader(%{gh_owner}/zend-http) < 3
-BuildRequires: php-autoloader(%{gh_owner}/zend-http) >= 2.8.1
-BuildRequires: php-autoloader(%{gh_owner}/zend-servicemanager) < 4
-BuildRequires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.5
-BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) < 4
-BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1
-%endif
+BuildRequires: (php-composer(container-interop/container-interop) >= 1.2 with php-composer(container-interop/container-interop) < 2)
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-http) >= 2.8.1 with php-autoloader(%{gh_owner}/laminas-http) < 3)
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-servicemanager) >= 3.3 with php-autoloader(%{gh_owner}/laminas-servicemanager) < 4)
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.2.1 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": {
-# "phpunit/phpunit": "^5.7.22 || ^6.4.1",
-# "zendframework/zend-coding-standard": "~1.0.0",
-# "zendframework/zend-i18n": "^2.7.4"
-# remirepo:1
-%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: (php-autoloader(%{gh_owner}/zend-i18n) >= 2.6 with php-autoloader(%{gh_owner}/zend-i18n) < 3)
-# remirepo:4
+# "laminas/laminas-coding-standard": "~1.0.0",
+# "laminas/laminas-i18n": "^2.7.4",
+# "phpunit/phpunit": "^5.7.22 || ^6.4.1 || ^7.5.18"
+# remirepo:10
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-i18n) >= 2.6 with php-autoloader(%{gh_owner}/laminas-i18n) < 3)
%else
-BuildRequires: php-autoloader(%{gh_owner}/zend-i18n) < 3
-BuildRequires: php-autoloader(%{gh_owner}/zend-i18n) >= 2.6
+BuildRequires: php-container-interop
+BuildRequires: php-laminas-http
+BuildRequires: php-laminas-servicemanager
+BuildRequires: php-laminas-stdlib
+BuildRequires: php-laminas-zendframework-bridge
+BuildRequires: php-laminas-i18n
%endif
-%global phpunit %{_bindir}/phpunit6
-BuildRequires: phpunit6 >= 6.4.3
+%global phpunit %{_bindir}/phpunit7
+BuildRequires: phpunit7 >= 7.5.18
%endif
# Autoloader
BuildRequires: php-fedora-autoloader-devel
@@ -73,51 +67,53 @@ BuildRequires: php-fedora-autoloader-devel
# From composer, "require": {
# "php": "^5.6 || ^7.0",
# "container-interop/container-interop": "^1.2",
-# "zendframework/zend-http": "^2.8.1",
-# "zendframework/zend-servicemanager": "^2.7.8 || ^3.3",
-# "zendframework/zend-stdlib": "^3.2.1"
+# "laminas/laminas-http": "^2.8.1",
+# "laminas/laminas-servicemanager": "^2.7.8 || ^3.3",
+# "laminas/laminas-stdlib": "^3.2.1",
+# "laminas/laminas-zendframework-bridge": "^1.0"
Requires: php(language) >= 5.6
%if ! %{bootstrap}
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (php-composer(container-interop/container-interop) >= 1.2 with php-composer(container-interop/container-interop) < 2)
-Requires: (php-autoloader(%{gh_owner}/zend-http) >= 2.8.1 with php-autoloader(%{gh_owner}/zend-http) < 3)
-Requires: (php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.7 with php-autoloader(%{gh_owner}/zend-servicemanager) < 4)
-Requires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1 with php-autoloader(%{gh_owner}/zend-stdlib) < 4)
-# remirepo:10
-%else
-Requires: php-composer(container-interop/container-interop) < 2
-Requires: php-composer(container-interop/container-interop) >= 1.2
-Requires: php-autoloader(%{gh_owner}/zend-http) < 3
-Requires: php-autoloader(%{gh_owner}/zend-http) >= 2.8.1
-Requires: php-autoloader(%{gh_owner}/zend-servicemanager) < 4
-Requires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.7
-Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4
-Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1
-%endif
+Requires: (php-composer(container-interop/container-interop) >= 1.2 with php-composer(container-interop/container-interop) < 2)
+Requires: (php-autoloader(%{gh_owner}/laminas-http) >= 2.8.1 with php-autoloader(%{gh_owner}/laminas-http) < 3)
+Requires: (php-autoloader(%{gh_owner}/laminas-servicemanager) >= 3.3 with php-autoloader(%{gh_owner}/laminas-servicemanager) < 4)
+Requires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.2.1 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": {
# "zendframework/zend-i18n": "^2.6, if defining translatable HTTP path segments"
-%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
-Suggests: php-autoloader(%{gh_owner}/zend-i18n)
+Suggests: php-autoloader(%{gh_owner}/laminas-i18n)
+# remirepo:7
+%else
+Requires: php-container-interop
+Requires: php-laminas-http
+Requires: php-laminas-servicemanager
+Requires: php-laminas-stdlib
+Requires: php-laminas-zendframework-bridge
%endif
# From composer, "conflict": {
-# "zendframework/zend-mvc": "<3.0.0"
-Conflicts: php-composer(%{gh_owner}/zend-mvc) < 3
+# "laminas/laminas-mvc": "<3.0.0"
+Conflicts: php-composer(%{gh_owner}/laminas-mvc) < 3
%endif
# Autoloader
Requires: php-composer(fedora/autoloader)
-# From phpcompatinfo report for version 2.5.1
+# From phpcompatinfo report for version 3.3.1
Requires: php-pcre
Requires: php-spl
-Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version}
+# Compatibily ensure by the bridge
+Obsoletes: php-zendframework-%{zf_name} < 3.3.1
+Provides: php-zendframework-%{zf_name} = %{version}
+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-router provides flexible HTTP routing.
+%{gh_project} provides flexible HTTP routing.
-Routing currently works against the zend-http request and responses,
+Routing currently works against the laminas-http request and responses,
and provides capabilities around:
* Literal path matches
@@ -131,7 +127,7 @@ and provides capabilities around:
Additionally, it supports combinations of different route types in tree
structures, allowing for fast, b-tree lookups.
-Documentation: https://zendframework.github.io/%{gh_project}/
+Documentation: https://docs.laminas.dev/%{gh_project}/
%prep
@@ -146,19 +142,33 @@ 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/Http/autoload.php',
- '%{php_home}/Zend/ServiceManager/autoload.php',
- '%{php_home}/Zend/Stdlib/autoload.php',
+ '%{php_home}/%{namespace}/Http/autoload.php',
+ '%{php_home}/%{namespace}/ServiceManager/autoload.php',
+ '%{php_home}/%{namespace}/Stdlib/autoload.php',
]);
\Fedora\Autoloader\Dependencies::optional([
- '%{php_home}/Zend/I18n/autoload.php',
+ '%{php_home}/%{namespace}/I18n/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
@@ -166,15 +176,22 @@ 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";
+exit (class_exists("\\Zend\\%{library}\\RouterFactory") ? 0 : 1);
+'
+
+: upstream test suite
ret=0
-for cmdarg in "php %{phpunit}" php70 php71 php72 php73 php74; do
+for cmdarg in "php %{phpunit}" php72 php73 php74; do
if which $cmdarg; then
set $cmdarg
- $1 -d memory_limit=1G ${2:-%{_bindir}/phpunit6} --verbose || ret=1
+ $1 -d memory_limit=1G ${2:-%{_bindir}/phpunit7} --verbose || ret=1
fi
done
exit $ret
@@ -184,14 +201,20 @@ 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
+* Fri Jan 10 2020 Remi Collet <remi@remirepo.net> - 3.3.1-1
+- switch to Laminas
+- update to 3.3.1
+
* Wed Feb 27 2019 Remi Collet <remi@remirepo.net> - 3.3.0-1
- update to 3.3.0 (no change)
- raise dependency on zendframework/zend-stdlib 3.2.1