diff options
author | Remi Collet <remi@remirepo.net> | 2019-01-04 07:08:09 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2019-01-04 07:08:09 +0100 |
commit | ec167f4c724898d125956cc420151dec1d3c43b2 (patch) | |
tree | 9c339ba3ad625ab70536b1700ab885f24c7a6a89 | |
parent | b9099038ea8c2917012515de452ba3901d3811fb (diff) |
update to 3.7.2
add log subpackage
database requires log
-rw-r--r-- | php-cakephp.spec | 64 | ||||
-rw-r--r-- | src/Database/composer.json | 6 |
2 files changed, 63 insertions, 7 deletions
diff --git a/php-cakephp.spec b/php-cakephp.spec index a9dadee..e083f8a 100644 --- a/php-cakephp.spec +++ b/php-cakephp.spec @@ -1,6 +1,6 @@ # remirepo/fedora spec file for php-cakephp # -# Copyright (c) 2018 Remi Collet +# Copyright (c) 2018-2019 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -8,7 +8,7 @@ # # https://github.com/cakephp/cakephp/releases -%global gh_commit 1f6fd21ca27ffc88fa88506a400b94a809e29254 +%global gh_commit eae26792654fece99bb121420e179f0a0efcb2ae %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner cakephp %global gh_project cakephp @@ -23,7 +23,7 @@ %global chronos_version 1.2.3 Name: php-%{pk_vendor} -Version: 3.7.1 +Version: 3.7.2 Release: 1%{?dist} Summary: The CakePHP framework @@ -165,10 +165,12 @@ Summary: CakePHP Database Library # "cakephp/cache": "^3.6.0", # "cakephp/core": "^3.6.0", # "cakephp/datasource": "^3.6.0" +# "cakephp/log": "^3.6.0" Requires: php(language) >= 5.6 Requires: php-composer(%{pk_vendor}/cache) = %{version} Requires: php-composer(%{pk_vendor}/core) = %{version} Requires: php-composer(%{pk_vendor}/datasource) = %{version} +Requires: php-composer(%{pk_vendor}/log) = %{version} # From phpcompatinfo report Requires: php-pdo Requires: php-ctype @@ -220,6 +222,30 @@ datasources and traits to help you quickly implement the interfaces provided by this package. +%package log +Summary: logging library +# From composer.json "require": { +# "php": ">=5.6.0", +# "cakephp/core": "^3.6.0", +# "psr/log": "^1.0.0" +Requires: php(language) >= 5.6 +Requires: php-composer(%{pk_vendor}/core) = %{version} +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Requires: (php-composer(psr/log) >= 1.0.0 with php-composer(psr/log) < 2) +%else +Requires: php-PsrLog >= 1.0.0 +%endif +# From phpcompatinfo report +Requires: php-date +Requires: php-json +Requires: php-posix +Requires: php-spl +Provides: php-composer(%{pk_vendor}/log) = %{version} + +%description log +CakePHP logging library with support for multiple different streams. + + %package utility Summary: CakePHP Utility Classes # From composer.json "require": { @@ -327,6 +353,7 @@ require_once '%{php_home}/Fedora/Autoloader/autoload.php'; dirname(__DIR__) . '/Cache/autoload.php', dirname(__DIR__) . '/Core/autoload.php', dirname(__DIR__) . '/Datasource/autoload.php', + dirname(__DIR__) . '/Log/autoload.php', ]); EOF @@ -341,6 +368,18 @@ require_once '%{php_home}/Fedora/Autoloader/autoload.php'; ]); EOF +: ===== Generate "log" autoloader +cat << 'EOF' | tee src/Log/autoload.php +<?php +require_once '%{php_home}/Fedora/Autoloader/autoload.php'; + +\Fedora\Autoloader\Autoload::addPsr4('Cake\\Log\\', __DIR__); +\Fedora\Autoloader\Dependencies::required([ + dirname(__DIR__) . '/Core/autoload.php', + '%{php_home}/Psr/Log/autoload.php', +]); +EOF + : ===== Generate "utility" autoloader cat << 'EOF' | tee src/Utility/autoload.php <?php @@ -362,6 +401,7 @@ cp -pr src/Collection %{buildroot}%{php_home}/%{ns_vendor}/ cp -pr src/Core %{buildroot}%{php_home}/%{ns_vendor}/ cp -pr src/Database %{buildroot}%{php_home}/%{ns_vendor}/ cp -pr src/Datasource %{buildroot}%{php_home}/%{ns_vendor}/ +cp -pr src/Log %{buildroot}%{php_home}/%{ns_vendor}/ cp -pr src/Utility %{buildroot}%{php_home}/%{ns_vendor}/ @@ -389,6 +429,10 @@ require "%{buildroot}%{php_home}/%{ns_vendor}/Datasource/autoload.php"; exit (class_exists("Cake\\Datasource\\RulesChecker") ? 0 : 1); ' php -r ' +require "%{buildroot}%{php_home}/%{ns_vendor}/Log/autoload.php"; +exit (class_exists("Cake\\Log\\Log") ? 0 : 1); +' +php -r ' require "%{buildroot}%{php_home}/%{ns_vendor}/Utility/autoload.php"; exit (class_exists("Cake\\Utility\\Hash") ? 0 : 1); ' @@ -404,6 +448,7 @@ phpunit tests/TestCase/Collection --verbose || ret=1 phpunit tests/TestCase/Database --filter '^((?!(testMarshal)).)*$' --verbose || ret=1 phpunit tests/TestCase/Datasource --verbose || ret=1 %endif +phpunit tests/TestCase/Log --verbose || ret=1 phpunit tests/TestCase/Utility --verbose || ret=1 exit $ret %else @@ -454,6 +499,14 @@ exit $ret %{php_home}/%{ns_vendor}/Datasource %exclude %{php_home}/%{ns_vendor}/Datasource/*.md +%files log +%{!?_licensedir:%global license %%doc} +%license src/Log/LICENSE.txt +%doc src/Log/composer.json +%doc src/Log/*md +%{php_home}/%{ns_vendor}/Log +%exclude %{php_home}/%{ns_vendor}/Log/*.md + %files utility %{!?_licensedir:%global license %%doc} %license src/Utility/LICENSE.txt @@ -464,6 +517,11 @@ exit $ret %changelog +* Fri Jan 4 2019 Remi Collet <remi@remirepo.net> - 3.7.2-1 +- update to 3.7.2 +- add log subpackage +- database requires log + * Tue Dec 18 2018 Remi Collet <remi@remirepo.net> - 3.7.1-1 - update to 3.7.1 diff --git a/src/Database/composer.json b/src/Database/composer.json index 3de6513..c197115 100644 --- a/src/Database/composer.json +++ b/src/Database/composer.json @@ -27,10 +27,8 @@ "php": ">=5.6.0", "cakephp/cache": "^3.6.0", "cakephp/core": "^3.6.0", - "cakephp/datasource": "^3.6.0" - }, - "suggest": { - "cakephp/log": "Require this if you want to use the built-in query logger" + "cakephp/datasource": "^3.6.0", + "cakephp/log": "^3.6.0" }, "autoload": { "psr-4": { |