From 6eccc25d5c7df008f8f5ef0372c8d6283b91efed Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 10 Feb 2020 14:25:25 +0100 Subject: use Chronos 2.0.2 add Http component --- composer-chronos.json | 4 +- composer.json | 2 +- php-cakephp4.spec | 131 +++++++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 127 insertions(+), 10 deletions(-) diff --git a/composer-chronos.json b/composer-chronos.json index 03491e8..029a019 100644 --- a/composer-chronos.json +++ b/composer-chronos.json @@ -30,7 +30,7 @@ }, "require-dev": { "phpunit/phpunit": "^8.0", - "cakephp/cakephp-codesniffer": "dev-next", + "cakephp/cakephp-codesniffer": "^4.0", "phpbench/phpbench": "^1.0@dev" }, "autoload": { @@ -60,6 +60,6 @@ "cs-fix": "phpcbf", "benchmark": "phpbench run --report=chronos", "phpstan": "phpstan analyze -c phpstan.neon -l 3 src/", - "phpstan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan-shim:^0.11 && mv composer.backup composer.json" + "phpstan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^0.12 && mv composer.backup composer.json" } } diff --git a/composer.json b/composer.json index 675132a..4024299 100644 --- a/composer.json +++ b/composer.json @@ -110,7 +110,7 @@ "@phpstan", "@psalm" ], - "stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^0.12 psalm/phar:~3.8.0 && mv composer.backup composer.json" + "stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^0.12.7 psalm/phar:~3.8.0 && mv composer.backup composer.json" }, "config": { "sort-packages": true, diff --git a/php-cakephp4.spec b/php-cakephp4.spec index 1e67ad5..341e317 100644 --- a/php-cakephp4.spec +++ b/php-cakephp4.spec @@ -7,11 +7,11 @@ # Please, preserve the changelog entries # -# TODO: Http, Form, ORM +# TODO: Form, ORM # Auth, Command, Controller, Error, Mailer, Network, Routing, Shell, TestSuite, View # https://github.com/cakephp/cakephp/releases -%global gh_commit a5e8c076c54343e47cd47c7888705ad9818f5e0f +%global gh_commit 94435ab211196ce92014a83ec7bab4e385bf8ba3 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner cakephp %global gh_project cakephp @@ -22,13 +22,13 @@ %global major 4 # https://github.com/cakephp/chronos/releases -%global chronos_commit 779054d4c7ca88fc086b2cdd1f02aaf0df9ccb01 +%global chronos_commit e1044d27cabf12d19097b436001aa96a3c2e4b0a %global chronos_short %(c=%{chronos_commit}; echo ${c:0:7}) -%global chronos_version 2.0.1 +%global chronos_version 2.0.2 Name: php-%{pk_vendor}%{major} -Version: 4.0.2 -Release: 1%{?dist} +Version: 4.0.3 +Release: 2%{?dist} Summary: The CakePHP framework License: MIT @@ -348,6 +348,78 @@ CakePHP FileSystem Library: CakePHP filesystem convenience classes to help you work with files and folders. +%package http +Summary: CakePHP Http Library +# From composer.json "require": { +# "php": ">=7.2.0", +# "cakephp/core": "^4.0", +# "cakephp/event": "^4.0", +# "cakephp/utility": "^4.0", +# "composer/ca-bundle": "^1.2", +# "psr/http-client": "^1.0", +# "psr/http-server-handler": "^1.0", +# "psr/http-server-middleware": "^1.0", +# "zendframework/zend-diactoros": "^2.1", +# "zendframework/zend-httphandlerrunner": "^1.0" +Requires: php(language) >= 7.2 +Requires: php-composer(%{pk_vendor}/core) = %{version} +Requires: php-composer(%{pk_vendor}/event) = %{version} +Requires: php-composer(%{pk_vendor}/utility) = %{version} +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-composer(composer/ca-bundle) >= 1.2 with php-composer(composer/ca-bundle) < 2) +Requires: (php-composer(composer/ca-bundle) >= 1.2 with php-composer(composer/ca-bundle) < 2) +BuildRequires: (php-composer(psr/http-client) >= 1.0 with php-composer(psr/http-client) < 2) +Requires: (php-composer(psr/http-client) >= 1.0 with php-composer(psr/http-client) < 2) +BuildRequires: (php-composer(psr/http-server-handler) >= 1.0 with php-composer(psr/http-server-handler) < 2) +Requires: (php-composer(psr/http-server-handler) >= 1.0 with php-composer(psr/http-server-handler) < 2) +BuildRequires: (php-composer(psr/http-server-middleware) >= 1.0 with php-composer(psr/http-server-middleware) < 2) +Requires: (php-composer(psr/http-server-middleware) >= 1.0 with php-composer(psr/http-server-middleware) < 2) +BuildRequires: (php-composer(laminas/laminas-diactoros) >= 2.1 with php-composer(laminas/laminas-diactoros) < 3) +Requires: (php-composer(laminas/laminas-diactoros) >= 2.1 with php-composer(laminas/laminas-diactoros) < 3) +BuildRequires: (php-composer(laminas/laminas-httphandlerrunner) >= 1.0 with php-composer(laminas/laminas-httphandlerrunner) < 2) +Requires: (php-composer(laminas/laminas-httphandlerrunner) >= 1.0 with php-composer(laminas/laminas-httphandlerrunner) < 2) +# From composer.json "suggest": { +# "cakephp/cache": "To use cache session storage", +# "cakephp/orm": "To use database session storage" +Suggests: php-composer(%{pk_vendor}/cache) +Suggests: php-composer(%{pk_vendor}/orm) +%else +BuildRequires: php-composer-ca-bundle +Requires: php-composer-ca-bundle +BuildRequires: php-psr-http-client +Requires: php-psr-http-client +BuildRequires: php-psr-http-server-handler +Requires: php-psr-http-server-handler +BuildRequires: php-psr-http-server-middleware +Requires: php-psr-http-server-middleware +BuildRequires: php-laminas-diactoros2 +Requires: php-laminas-diactoros2 +BuildRequires: php-laminas-httphandlerrunner +Requires: php-laminas-httphandlerrunner +%endif +# From phpcompatinfo report +Requires: php-reflection +Requires: php-simplexml +Requires: php-curl +Requires: php-date +Requires: php-fileinfo +Requires: php-hash +Requires: php-json +Requires: php-libxml +Requires: php-mbstring +Requires: php-openssl +Requires: php-pcre +Requires: php-session +Requires: php-spl +Requires: php-zlib +Provides: php-composer(%{pk_vendor}/http) = %{version} + +%description http +CakePHP Http Library: + +CakePHP HTTP client and PSR7/15 middleware libraries. + + %package i18n Summary: CakePHP I18n Library # From composer.json "require": { @@ -503,6 +575,7 @@ require_once '%{php_home}/Fedora/Autoloader/autoload.php'; '%{php_home}/Aura/Intl/autoload.php', '%{php_home}/Psr/Log/autoload.php', '%{php_home}/Psr/SimpleCache/autoload.php', + '%{php_home}/Psr/Http/Client/autoload.php', '%{php_home}/Psr/Http/Message/autoload.php', '%{php_home}/Psr/Http/Server/autoload.php', '%{php_home}/Psr/Http/Server/middleware-autoload.php', @@ -625,6 +698,26 @@ require_once '%{php_home}/Fedora/Autoloader/autoload.php'; ]); EOF +: ===== Generate "http" autoloader +cat << 'EOF' | tee src/Http/autoload.php + - 4.0.3-2 +- use Chronos 2.0.2 +- add Http component + +* Mon Jan 27 2020 Remi Collet - 4.0.3-1 +- update to 4.0.3 + * Mon Jan 13 2020 Remi Collet - 4.0.2-1 - update to 4.0.2 - switch from Zend to Laminas -- cgit