summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json74
-rw-r--r--php-laminas-modulemanager.spec207
2 files changed, 159 insertions, 122 deletions
diff --git a/composer.json b/composer.json
index 7996142..6636b0c 100644
--- a/composer.json
+++ b/composer.json
@@ -1,44 +1,54 @@
{
- "name": "zendframework/zend-modulemanager",
- "description": "Modular application system for zend-mvc applications",
+ "name": "laminas/laminas-modulemanager",
+ "description": "Modular application system for laminas-mvc applications",
"license": "BSD-3-Clause",
"keywords": [
- "zendframework",
- "zf",
+ "laminas",
"modulemanager"
],
+ "homepage": "https://laminas.dev",
"support": {
- "docs": "https://docs.zendframework.com/zend-modulemanager/",
- "issues": "https://github.com/zendframework/zend-modulemanager/issues",
- "source": "https://github.com/zendframework/zend-modulemanager",
- "rss": "https://github.com/zendframework/zend-modulemanager/releases.atom",
- "chat": "https://zendframework-slack.herokuapp.com",
- "forum": "https://discourse.zendframework.com/c/questions/components"
+ "docs": "https://docs.laminas.dev/laminas-modulemanager/",
+ "issues": "https://github.com/laminas/laminas-modulemanager/issues",
+ "source": "https://github.com/laminas/laminas-modulemanager",
+ "rss": "https://github.com/laminas/laminas-modulemanager/releases.atom",
+ "chat": "https://laminas.dev/chat",
+ "forum": "https://discourse.laminas.dev"
+ },
+ "config": {
+ "sort-packages": true
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.8.x-dev",
+ "dev-develop": "2.9.x-dev"
+ }
},
"require": {
"php": "^5.6 || ^7.0",
- "zendframework/zend-config": "^3.1 || ^2.6",
- "zendframework/zend-eventmanager": "^3.2 || ^2.6.3",
- "zendframework/zend-stdlib": "^3.1 || ^2.7"
+ "laminas/laminas-config": "^3.1 || ^2.6",
+ "laminas/laminas-eventmanager": "^3.2 || ^2.6.3",
+ "laminas/laminas-stdlib": "^3.1 || ^2.7",
+ "laminas/laminas-zendframework-bridge": "^1.0"
},
"require-dev": {
- "zendframework/zend-console": "^2.6",
- "zendframework/zend-di": "^2.6",
- "zendframework/zend-loader": "^2.5",
- "zendframework/zend-mvc": "^3.0 || ^2.7",
- "zendframework/zend-servicemanager": "^3.0.3 || ^2.7.5",
- "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.16",
- "zendframework/zend-coding-standard": "~1.0.0"
+ "laminas/laminas-coding-standard": "~1.0.0",
+ "laminas/laminas-console": "^2.6",
+ "laminas/laminas-di": "^2.6",
+ "laminas/laminas-loader": "^2.5",
+ "laminas/laminas-mvc": "^3.0 || ^2.7",
+ "laminas/laminas-servicemanager": "^3.0.3 || ^2.7.5",
+ "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.16"
},
"suggest": {
- "zendframework/zend-console": "Zend\\Console component",
- "zendframework/zend-loader": "Zend\\Loader component if you are not using Composer autoloading for your modules",
- "zendframework/zend-mvc": "Zend\\Mvc component",
- "zendframework/zend-servicemanager": "Zend\\ServiceManager component"
+ "laminas/laminas-console": "Laminas\\Console component",
+ "laminas/laminas-loader": "Laminas\\Loader component if you are not using Composer autoloading for your modules",
+ "laminas/laminas-mvc": "Laminas\\Mvc component",
+ "laminas/laminas-servicemanager": "Laminas\\ServiceManager component"
},
"autoload": {
"psr-4": {
- "Zend\\ModuleManager\\": "src/"
+ "Laminas\\ModuleManager\\": "src/"
}
},
"autoload-dev": {
@@ -49,16 +59,7 @@
"psr-4": {
"ListenerTestModule\\": "test/TestAsset/ListenerTestModule/",
"ModuleAsClass\\": "test/TestAsset/ModuleAsClass/",
- "ZendTest\\ModuleManager\\": "test/"
- }
- },
- "config": {
- "sort-packages": true
- },
- "extra": {
- "branch-alias": {
- "dev-master": "2.8.x-dev",
- "dev-develop": "2.9.x-dev"
+ "LaminasTest\\ModuleManager\\": "test/"
}
},
"scripts": {
@@ -70,5 +71,8 @@
"cs-fix": "phpcbf",
"test": "phpunit --colors=always",
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml"
+ },
+ "replace": {
+ "zendframework/zend-modulemanager": "self.version"
}
}
diff --git a/php-laminas-modulemanager.spec b/php-laminas-modulemanager.spec
index 1075ff1..41220ff 100644
--- a/php-laminas-modulemanager.spec
+++ b/php-laminas-modulemanager.spec
@@ -1,4 +1,4 @@
-# remirepo/fedora spec file for php-zendframework-zend-modulemanager
+# remirepo/fedora spec file for php-laminas-modulemanager
#
# Copyright (c) 2015-2020 Remi Collet
# License: CC-BY-SA
@@ -6,26 +6,25 @@
#
# Please, preserve the changelog entries
#
-%global bootstrap 0
-%global gh_commit b2596d24b9a4e36a3cd114d35d3ad0918db9a243
+# When build without laminas-mvc
+%global bootstrap 1
+%global gh_commit 92b1cde1aab5aef687b863face6dd5d9c6751c78
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
-%global gh_owner zendframework
-%global gh_project zend-modulemanager
+%global gh_owner laminas
+%global gh_project laminas-modulemanager
+%global zf_name zend-modulemanager
%global php_home %{_datadir}/php
+%global namespace Laminas
%global library ModuleManager
-%if %{bootstrap}
-%global with_tests 0%{?_with_tests:1}
-%else
%global with_tests 0%{!?_without_tests:1}
-%endif
-Name: php-%{gh_owner}-%{gh_project}
+Name: php-%{gh_project}
Version: 2.8.4
-Release: 2%{?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
@@ -36,97 +35,103 @@ BuildRequires: php(language) >= 5.6
BuildRequires: php-spl
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: (php-autoloader(%{gh_owner}/zend-config) >= 2.6 with php-autoloader(%{gh_owner}/zend-config) < 4)
-BuildRequires: (php-autoloader(%{gh_owner}/zend-eventmanager) >= 3.2 with php-autoloader(%{gh_owner}/zend-eventmanager) < 4)
-BuildRequires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 3.1 with php-autoloader(%{gh_owner}/zend-stdlib) < 4)
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-config) >= 2.6 with php-autoloader(%{gh_owner}/laminas-config) < 4)
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-eventmanager) >= 3.2 with php-autoloader(%{gh_owner}/laminas-eventmanager) < 4)
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.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": {
-# "zendframework/zend-console": "^2.6",
-# "zendframework/zend-di": "^2.6",
-# "zendframework/zend-loader": "^2.5",
-# "zendframework/zend-mvc": "^3.0 || ^2.7",
-# "zendframework/zend-servicemanager": "^3.0.3 || ^2.7.5",
-# "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.16",
-# "zendframework/zend-coding-standard": "~1.0.0"
-BuildRequires: (php-composer(%{gh_owner}/zend-console) >= 2.6 with php-composer(%{gh_owner}/zend-console) < 3)
-BuildRequires: (php-composer(%{gh_owner}/zend-di) >= 2.6 with php-composer(%{gh_owner}/zend-di) < 3)
-BuildRequires: (php-composer(%{gh_owner}/zend-loader) >= 2.5 with php-composer(%{gh_owner}/zend-loader) < 3)
+# "laminas/laminas-coding-standard": "~1.0.0",
+# "laminas/laminas-console": "^2.6",
+# "laminas/laminas-di": "^2.6",
+# "laminas/laminas-loader": "^2.5",
+# "laminas/laminas-mvc": "^3.0 || ^2.7",
+# "laminas/laminas-servicemanager": "^3.0.3 || ^2.7.5",
+# "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.16"
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-console) >= 2.6 with php-autoloader(%{gh_owner}/laminas-console) < 3)
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-di) >= 2.6 with php-autoloader(%{gh_owner}/laminas-di) < 3)
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-loader) >= 2.5 with php-autoloader(%{gh_owner}/laminas-loader) < 3)
+%if ! %{bootstrap}
# ignore max version, test suite pass with 3.1
-BuildRequires: php-composer(%{gh_owner}/zend-mvc) >= 2.7
-BuildRequires: (php-composer(%{gh_owner}/zend-servicemanager) >= 3.0.3 with php-composer(%{gh_owner}/zend-servicemanager) < 4)
-%global phpunit %{_bindir}/phpunit7
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-mvc) >= 2.7 with php-autoloader(%{gh_owner}/laminas-mvc) < 4)
+%endif
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-servicemanager) >= 3.0.3 with php-autoloader(%{gh_owner}/laminas-servicemanager) < 4)
# remirepo:11
%else
-BuildRequires: php-autoloader(%{gh_owner}/zend-config) >= 2.6
-BuildRequires: php-autoloader(%{gh_owner}/zend-eventmanager) >= 2.6.3
-BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7
-BuildRequires: php-composer(%{gh_owner}/zend-console) >= 2.6
-BuildRequires: php-composer(%{gh_owner}/zend-di) >= 2.6
-BuildRequires: php-composer(%{gh_owner}/zend-loader) >= 2.5
-BuildRequires: php-composer(%{gh_owner}/zend-mvc) >= 2.7
-BuildRequires: php-composer(%{gh_owner}/zend-servicemanager) >= 2.7.5
-%global phpunit %{_bindir}/phpunit
+BuildRequires: php-laminas-config
+BuildRequires: php-laminas-eventmanager
+BuildRequires: php-laminas-stdlib
+BuildRequires: php-laminas-zendframework-bridge
+BuildRequires: php-laminas-console
+BuildRequires: php-laminas-di
+BuildRequires: php-laminas-loader
+%if ! %{bootstrap}
+BuildRequires: php-laminas-mvc
+%endif
+BuildRequires: php-laminas-servicemanager
%endif
-BuildRequires: %{phpunit}
+%global phpunit %{_bindir}/phpunit7
+BuildRequires: phpunit7 >= 7.5.16
%endif
# Autoloader
BuildRequires: php-fedora-autoloader-devel
# From composer, "require": {
# "php": "^5.6 || ^7.0",
-# "zendframework/zend-config": "^3.1 || ^2.6",
-# "zendframework/zend-eventmanager": "^3.2 || ^2.6.3",
-# "zendframework/zend-stdlib": "^3.1 || ^2.7"
+# "laminas/laminas-config": "^3.1 || ^2.6",
+# "laminas/laminas-eventmanager": "^3.2 || ^2.6.3",
+# "laminas/laminas-stdlib": "^3.1 || ^2.7",
+# "laminas/laminas-zendframework-bridge": "^1.0"
Requires: php(language) >= 5.6
-%if ! %{bootstrap}
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (php-autoloader(%{gh_owner}/zend-config) >= 2.6 with php-autoloader(%{gh_owner}/zend-config) < 4)
-Requires: (php-autoloader(%{gh_owner}/zend-eventmanager) >= 3.2 with php-autoloader(%{gh_owner}/zend-eventmanager) < 4)
-Requires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 3.1 with php-autoloader(%{gh_owner}/zend-stdlib) < 4)
-# remirepo:8
-%else
-Requires: php-autoloader(%{gh_owner}/zend-config) >= 2.6
-Requires: php-autoloader(%{gh_owner}/zend-config) < 4
-Requires: php-autoloader(%{gh_owner}/zend-eventmanager) >= 2.6.3
-Requires: php-autoloader(%{gh_owner}/zend-eventmanager) < 4
-Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7
-Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4
-%endif
+Requires: (php-autoloader(%{gh_owner}/laminas-config) >= 2.6 with php-autoloader(%{gh_owner}/laminas-config) < 4)
+Requires: (php-autoloader(%{gh_owner}/laminas-eventmanager) >= 3.2 with php-autoloader(%{gh_owner}/laminas-eventmanager) < 4)
+Requires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.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-config": "Zend\\Config component",
-# "zendframework/zend-console": "Zend\\Console component",
-# "zendframework/zend-loader": "Zend\\Loader component if you are not using Composer autoloading for your modules",
-# "zendframework/zend-mvc": "Zend\\Mvc component",
-# "zendframework/zend-servicemanager": "Zend\\ServiceManager component"
-%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
-Suggests: php-autoloader(%{gh_owner}/zend-console)
-Suggests: php-autoloader(%{gh_owner}/zend-loader)
-Suggests: php-autoloader(%{gh_owner}/zend-mvc)
-Suggests: php-autoloader(%{gh_owner}/zend-servicemanager)
-%endif
+# "laminas/laminas-console": "Laminas\\Console component",
+# "laminas/laminas-loader": "Laminas\\Loader component if you are not using Composer autoloading for your modules",
+# "laminas/laminas-mvc": "Laminas\\Mvc component",
+# "laminas/laminas-servicemanager": "Laminas\\ServiceManager component"
+Suggests: php-autoloader(%{gh_owner}/laminas-console)
+Suggests: php-autoloader(%{gh_owner}/laminas-loader)
+Suggests: php-autoloader(%{gh_owner}/laminas-mvc)
+Suggests: php-autoloader(%{gh_owner}/laminas-servicemanager)
+# remirepo:6
+%else
+Requires: php-laminas-config
+Requires: php-laminas-eventmanager
+Requires: php-laminas-stdlib
+Requires: php-laminas-zendframework-bridge
%endif
# Autoloader
Requires: php-composer(fedora/autoloader)
-# From phpcompatinfo report for version 2.6.1
+# From phpcompatinfo report for version 2.8.4
Requires: php-spl
-Obsoletes: php-ZendFramework2-%{library} < 2.5
-Provides: php-ZendFramework2-%{library} = %{version}
+Obsoletes: php-ZendFramework2-%{library} < 2.5
+Provides: php-ZendFramework2-%{library} = %{version}
+# Compatibily ensure by the bridge
+Obsoletes: php-zendframework-%{zf_name} < 2.8.4-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 Framework 2.0 introduces a new and powerful approach to modules.
+%{namespace} Framework introduces a new and powerful approach to modules.
This new module system is designed with flexibility, simplicity, and
re-usability in mind. A module may contain just about anything:
PHP code, including MVC functionality; library code; view scripts;
and/or public assets such as images, CSS, and JavaScript.
The possibilities are endless.
-Zend\ModuleManager is the component that enables the design of a module architecture for PHP applcations.
+%{namespace}\ModuleManager is the component that enables the design of a module
+architecture for PHP applcations.
-Documentation: https://zendframework.github.io/%{gh_project}/
+Documentation: https://docs.laminas.dev/%{gh_project}/
%prep
@@ -141,24 +146,38 @@ phpab --template fedora --output src/autoload.php src
cat << 'EOF' | tee -a src/autoload.php
\Fedora\Autoloader\Dependencies::required([
[
- '%{php_home}/Zend/Config3/autoload.php',
- '%{php_home}/Zend/Config/autoload.php',
+ '%{php_home}/%{namespace}/Config3/autoload.php',
+ '%{php_home}/%{namespace}/Config/autoload.php',
],
- '%{php_home}/Zend/EventManager/autoload.php',
- '%{php_home}/Zend/Stdlib/autoload.php',
+ '%{php_home}/%{namespace}/EventManager/autoload.php',
+ '%{php_home}/%{namespace}/Stdlib/autoload.php',
]);
\Fedora\Autoloader\Dependencies::optional([
- '%{php_home}/Zend/Console/autoload.php',
- '%{php_home}/Zend/Loader/autoload.php',
- '%{php_home}/Zend/Mvc/autoload.php',
- '%{php_home}/Zend/ServiceManager/autoload.php',
+ '%{php_home}/%{namespace}/Console/autoload.php',
+ '%{php_home}/%{namespace}/Loader/autoload.php',
+ '%{php_home}/%{namespace}/Mvc/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
@@ -166,19 +185,28 @@ 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';
+require_once '%{buildroot}%{php_home}/%{namespace}/%{library}/autoload.php';
\Fedora\Autoloader\Dependencies::required([
- '%{php_home}/Zend/Di/autoload.php',
- '%{php_home}/Zend/Loader/autoload.php',
+ '%{php_home}/%{namespace}/Di/autoload.php',
]);
\Fedora\Autoloader\Autoload::addPsr4('ListenerTestModule', dirname(__DIR__) . '/test/TestAsset/ListenerTestModule');
\Fedora\Autoloader\Autoload::addPsr4('ModuleAsClass', dirname(__DIR__) . '/test/TestAsset/ModuleAsClass');
-\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\%{library}\\', dirname(__DIR__) . '/test');
-require_once '%{php_home}/Zend/Loader/autoload.php';
+\Fedora\Autoloader\Autoload::addPsr4('%{namespace}Test\\%{library}\\', dirname(__DIR__) . '/test');
require_once __DIR__ . '/../test/autoload.php';
require_once __DIR__ . '/../test/TestAsset/ModuleAsClass.php';
EOF
+: check compat autoloader
+php -r '
+require "%{buildroot}%{php_home}/Zend/%{library}/autoload.php";
+exit (class_exists("\\Zend\\%{library}\\ModuleEvent") ? 0 : 1);
+'
+
+%if %{bootstrap}
+rm -r test/Listener/
+%endif
+
+: upstream test suite
ret=0
for cmdarg in "php %{phpunit}" php72 php73 php74; do
if which $cmdarg; then
@@ -199,9 +227,14 @@ exit $ret
%doc *.md
%doc composer.json
%{php_home}/Zend/%{library}
+%{php_home}/%{namespace}/%{library}
%changelog
+* Wed Jan 15 2020 Remi Collet <remi@remirepo.net> - 2.8.4-1
+- switch to Laminas
+- bootstrap build without laminas-mvc
+
* Mon Oct 28 2019 Remi Collet <remi@remirepo.net> - 2.8.4-1
- update to 2.8.4