diff options
author | Remi Collet <remi@remirepo.net> | 2020-01-14 15:14:50 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-01-14 15:14:50 +0100 |
commit | bf6cc37cdde1321caf78d815fb8c42186124d49b (patch) | |
tree | eca07f11cd484884778a5ddd863d231d8ce57dc8 | |
parent | 61aad2206d8cc6740689a97b5b14f10af1e59066 (diff) |
switch to Laminas
-rw-r--r-- | composer.json | 55 | ||||
-rw-r--r-- | php-laminas-soap.spec | 152 |
2 files changed, 125 insertions, 82 deletions
diff --git a/composer.json b/composer.json index 40b5f49..1122927 100644 --- a/composer.json +++ b/composer.json @@ -1,44 +1,54 @@ { - "name": "zendframework/zend-soap", + "name": "laminas/laminas-soap", "description": " ", "license": "BSD-3-Clause", "keywords": [ - "zf2", + "laminas", "soap" ], - "homepage": "https://github.com/zendframework/zend-soap", - "autoload": { - "psr-4": { - "Zend\\Soap\\": "src/" + "homepage": "https://laminas.dev", + "support": { + "docs": "https://docs.laminas.dev/laminas-soap/", + "issues": "https://github.com/laminas/laminas-soap/issues", + "source": "https://github.com/laminas/laminas-soap", + "rss": "https://github.com/laminas/laminas-soap/releases.atom", + "chat": "https://laminas.dev/chat", + "forum": "https://discourse.laminas.dev" + }, + "config": { + "sort-packages": true + }, + "extra": { + "branch-alias": { + "dev-master": "2.7.x-dev", + "dev-develop": "2.8.x-dev" } }, "require": { "php": "^5.6 || ^7.0", "ext-soap": "*", - "zendframework/zend-server": "^2.6.1", - "zendframework/zend-stdlib": "^2.7 || ^3.0", - "zendframework/zend-uri": "^2.5.2" + "laminas/laminas-server": "^2.6.1", + "laminas/laminas-stdlib": "^2.7 || ^3.0", + "laminas/laminas-uri": "^2.5.2", + "laminas/laminas-zendframework-bridge": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.21 || ^6.3", - "zendframework/zend-coding-standard": "~1.0.0", - "zendframework/zend-config": "^2.6", - "zendframework/zend-http": "^2.5.4" + "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-config": "^2.6", + "laminas/laminas-http": "^2.5.4", + "phpunit/phpunit": "^5.7.21 || ^6.3" }, "suggest": { - "zendframework/zend-http": "Zend\\Http component" + "laminas/laminas-http": "Laminas\\Http component" }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "branch-alias": { - "dev-master": "2.7.x-dev", - "dev-develop": "2.8.x-dev" + "autoload": { + "psr-4": { + "Laminas\\Soap\\": "src/" } }, "autoload-dev": { "psr-4": { - "ZendTest\\Soap\\": "test/" + "LaminasTest\\Soap\\": "test/" }, "files": [ "test/TestAsset/commontypes.php", @@ -54,5 +64,8 @@ "cs-fix": "phpcbf", "test": "phpunit", "test-coverage": "phpunit --coverage-clover clover.xml" + }, + "replace": { + "zendframework/zend-soap": "self.version" } } diff --git a/php-laminas-soap.spec b/php-laminas-soap.spec index c41ea20..67c94cc 100644 --- a/php-laminas-soap.spec +++ b/php-laminas-soap.spec @@ -1,4 +1,4 @@ -# remirepo/Fedora spec file for php-zendframework-zend-soap +# remirepo/Fedora spec file for php-laminas-soap # # 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 8762d79efa220d82529c43ce08d70554146be645 +%global gh_commit 34f91d5c4c0a78bc5689cca2d1eaf829b27edd72 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -%global gh_owner zendframework -%global gh_project zend-soap +%global gh_owner laminas +%global gh_project laminas-soap +%global zf_name zend-soap %global php_home %{_datadir}/php +%global namespace Laminas %global library Soap %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: 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 @@ -41,28 +43,25 @@ BuildRequires: php-soap BuildRequires: php-spl # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -BuildRequires: (php-autoloader(%{gh_owner}/zend-server) >= 2.6.1 with php-autoloader(%{gh_owner}/zend-server) < 3) -BuildRequires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7 with php-autoloader(%{gh_owner}/zend-stdlib) < 4) -BuildRequires: (php-autoloader(%{gh_owner}/zend-uri) >= 2.5.2 with php-autoloader(%{gh_owner}/zend-uri) < 3) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-server) >= 2.6.1 with php-autoloader(%{gh_owner}/laminas-server) < 3) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.0 with php-autoloader(%{gh_owner}/laminas-stdlib) < 4) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-uri) >= 2.5.2 with php-autoloader(%{gh_owner}/laminas-uri) < 3) +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.21 || ^6.3", -# "zendframework/zend-coding-standard": "~1.0.0", -# "zendframework/zend-config": "^2.6", -# "zendframework/zend-http": "^2.5.4" -BuildRequires: (php-autoloader(%{gh_owner}/zend-config) >= 2.6 with php-autoloader(%{gh_owner}/zend-config) < 3) -BuildRequires: (php-autoloader(%{gh_owner}/zend-http) >= 2.5.4 with php-autoloader(%{gh_owner}/zend-http) < 3) -# remirepo:12 +# "laminas/laminas-coding-standard": "~1.0.0", +# "laminas/laminas-config": "^2.6", +# "laminas/laminas-http": "^2.5.4", +# "phpunit/phpunit": "^5.7.21 || ^6.3" +BuildRequires: (php-autoloader(%{gh_owner}/laminas-config) >= 2.6 with php-autoloader(%{gh_owner}/laminas-config) < 3) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-http) >= 2.5.4 with php-autoloader(%{gh_owner}/laminas-http) < 3) +# remirepo:8 %else -BuildRequires: php-autoloader(%{gh_owner}/zend-server) < 3 -BuildRequires: php-autoloader(%{gh_owner}/zend-server) >= 2.6.1 -BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) < 4 -BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7 -BuildRequires: php-autoloader(%{gh_owner}/zend-uri) < 3 -BuildRequires: php-autoloader(%{gh_owner}/zend-uri) >= 2.5.2 -BuildRequires: php-autoloader(%{gh_owner}/zend-config) < 3 -BuildRequires: php-autoloader(%{gh_owner}/zend-config) >= 2.6 -BuildRequires: php-autoloader(%{gh_owner}/zend-http) < 3 -BuildRequires: php-autoloader(%{gh_owner}/zend-http) >= 2.5.4 +BuildRequires: php-laminas-server +BuildRequires: php-laminas-stdlib +BuildRequires: php-laminas-uri +BuildRequires: php-laminas-zendframework-bridge +BuildRequires: php-laminas-config +BuildRequires: php-laminas-http %endif BuildRequires: phpunit6 >= 6.3 %endif @@ -72,48 +71,55 @@ BuildRequires: php-fedora-autoloader-devel # From composer, "require": { # "php": "^5.6 || ^7.0", # "ext-soap": "*", -# "zendframework/zend-server": "^2.6.1", -# "zendframework/zend-stdlib": "^2.7 || ^3.0", -# "zendframework/zend-uri": "^2.5.2" +# "laminas/laminas-server": "^2.6.1", +# "laminas/laminas-stdlib": "^2.7 || ^3.0", +# "laminas/laminas-uri": "^2.5.2", +# "laminas/laminas-zendframework-bridge": "^1.0" Requires: php(language) >= 5.6 Requires: php-soap %if ! %{bootstrap} # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -Requires: (php-autoloader(%{gh_owner}/zend-server) >= 2.6.1 with php-autoloader(%{gh_owner}/zend-server) < 3) -Requires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7 with php-autoloader(%{gh_owner}/zend-stdlib) < 4) -Requires: (php-autoloader(%{gh_owner}/zend-uri) >= 2.5.2 with php-autoloader(%{gh_owner}/zend-uri) < 3) -Suggests: php-autoloader(%{gh_owner}/zend-http) +Requires: (php-autoloader(%{gh_owner}/laminas-server) >= 2.6.1 with php-autoloader(%{gh_owner}/laminas-server) < 3) +Requires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.0 with php-autoloader(%{gh_owner}/laminas-stdlib) < 4) +Requires: (php-autoloader(%{gh_owner}/laminas-uri) >= 2.5.2 with php-autoloader(%{gh_owner}/laminas-uri) < 3) +Requires: (php-autoloader(%{gh_owner}/laminas-zendframework-bridge) >= 1.0 with php-autoloader(%{gh_owner}/laminas-zendframework-bridge) < 2) +# From composer, "suggest": { +# "laminas/laminas-http": "Laminas\\Http component" +Suggests: php-autoloader(%{gh_owner}/laminas-http) # remirepo:8 %else -Requires: php-autoloader(%{gh_owner}/zend-server) < 3 -Requires: php-autoloader(%{gh_owner}/zend-server) >= 2.6.1 -Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4 -Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7 -Requires: php-autoloader(%{gh_owner}/zend-uri) < 3 -Requires: php-autoloader(%{gh_owner}/zend-uri) >= 2.5.2 +Requires: php-laminas-server +Requires: php-laminas-stdlib +Requires: php-laminas-uri +Requires: php-laminas-zendframework-bridge %endif %endif # Autoloader Requires: php-composer(fedora/autoloader) -# From phpcompatinfo report for version 2.5.1 +# From phpcompatinfo report for version 2.8.0 Requires: php-curl Requires: php-dom Requires: php-libxml Requires: php-pcre Requires: php-spl -Obsoletes: php-ZendFramework2-%{library} < 2.5 -Provides: php-ZendFramework2-%{library} = %{version} -Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} +Obsoletes: php-ZendFramework2-%{library} < 2.5 +Provides: php-ZendFramework2-%{library} = %{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\Soap is a component to manage the SOAP protocol in order +%{namespace}\Soap is a component to manage the SOAP protocol in order to design client or server PHP application. -Documentation: https://zendframework.github.io/%{gh_project}/ +Documentation: https://docs.laminas.dev/%{gh_project}/ %prep @@ -126,19 +132,33 @@ 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/Server/autoload.php', - '%{php_home}/Zend/Stdlib/autoload.php', - '%{php_home}/Zend/Uri/autoload.php', + '%{php_home}/%{namespace}/Server/autoload.php', + '%{php_home}/%{namespace}/Stdlib/autoload.php', + '%{php_home}/%{namespace}/Uri/autoload.php', ]); \Fedora\Autoloader\Dependencies::optional([ - '%{php_home}/Zend/Http/autoload.php', + '%{php_home}/%{namespace}/Http/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 @@ -146,19 +166,25 @@ 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/Config/autoload.php', - '%{php_home}/Zend/Http/autoload.php', + '%{php_home}/%{namespace}/Config/autoload.php', + '%{php_home}/%{namespace}/Http/autoload.php', + dirname(__DIR__) . '/test/TestAsset/commontypes.php', + dirname(__DIR__) . '/test/TestAsset/call_user_func.php', ]); -\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\%{library}\\', dirname(__DIR__) . '/test'); - -require_once 'test/TestAsset/commontypes.php'; -require_once 'test/TestAsset/call_user_func.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}\\Server") ? 0 : 1); +' + +: upstream test suite ret=0 -for cmd in php php71 php72; do +for cmd in php php72 php73 php74; do if which $cmd; then $cmd %{_bindir}/phpunit6 || ret=1 fi @@ -176,9 +202,13 @@ exit $ret %doc *.md %doc composer.json %{php_home}/Zend/%{library} +%{php_home}/%{namespace}/%{library} %changelog +* Tue Jan 14 2020 Remi Collet <remi@remirepo.net> - 2.8.0-1 +- switch to Laminas + * Thu May 2 2019 Remi Collet <remi@remirepo.net> - 2.8.0-1 - update to 2.8.0 - use range dependencies |