From 5fb9393b9a99aaf4393b2e7f2e0c4e2019ad182e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 16 Dec 2019 13:44:43 +0100 Subject: add Vallidation --- php-cakephp4.spec | 106 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 85 insertions(+), 21 deletions(-) (limited to 'php-cakephp4.spec') diff --git a/php-cakephp4.spec b/php-cakephp4.spec index 368e015..f8e6fad 100644 --- a/php-cakephp4.spec +++ b/php-cakephp4.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # -# TODO: Http, Form, ORM, Validation +# TODO: Http, Form, ORM # Auth, Command, Controller, Error, Mailer, Network, Routing, Shell, TestSuite, View # https://github.com/cakephp/cakephp/releases @@ -39,6 +39,7 @@ Source2: %{name}-chronos-%{chronos_version}-%{chronos_short}.tgz Source3: makesrc2.sh BuildArch: noarch +BuildRequires: php-cli %if %{with_tests} # For tests BuildRequires: php(language) >= 7.2 @@ -63,13 +64,10 @@ BuildRequires: php-spl BuildRequires: phpunit8 >= 8.4.0 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(mikey179/vfsstream) >= 1.6 with php-composer(mikey179/vfsstream) < 6) -BuildRequires: (php-composer(aura/intl) >= 3.0.0 with php-composer(aura/intl) < 4) -BuildRequires: (php-composer(psr/log) >= 1.0.0 with php-composer(psr/log) < 2) BuildRequires: (php-composer(zendframework/zend-diactoros) >= 1.4.0 with php-composer(zendframework/zend-diactoros) < 2) +BuildRequires: glibc-langpack-fr %else BuildRequires: php-mikey179-vfsstream >= 1.6 -BuildRequires: php-aura-intl >= 3.0.0 -BuildRequires: php-PsrLog >= 1.0.0 BuildRequires: php-zendframework-zend-diactoros >= 1.4.0 %endif %endif @@ -380,8 +378,10 @@ Summary: logging library Requires: php(language) >= 7.2 Requires: php-composer(%{pk_vendor}/core) = %{version} %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-composer(psr/log) >= 1.0.0 with php-composer(psr/log) < 2) Requires: (php-composer(psr/log) >= 1.0.0 with php-composer(psr/log) < 2) %else +BuildRequires: php-PsrLog >= 1.0.0 Requires: php-PsrLog >= 1.0.0 %endif # From phpcompatinfo report @@ -422,6 +422,40 @@ This library provides a range of utility classes that are used throughout the CakePHP framework. +%package validation +Summary: CakePHP Validation Classes +# From composer.json "require": { +# "php": ">=7.2.0", +# "cakephp/core": "^4.0", +# "cakephp/utility": "^4.0", +# "psr/http-message": "^1.0.0" +Requires: php(language) >= 7.2 +Requires: php-composer(%{pk_vendor}/core) = %{version} +Requires: php-composer(%{pk_vendor}/utility) = %{version} +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-composer(psr/http-message) >= 1.0.0 with php-composer(psr/http-message) < 2) +Requires: (php-composer(psr/http-message) >= 1.0.0 with php-composer(psr/http-message) < 2) +%else +BuildRequires: php-php-psr-http-message >= 1.0.0 +Requires: php-php-psr-http-message >= 1.0.0 +%endif +# From phpcompatinfo report +Requires: php-reflection +Requires: php-fileinfo +Requires: php-filter +Requires: php-intl +Requires: php-mbstring +Requires: php-pcre +Requires: php-spl +Provides: php-composer(%{pk_vendor}/validation) = %{version} + +%description validation +CakePHP validation Classes: + +The validation library in CakePHP provides features to build validators +that can validate arbitrary arrays of data with ease. + + %prep %setup -q -n %{gh_project}-%{gh_commit} -a 2 mv chronos-*/src src/Chronos @@ -455,6 +489,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/Message/autoload.php', '%{php_home}/Zend/Diactoros/autoload.php', '%{php_home}/org/bovigo/vfs/autoload.php', ]); @@ -610,16 +645,29 @@ require_once '%{php_home}/Fedora/Autoloader/autoload.php'; EOF +: ===== Generate "validation" autoloader +cat << 'EOF' | tee src/Validation/autoload.php + - 4.0.0-1 - update to 4.0.0 - raise dependency on PHP 7.2 - use Chronos 2.0.1 -- add Chronos, Console, Filesystem and I18n +- add Chronos, Console, Filesystem, I18n and Validation * Mon Dec 9 2019 Remi Collet - 3.8.7-1 - update to 3.8.7 -- cgit