From 6747f80bf74287ad12a80e5e118b6c49a51c8f91 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 10 Jan 2020 09:16:41 +0100 Subject: switch to Laminas --- composer.json | 60 +++++++++++----------- php-laminas-console.spec | 128 +++++++++++++++++++++++++++++------------------ 2 files changed, 112 insertions(+), 76 deletions(-) diff --git a/composer.json b/composer.json index 74590cd..9af78d3 100644 --- a/composer.json +++ b/composer.json @@ -1,52 +1,53 @@ { - "name": "zendframework/zend-console", + "name": "laminas/laminas-console", "description": "Build console applications using getopt syntax or routing, complete with prompts", "license": "BSD-3-Clause", "keywords": [ - "zf", - "zendframework", + "laminas", "console" ], + "homepage": "https://laminas.dev", "support": { - "docs": "https://docs.zendframework.com/zend-console/", - "issues": "https://github.com/zendframework/zend-console/issues", - "source": "https://github.com/zendframework/zend-console", - "rss": "https://github.com/zendframework/zend-console/releases.atom", - "slack": "https://zendframework-slack.herokuapp.com", - "forum": "https://discourse.zendframework.com/c/questions/components" + "docs": "https://docs.laminas.dev/laminas-console/", + "issues": "https://github.com/laminas/laminas-console/issues", + "source": "https://github.com/laminas/laminas-console", + "rss": "https://github.com/laminas/laminas-console/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-stdlib": "^3.2.1" + "laminas/laminas-stdlib": "^3.2.1", + "laminas/laminas-zendframework-bridge": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.23 || ^6.4.3", - "zendframework/zend-coding-standard": "~1.0.0", - "zendframework/zend-filter": "^2.7.2", - "zendframework/zend-json": "^2.6 || ^3.0", - "zendframework/zend-validator": "^2.10.1" + "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-filter": "^2.7.2", + "laminas/laminas-json": "^2.6 || ^3.0", + "laminas/laminas-validator": "^2.10.1", + "phpunit/phpunit": "^5.7.23 || ^6.4.3" }, "suggest": { - "zendframework/zend-filter": "To support DefaultRouteMatcher usage", - "zendframework/zend-validator": "To support DefaultRouteMatcher usage" + "laminas/laminas-filter": "To support DefaultRouteMatcher usage", + "laminas/laminas-validator": "To support DefaultRouteMatcher usage" }, "autoload": { "psr-4": { - "Zend\\Console\\": "src/" + "Laminas\\Console\\": "src/" } }, "autoload-dev": { "psr-4": { - "ZendTest\\Console\\": "test/" - } - }, - "config": { - "sort-packages": true - }, - "extra": { - "branch-alias": { - "dev-master": "2.8.x-dev", - "dev-develop": "2.9.x-dev" + "LaminasTest\\Console\\": "test/" } }, "scripts": { @@ -58,5 +59,8 @@ "cs-fix": "phpcbf", "test": "phpunit --colors=always", "test-coverage": "phpunit --colors=always --coverage-clover clover.xml" + }, + "replace": { + "zendframework/zend-console": "self.version" } } diff --git a/php-laminas-console.spec b/php-laminas-console.spec index ba3c3bb..857b576 100644 --- a/php-laminas-console.spec +++ b/php-laminas-console.spec @@ -1,4 +1,4 @@ -# remirepo/Fedora spec file for php-zendframework-zend-console +# remirepo/Fedora spec file for php-laminas-console # # 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 95817ae78f73c48026972e350a2ecc31c6d9f9ae +%global gh_commit 478a6ceac3e31fb38d6314088abda8b239ee23a5 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -%global gh_owner zendframework -%global gh_project zend-console +%global gh_owner laminas +%global gh_project laminas-console +%global zf_name zend-console %global php_home %{_datadir}/php +%global namespace Laminas %global library Console %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.8.0 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 @@ -41,49 +43,49 @@ BuildRequires: php-spl BuildRequires: php-xml # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -BuildRequires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1 with php-autoloader(%{gh_owner}/zend-stdlib) < 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.23 || ^6.4.3", -# "zendframework/zend-coding-standard": "~1.0.0", -# "zendframework/zend-filter": "^2.7.2", -# "zendframework/zend-json": "^2.6 || ^3.0", -# "zendframework/zend-validator": "^2.10.1" -BuildRequires: (php-autoloader(%{gh_owner}/zend-filter) >= 2.7.2 with php-autoloader(%{gh_owner}/zend-filter) < 3) -BuildRequires: (php-autoloader(%{gh_owner}/zend-json) >= 2.6 with php-autoloader(%{gh_owner}/zend-json) < 4) -BuildRequires: (php-autoloader(%{gh_owner}/zend-validator) >= 2.10.1 with php-autoloader(%{gh_owner}/zend-validator) < 3) -# remirepo:10 +# "laminas/laminas-coding-standard": "~1.0.0", +# "laminas/laminas-filter": "^2.7.2", +# "laminas/laminas-json": "^2.6 || ^3.0", +# "laminas/laminas-validator": "^2.10.1", +# "phpunit/phpunit": "^5.7.23 || ^6.4.3" +BuildRequires: (php-autoloader(%{gh_owner}/laminas-filter) >= 2.7.2 with php-autoloader(%{gh_owner}/laminas-filter) < 3) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-json) >= 2.6 with php-autoloader(%{gh_owner}/laminas-json) < 4) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-validator) >= 2.10.1 with php-autoloader(%{gh_owner}/laminas-validator) < 3) +# remirepo:7 %else -BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) < 4 -BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1 -BuildRequires: php-autoloader(%{gh_owner}/zend-filter) < 3 -BuildRequires: php-autoloader(%{gh_owner}/zend-filter) >= 2.7.2 -BuildRequires: php-autoloader(%{gh_owner}/zend-json) < 4 -BuildRequires: php-autoloader(%{gh_owner}/zend-json) >= 2.6 -BuildRequires: php-autoloader(%{gh_owner}/zend-validator) < 3 -BuildRequires: php-autoloader(%{gh_owner}/zend-validator) >= 2.10.1 +BuildRequires: php-laminas-stdlib +BuildRequires: php-laminas-filter +BuildRequires: php-laminas-json +BuildRequires: php-laminas-validator +BuildRequires: php-laminas-zendframework-bridge %endif -BuildRequires: phpunit6 >= 6.4.3 +BuildRequires: phpunit6 >= 6.4.3 %endif # Autoloader BuildRequires: php-fedora-autoloader-devel # From composer, "require": { # "php": "^5.6 || ^7.0", -# "zendframework/zend-stdlib": "^3.2.1" +# "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-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1 with php-autoloader(%{gh_owner}/zend-stdlib) < 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-validator": "To support DefaultRouteMatcher usage", -# "zendframework/zend-filter": "To support DefaultRouteMatcher usage" -Suggests: php-autoloader(%{gh_owner}/zend-validator) -Suggests: php-autoloader(%{gh_owner}/zend-filter) +# "laminas/laminas-filter": "To support DefaultRouteMatcher usage", +# "laminas/laminas-validator": "To support DefaultRouteMatcher usage" +Suggests: php-autoloader(%{gh_owner}/laminas-validator) +Suggests: php-autoloader(%{gh_owner}/laminas-filter) # remirepo:4 %else -Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4 -Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1 +Requires: php-laminas-stdlib +Requires: php-laminas-zendframework-bridge %endif %endif # Autoloader @@ -96,16 +98,20 @@ Requires: php-reflection Requires: php-spl Requires: php-xml -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.8.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\Console is a component to design and implement console applications in PHP. +%{namespace}\Console is a component to design and implement console +applications in PHP. -Documentation: https://zendframework.github.io/%{gh_project}/ +Documentation: https://docs.laminas.dev/%{gh_project}/ %prep @@ -118,18 +124,32 @@ 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/Validator/autoload.php', - '%{php_home}/Zend/Filter/autoload.php', + '%{php_home}/%{namespace}/Validator/autoload.php', + '%{php_home}/%{namespace}/Filter/autoload.php', +]); +EOF + +cat << 'EOF' | tee zf.php + - 2.8.0-1 +- switch to Laminas + * Tue Feb 5 2019 Remi Collet - 2.8.0-1 - update to 2.8.0 - raise dependency on zend-stdlib 3.2.1 -- cgit