diff options
-rw-r--r-- | composer-chronos.json | 117 | ||||
-rw-r--r-- | composer.json | 42 | ||||
-rw-r--r-- | php-cakephp4.spec | 375 | ||||
-rw-r--r-- | src/Cache/composer.json | 9 | ||||
-rw-r--r-- | src/Collection/composer.json | 2 | ||||
-rw-r--r-- | src/Console/composer.json | 42 | ||||
-rw-r--r-- | src/Core/composer.json | 4 | ||||
-rw-r--r-- | src/Database/composer.json | 11 | ||||
-rw-r--r-- | src/Datasource/composer.json | 6 | ||||
-rw-r--r-- | src/Event/composer.json | 4 | ||||
-rw-r--r-- | src/Filesystem/composer.json | 4 | ||||
-rw-r--r-- | src/Form/composer.json | 6 | ||||
-rw-r--r-- | src/Http/composer.json | 48 | ||||
-rw-r--r-- | src/I18n/composer.json | 6 | ||||
-rw-r--r-- | src/Log/composer.json | 7 | ||||
-rw-r--r-- | src/ORM/composer.json | 19 | ||||
-rw-r--r-- | src/Utility/composer.json | 4 | ||||
-rw-r--r-- | src/Validation/composer.json | 6 |
18 files changed, 502 insertions, 210 deletions
diff --git a/composer-chronos.json b/composer-chronos.json index d63b284..03491e8 100644 --- a/composer-chronos.json +++ b/composer-chronos.json @@ -1,62 +1,65 @@ { - "name": "cakephp/chronos", - "type": "library", - "description": "A simple API extension for DateTime.", - "keywords": [ - "date", - "time", - "DateTime" - ], - "homepage": "http://cakephp.org", - "license": "MIT", - "authors": [ - { - "name": "Brian Nesbitt", - "email": "brian@nesbot.com", - "homepage": "http://nesbot.com" + "name": "cakephp/chronos", + "type": "library", + "description": "A simple API extension for DateTime.", + "keywords": [ + "date", + "time", + "DateTime" + ], + "homepage": "http://cakephp.org", + "license": "MIT", + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "http://nesbot.com" + }, + { + "name": "The CakePHP Team", + "homepage": "http://cakephp.org" + } + ], + "support": { + "issues": "https://github.com/cakephp/chronos/issues", + "irc": "irc://irc.freenode.org/cakephp", + "source": "https://github.com/cakephp/chronos" }, - { - "name": "The CakePHP Team", - "homepage": "http://cakephp.org" - } - ], - "support": { - "issues": "https://github.com/cakephp/chronos/issues", - "irc": "irc://irc.freenode.org/cakephp", - "source": "https://github.com/cakephp/chronos" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "phpunit/phpunit": "<6.0 || ^7.0", - "athletic/athletic": "~0.1", - "cakephp/cakephp-codesniffer": "^3.0", - "phpbench/phpbench": "@dev" - }, - "autoload": { - "psr-4": { - "Cake\\Chronos\\": "src/" + "require": { + "php": ">=7.2" }, - "files": ["src/carbon_compat.php"] - }, - "autoload-dev": { - "psr-4": { - "Cake\\Chronos\\Test\\": "tests/" + "require-dev": { + "phpunit/phpunit": "^8.0", + "cakephp/cakephp-codesniffer": "dev-next", + "phpbench/phpbench": "^1.0@dev" }, - "files": ["tests/TestCase.php"] - }, - "scripts": { - "check": [ - "@test", - "@cs-check", - "@phpstan" - ], - "test": "phpunit", - "cs-check": "phpcs", - "cs-fix": "phpcbf", - "bench": "phpbench run", - "phpstan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan-shim:^0.11 && mv composer.backup composer.json", - "phpstan": "phpstan analyze -c phpstan.neon -l 3 src/" - } + "autoload": { + "psr-4": { + "Cake\\Chronos\\": "src/" + }, + "files": [ + "src/carbon_compat.php" + ] + }, + "autoload-dev": { + "psr-4": { + "Cake\\Chronos\\Test\\": "tests/" + }, + "files": [ + "tests/TestCase.php" + ] + }, + "scripts": { + "check": [ + "@test", + "@cs-check", + "@phpstan" + ], + "test": "phpunit", + "cs-check": "phpcs", + "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" + } } diff --git a/composer.json b/composer.json index 12543c7..cab39fb 100644 --- a/composer.json +++ b/composer.json @@ -28,24 +28,31 @@ "source": "https://github.com/cakephp/cakephp" }, "require": { - "php": ">=5.6.0", + "php": ">=7.2.0", "ext-intl": "*", "ext-mbstring": "*", - "cakephp/chronos": "^1.0.1", "aura/intl": "^3.0.0", + "cakephp/chronos": "^2.0", + "composer/ca-bundle": "^1.0", + "psr/http-client": "^1.0", + "psr/http-server-handler": "^1.0", + "psr/http-server-middleware": "^1.0", "psr/log": "^1.0.0", "psr/simple-cache": "^1.0.0", - "zendframework/zend-diactoros": "^1.4.0" + "zendframework/zend-diactoros": "^2.0", + "zendframework/zend-httphandlerrunner": "^1.0" }, "suggest": { "ext-openssl": "To use Security::encrypt() or have secure CSRF token generation.", "ext-curl": "To enable more efficient network calls in Http\\Client.", - "lib-ICU": "The intl PHP library, to use Text::transliterate() or Text::slug()" + "lib-ICU": "The intl PHP library, to use Text::transliterate() or Text::slug()", + "paragonie/csp-builder": "CSP builder, to use the CSP Middleware" }, "require-dev": { - "cakephp/cakephp-codesniffer": "^3.0", - "cakephp/chronos": "^1.2.1", - "phpunit/phpunit": "^5.7.14|^6.0" + "cakephp/cakephp-codesniffer": "dev-next", + "mikey179/vfsstream": "^1.6", + "paragonie/csp-builder": "^2.3", + "phpunit/phpunit": "~8.4.0" }, "autoload": { "psr-4": { @@ -68,28 +75,26 @@ "TestPluginTwo\\": "tests/test_app/Plugin/TestPluginTwo/src/", "Company\\TestPluginThree\\": "tests/test_app/Plugin/Company/TestPluginThree/src/", "Company\\TestPluginThree\\Test\\": "tests/test_app/Plugin/Company/TestPluginThree/tests/", - "ParentPlugin\\": "tests/test_app/Plugin/ParentPlugin/src/", - "PluginJs\\": "tests/test_app/Plugin/PluginJs/src/" + "ParentPlugin\\": "tests/test_app/Plugin/ParentPlugin/src/" } }, "replace": { "cakephp/cache": "self.version", "cakephp/collection": "self.version", + "cakephp/console": "self.version", "cakephp/core": "self.version", "cakephp/datasource": "self.version", "cakephp/database": "self.version", "cakephp/event": "self.version", "cakephp/filesystem": "self.version", "cakephp/form": "self.version", + "cakephp/http": "self.version", "cakephp/i18n": "self.version", "cakephp/log": "self.version", "cakephp/orm": "self.version", "cakephp/utility": "self.version", "cakephp/validation": "self.version" }, - "conflict": { - "phpunit/phpunit": "<5.7" - }, "scripts": { "check": [ "@cs-check", @@ -99,7 +104,16 @@ "cs-fix": "phpcbf --colors --parallel=16 -p src/ tests/", "test": "phpunit", "test-coverage": "phpunit --coverage-clover=clover.xml", - "phpstan": "phpstan analyse -c phpstan.neon -l 2 src/", - "phpstan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan-shim:^0.11 && mv composer.backup composer.json" + "phpstan": "phpstan.phar analyse src/", + "psalm": "psalm.phar --show-info=false", + "stan": [ + "@phpstan", + "@psalm" + ], + "stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^0.12.0 psalm/phar:^3.7 && mv composer.backup composer.json" + }, + "config": { + "sort-packages": true, + "process-timeout": 900 } } diff --git a/php-cakephp4.spec b/php-cakephp4.spec index 5141dc4..a11721a 100644 --- a/php-cakephp4.spec +++ b/php-cakephp4.spec @@ -7,8 +7,11 @@ # Please, preserve the changelog entries # +# TODO: Http, Form, I18n, ORM, Validation +# Auth, Command, Controller, Error, Mailer, Network, Routing, Shell, TestSuite, View + # https://github.com/cakephp/cakephp/releases -%global gh_commit bf96319a3688c191742d4a3a1680740abef1b371 +%global gh_commit 767b164747df789db8c0fbcf3bcf9eaf3be55b38 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner cakephp %global gh_project cakephp @@ -16,14 +19,15 @@ %global ns_vendor Cake %global php_home %{_datadir}/php %global with_tests 0%{!?_without_tests:1} +%global major 4 # https://github.com/cakephp/chronos/releases -%global chronos_commit ba2bab98849e7bf29b02dd634ada49ab36472959 +%global chronos_commit 779054d4c7ca88fc086b2cdd1f02aaf0df9ccb01 %global chronos_short %(c=%{chronos_commit}; echo ${c:0:7}) -%global chronos_version 1.3.0 +%global chronos_version 2.0.1 -Name: php-%{pk_vendor} -Version: 3.8.7 +Name: php-%{pk_vendor}%{major} +Version: 4.0.0 Release: 1%{?dist} Summary: The CakePHP framework @@ -37,7 +41,7 @@ Source3: makesrc2.sh BuildArch: noarch %if %{with_tests} # For tests -BuildRequires: php(language) >= 5.6 +BuildRequires: php(language) >= 7.2 BuildRequires: php-ctype BuildRequires: php-date BuildRequires: php-dom @@ -52,15 +56,18 @@ BuildRequires: php-reflection BuildRequires: php-simplexml BuildRequires: php-spl # From composer.json, "require-dev": { -# "cakephp/cakephp-codesniffer": "^3.0", -# "cakephp/chronos": "^1.2.1", -# "phpunit/phpunit": "^5.7.14|^6.0" -BuildRequires: php-composer(phpunit/phpunit) +# "cakephp/cakephp-codesniffer": "dev-next", +# "mikey179/vfsstream": "^1.6", +# "paragonie/csp-builder": "^2.3", +# "phpunit/phpunit": "~8.4.0" +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) %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 @@ -79,10 +86,10 @@ to flexibility. %package cache Summary: CakePHP Collection Library # From composer.json "require": { -# "php": ">=5.6.0", -# "psr/simple-cache": "^1.0.0", -# "cakephp/core": "^3.6.0" -Requires: php(language) >= 5.6 +# "php": ">=7.2.0", +# "cakephp/core": "^4.0", +# "psr/simple-cache": "^1.0.0" +Requires: php(language) >= 7.2 Requires: php-composer(%{pk_vendor}/core) = %{version} # from main composer.json %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 @@ -117,11 +124,29 @@ The caching backends supported are: * Xcache +%package chronos +Summary: CakePHP Chronos Library +# From composer.json "require": { +# "php": ">=7.2", +Requires: php(language) >= 7.2 +# From phpcompatinfo report +Requires: php-ctype +Requires: php-date +Requires: php-pcre +Requires: php-spl +Provides: php-composer(%{pk_vendor}/chronos) = %{version} + +%description chronos +CakePHP Chronos Library: + +A simple API extension for DateTime. + + %package collection Summary: CakePHP Collection Library # From composer.json "require": { -# "php": ">=5.6.0", -Requires: php(language) >= 5.6 +# "php": ">=7.2.0", +Requires: php(language) >= 7.2 # From phpcompatinfo report Requires: php-spl Provides: php-composer(%{pk_vendor}/collection) = %{version} @@ -134,12 +159,43 @@ Traversable objects. If you have ever used underscore.js, you have an idea of what you can expect from the collection classes. +%package console +Summary: CakePHP Console Library +# From composer.json "require": { +# "php": ">=7.2.0", +# "cakephp/core": "^4.0", +# "cakephp/event": "^4.0", +# "cakephp/filesystem": "^4.0", +# "cakephp/log": "^4.0", +# "cakephp/utility": "^4.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}/filesystem) = %{version} +Requires: php-composer(%{pk_vendor}/log) = %{version} +Requires: php-composer(%{pk_vendor}/utility) = %{version} +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Recommends: php-composer(%{pk_vendor}/datasource) = %{version} +Recommends: php-composer(%{pk_vendor}/orm) = %{version} +%endif +# From phpcompatinfo report +Requires: php-spl +Provides: php-composer(%{pk_vendor}/console) = %{version} + +%description console +CakePHP Console Library: + +This library provides a framework for building command line applications +from a set of commands. It provides abstractions for defining option and +argument parsers, and dispatching commands. + + %package core Summary: CakePHP Framework Core classes # From composer.json "require": { -# "php": ">=5.6.0", -# "cakephp/utility": "^3.6.0" -Requires: php(language) >= 5.6 +# "php": ">=7.2.0", +# "cakephp/utility": "^4.0" +Requires: php(language) >= 7.2 Requires: php-composer(%{pk_vendor}/utility) = %{version} # From phpcompatinfo report Requires: php-reflection @@ -164,16 +220,12 @@ CakePHP framework. %package database Summary: CakePHP Database Library # From composer.json "require": { -# "php": ">=5.6.0", -# "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} +# "php": ">=7.2.0", +# "cakephp/core": "^4.0", +# "cakephp/datasource": "^4.0" +Requires: php(language) >= 7.2 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 @@ -181,6 +233,9 @@ Requires: php-date Requires: php-json Requires: php-pcre Requires: php-spl +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Recommends: php-composer(%{pk_vendor}/i18n) = %{version} +%endif Provides: php-composer(%{pk_vendor}/database) = %{version} %description database @@ -207,10 +262,23 @@ them to the database, and convert them back when retrieving. %package datasource Summary: CakePHP Datasource Library # From composer.json "require": { -# "php": ">=5.6.0", -# "cakephp/core": "^3.6.0" -Requires: php(language) >= 5.6 +# "php": ">=7.2.0", +# "cakephp/core": "^4.0", +# "psr/log": "^1.1", +# "psr/simple-cache": "^1.0" +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) +BuildRequires: (php-composer(psr/simple-cache) >= 1.0.0 with php-composer(psr/simple-cache) < 2) +Requires: (php-composer(psr/simple-cache) >= 1.0.0 with php-composer(psr/simple-cache) < 2) +%else +BuildRequires: php-psr-simple-cache >= 1.0.0 +Requires: php-psr-simple-cache >= 1.0.0 +BuildRequires: php-PsrLog >= 1.0.0 +Requires: php-PsrLog >= 1.0.0 +%endif # From phpcompatinfo report Requires: php-json Requires: php-spl @@ -233,13 +301,14 @@ provided by this package. %package event Summary: CakePHP Event Library # From composer.json "require": { -# "php": ">=5.6.0", -# "cakephp/core": "^3.6.0" -Requires: php(language) >= 5.6 +# "php": ">=7.2.0", +# "cakephp/core": "^4.0" +Requires: php(language) >= 7.2 Requires: php-composer(%{pk_vendor}/core) = %{version} # From phpcompatinfo report Requires: php-pcre Requires: php-spl +Provides: php-composer(%{pk_vendor}/event) = %{version} %description event CakePHP Event Library: @@ -247,13 +316,33 @@ CakePHP Event Library: CakePHP event dispatcher library that helps implementing the observer pattern. +%package filesystem +Summary: CakePHP FileSystem Library +# From composer.json "require": { +# "php": ">=7.2.0", +# "cakephp/core": "^4.0" +Requires: php(language) >= 7.2 +Requires: php-composer(%{pk_vendor}/core) = %{version} +# From phpcompatinfo report +Requires: php-fileinfo +Requires: php-mbstring +Requires: php-pcre +Requires: php-spl +Provides: php-composer(%{pk_vendor}/filesystem) = %{version} + +%description filesystem +CakePHP FileSystem Library: + +CakePHP filesystem convenience classes to help you work with files and folders. + + %package log Summary: logging library # From composer.json "require": { -# "php": ">=5.6.0", -# "cakephp/core": "^3.6.0", +# "php": ">=7.2.0", +# "cakephp/core": "^4.0", # "psr/log": "^1.0.0" -Requires: php(language) >= 5.6 +Requires: php(language) >= 7.2 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) @@ -274,9 +363,9 @@ CakePHP logging library with support for multiple different streams. %package utility Summary: CakePHP Utility Classes # From composer.json "require": { -# "php": ">=5.6.0", -# "cakephp/core": "^3.6.0" -Requires: php(language) >= 5.6 +# "php": ">=7.2.0", +# "cakephp/core": "^4.0" +Requires: php(language) >= 7.2 Requires: php-composer(%{pk_vendor}/core) = %{version} # From phpcompatinfo report Requires: php-simplexml @@ -301,6 +390,7 @@ the CakePHP framework. %prep %setup -q -n %{gh_project}-%{gh_commit} -a 2 mv chronos-*/src src/Chronos +mv chronos-*/tests tests2 %build @@ -312,6 +402,7 @@ require_once '%{php_home}/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('Cake\\', dirname(__DIR__).'/src'); \Fedora\Autoloader\Autoload::addPsr4('Cake\\Test\\', dirname(__DIR__).'/tests'); +\Fedora\Autoloader\Autoload::addPsr4('Cake\\Chronos\\Test\\', dirname(__DIR__).'/tests2'); \Fedora\Autoloader\Autoload::addPsr4('TestApp\\', dirname(__DIR__).'/tests/test_app/TestApp'); \Fedora\Autoloader\Autoload::addPsr4('TestPlugin\\', dirname(__DIR__).'/tests/test_app/Plugin/TestPlugin/src'); \Fedora\Autoloader\Autoload::addPsr4('TestPlugin\\Test\\', dirname(__DIR__).'/tests/test_app/Plugin/TestPlugin/tests'); @@ -330,6 +421,7 @@ require_once '%{php_home}/Fedora/Autoloader/autoload.php'; '%{php_home}/Psr/Log/autoload.php', '%{php_home}/Psr/SimpleCache/autoload.php', '%{php_home}/Zend/Diactoros/autoload.php', + '%{php_home}/org/bovigo/vfs/autoload.php', ]); EOF @@ -345,6 +437,17 @@ require_once '%{php_home}/Fedora/Autoloader/autoload.php'; ]); EOF +: ===== Generate "chronos" autoloader +cat << 'EOF' | tee src/Chronos/autoload.php +<?php +require_once '%{php_home}/Fedora/Autoloader/autoload.php'; + +\Fedora\Autoloader\Autoload::addPsr4('Cake\\Chronos\\', __DIR__); +\Fedora\Autoloader\Dependencies::required([ + __DIR__ . '/carbon_compat.php', +]); +EOF + : ===== Generate "collection" autoloader cat << 'EOF' | tee src/Collection/autoload.php <?php @@ -356,6 +459,21 @@ require_once '%{php_home}/Fedora/Autoloader/autoload.php'; ]); EOF +: ===== Generate "console" autoloader +cat << 'EOF' | tee src/Console/autoload.php +<?php +require_once '%{php_home}/Fedora/Autoloader/autoload.php'; + +\Fedora\Autoloader\Autoload::addPsr4('Cake\\Console\\', __DIR__); +\Fedora\Autoloader\Dependencies::required([ + dirname(__DIR__) . '/Core/autoload.php', + dirname(__DIR__) . '/Event/autoload.php', + dirname(__DIR__) . '/Filesystem/autoload.php', + dirname(__DIR__) . '/Log/autoload.php', + dirname(__DIR__) . '/Utility/autoload.php', +]); +EOF + : ===== Generate "core" autoloader cat << 'EOF' | tee src/Core/autoload.php <?php @@ -375,10 +493,11 @@ require_once '%{php_home}/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('Cake\\Database\\', __DIR__); \Fedora\Autoloader\Dependencies::required([ - dirname(__DIR__) . '/Cache/autoload.php', dirname(__DIR__) . '/Core/autoload.php', dirname(__DIR__) . '/Datasource/autoload.php', - dirname(__DIR__) . '/Log/autoload.php', +]); +\Fedora\Autoloader\Dependencies::optional([ + dirname(__DIR__) . '/I18n/autoload.php', ]); EOF @@ -390,6 +509,8 @@ require_once '%{php_home}/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('Cake\\Datasource\\', __DIR__); \Fedora\Autoloader\Dependencies::required([ dirname(__DIR__) . '/Core/autoload.php', + '%{php_home}/Psr/Log/autoload.php', + '%{php_home}/Psr/SimpleCache/autoload.php', ]); EOF @@ -404,6 +525,17 @@ require_once '%{php_home}/Fedora/Autoloader/autoload.php'; ]); EOF +: ===== Generate "filesystem" autoloader +cat << 'EOF' | tee src/Filesystem/autoload.php +<?php +require_once '%{php_home}/Fedora/Autoloader/autoload.php'; + +\Fedora\Autoloader\Autoload::addPsr4('Cake\\Filesystem\\', __DIR__); +\Fedora\Autoloader\Dependencies::required([ + dirname(__DIR__) . '/Core/autoload.php', +]); +EOF + : ===== Generate "log" autoloader cat << 'EOF' | tee src/Log/autoload.php <?php @@ -431,67 +563,78 @@ EOF %install #: Library -mkdir -p %{buildroot}%{php_home}/%{ns_vendor} -cp -pr src/Cache %{buildroot}%{php_home}/%{ns_vendor}/ -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/Event %{buildroot}%{php_home}/%{ns_vendor}/ -cp -pr src/Log %{buildroot}%{php_home}/%{ns_vendor}/ -cp -pr src/Utility %{buildroot}%{php_home}/%{ns_vendor}/ +mkdir -p %{buildroot}%{php_home}/%{ns_vendor}%{major} +for dir in Cache Chronos Collection Console Core Database Datasource Event Filesystem Log Utility; do + cp -pr src/$dir %{buildroot}%{php_home}/%{ns_vendor}%{major}/ +done %check %if %{with_tests} : Check our autoloaders php -r ' -require "%{buildroot}%{php_home}/%{ns_vendor}/Cache/autoload.php"; +require "%{buildroot}%{php_home}/%{ns_vendor}%{major}/Cache/autoload.php"; exit (class_exists("Cake\\Cache\\Cache") ? 0 : 1); ' php -r ' -require "%{buildroot}%{php_home}/%{ns_vendor}/Collection/autoload.php"; +require "%{buildroot}%{php_home}/%{ns_vendor}%{major}/Chronos/autoload.php"; +exit (class_exists("Cake\\Chronos\\Date") ? 0 : 1); +' +php -r ' +require "%{buildroot}%{php_home}/%{ns_vendor}%{major}/Collection/autoload.php"; exit (class_exists("Cake\\Collection\\Collection") ? 0 : 1); ' php -r ' -require "%{buildroot}%{php_home}/%{ns_vendor}/Core/autoload.php"; +require "%{buildroot}%{php_home}/%{ns_vendor}%{major}/Console/autoload.php"; +exit (class_exists("Cake\\Console\\Helper") ? 0 : 1); +' +php -r ' +require "%{buildroot}%{php_home}/%{ns_vendor}%{major}/Core/autoload.php"; exit (class_exists("Cake\\Core\\App") ? 0 : 1); ' php -r ' -require "%{buildroot}%{php_home}/%{ns_vendor}/Database/autoload.php"; +require "%{buildroot}%{php_home}/%{ns_vendor}%{major}/Database/autoload.php"; exit (class_exists("Cake\\Database\\Connection") ? 0 : 1); ' php -r ' -require "%{buildroot}%{php_home}/%{ns_vendor}/Datasource/autoload.php"; +require "%{buildroot}%{php_home}/%{ns_vendor}%{major}/Datasource/autoload.php"; exit (class_exists("Cake\\Datasource\\RulesChecker") ? 0 : 1); ' php -r ' -require "%{buildroot}%{php_home}/%{ns_vendor}/Event/autoload.php"; +require "%{buildroot}%{php_home}/%{ns_vendor}%{major}/Event/autoload.php"; exit (class_exists("Cake\\Event\\Event") ? 0 : 1); ' php -r ' -require "%{buildroot}%{php_home}/%{ns_vendor}/Log/autoload.php"; +require "%{buildroot}%{php_home}/%{ns_vendor}%{major}/Filesystem/autoload.php"; +exit (class_exists("Cake\\Filesystem\\File") ? 0 : 1); +' +php -r ' +require "%{buildroot}%{php_home}/%{ns_vendor}%{major}/Log/autoload.php"; exit (class_exists("Cake\\Log\\Log") ? 0 : 1); ' php -r ' -require "%{buildroot}%{php_home}/%{ns_vendor}/Utility/autoload.php"; +require "%{buildroot}%{php_home}/%{ns_vendor}%{major}/Utility/autoload.php"; exit (class_exists("Cake\\Utility\\Hash") ? 0 : 1); ' : Run upstream test suites +export LANG=fr_FR.UTF-8 ret=0 -phpunit tests/TestCase/Cache --verbose || ret=1 -phpunit tests/TestCase/Core --verbose || ret=1 -phpunit tests/TestCase/Collection --verbose || ret=1 +phpunit8 tests/TestCase/Cache --verbose || ret=1 +phpunit8 tests2 --verbose || ret=1 +phpunit8 tests/TestCase/Collection --verbose || ret=1 +phpunit8 tests/TestCase/Console --verbose || ret=1 +phpunit8 tests/TestCase/Core --verbose || ret=1 %if 0%{?rhel} == 6 : skip suite as sqlite is too old %else -phpunit tests/TestCase/Database --filter '^((?!(testMarshal)).)*$' --verbose || ret=1 -phpunit tests/TestCase/Datasource --verbose || ret=1 +phpunit8 tests/TestCase/Database --filter '^((?!(testMarshal)).)*$' --verbose || ret=1 +phpunit8 tests/TestCase/Datasource --verbose || ret=1 %endif -phpunit tests/TestCase/Event --verbose || ret=1 -phpunit tests/TestCase/Log --verbose || ret=1 -phpunit tests/TestCase/Utility --verbose || ret=1 +phpunit8 tests/TestCase/Event --verbose || ret=1 +phpunit8 tests/TestCase/Filesystem --verbose || ret=1 +phpunit8 tests/TestCase/Log --verbose || ret=1 +phpunit8 tests/TestCase/Utility --verbose || ret=1 exit $ret %else : Test suite disabled @@ -503,85 +646,117 @@ exit $ret %license LICENSE %doc src/Cache/composer.json %doc src/Cache/*md -%{php_home}/%{ns_vendor}/Cache -%exclude %{php_home}/%{ns_vendor}/Cache/*.md -%exclude %{php_home}/%{ns_vendor}/Cache/composer.json +%{php_home}/%{ns_vendor}%{major}/Cache +%exclude %{php_home}/%{ns_vendor}%{major}/Cache/*.md +%exclude %{php_home}/%{ns_vendor}%{major}/Cache/composer.json -%files collection +%files chronos +%{!?_licensedir:%global license %%doc} +%license chronos-*/LICENSE +%doc chronos-*/composer.json +%doc chronos-*/*md +%dir %{php_home}/%{ns_vendor}%{major} + %{php_home}/%{ns_vendor}%{major}/Chronos +%files collection %{!?_licensedir:%global license %%doc} %license src/Collection/LICENSE.txt %doc src/Collection/composer.json %doc src/Collection/*md -%dir %{php_home}/%{ns_vendor} - %{php_home}/%{ns_vendor}/Collection -%exclude %{php_home}/%{ns_vendor}/Collection/*.md -%exclude %{php_home}/%{ns_vendor}/Collection/composer.json -%exclude %{php_home}/%{ns_vendor}/Collection/LICENSE.txt +%dir %{php_home}/%{ns_vendor}%{major} + %{php_home}/%{ns_vendor}%{major}/Collection +%exclude %{php_home}/%{ns_vendor}%{major}/Collection/*.md +%exclude %{php_home}/%{ns_vendor}%{major}/Collection/composer.json +%exclude %{php_home}/%{ns_vendor}%{major}/Collection/LICENSE.txt + +%files console +%{!?_licensedir:%global license %%doc} +%license LICENSE +%doc src/Console/composer.json +%doc src/Console/*md +%{php_home}/%{ns_vendor}%{major}/Console +%exclude %{php_home}/%{ns_vendor}%{major}/Collection/*.md +%exclude %{php_home}/%{ns_vendor}%{major}/Collection/composer.json %files core %{!?_licensedir:%global license %%doc} %license src/Core/LICENSE.txt %doc src/Core/composer.json %doc src/Core/*md -%dir %{php_home}/%{ns_vendor} - %{php_home}/%{ns_vendor}/Core -%exclude %{php_home}/%{ns_vendor}/Core/*.md -%exclude %{php_home}/%{ns_vendor}/Core/composer.json -%exclude %{php_home}/%{ns_vendor}/Core/LICENSE.txt +%dir %{php_home}/%{ns_vendor}%{major} + %{php_home}/%{ns_vendor}%{major}/Core +%exclude %{php_home}/%{ns_vendor}%{major}/Core/*.md +%exclude %{php_home}/%{ns_vendor}%{major}/Core/composer.json +%exclude %{php_home}/%{ns_vendor}%{major}/Core/LICENSE.txt %files database %{!?_licensedir:%global license %%doc} %license src/Database/LICENSE.txt %doc src/Database/composer.json %doc src/Database/*md -%{php_home}/%{ns_vendor}/Database -%exclude %{php_home}/%{ns_vendor}/Database/*.md -%exclude %{php_home}/%{ns_vendor}/Database/composer.json -%exclude %{php_home}/%{ns_vendor}/Database/LICENSE.txt +%{php_home}/%{ns_vendor}%{major}/Database +%exclude %{php_home}/%{ns_vendor}%{major}/Database/*.md +%exclude %{php_home}/%{ns_vendor}%{major}/Database/composer.json +%exclude %{php_home}/%{ns_vendor}%{major}/Database/LICENSE.txt %files datasource %{!?_licensedir:%global license %%doc} %license src/Datasource/LICENSE.txt %doc src/Datasource/composer.json %doc src/Datasource/*md -%{php_home}/%{ns_vendor}/Datasource -%exclude %{php_home}/%{ns_vendor}/Datasource/*.md -%exclude %{php_home}/%{ns_vendor}/Datasource/composer.json -%exclude %{php_home}/%{ns_vendor}/Datasource/LICENSE.txt +%{php_home}/%{ns_vendor}%{major}/Datasource +%exclude %{php_home}/%{ns_vendor}%{major}/Datasource/*.md +%exclude %{php_home}/%{ns_vendor}%{major}/Datasource/composer.json +%exclude %{php_home}/%{ns_vendor}%{major}/Datasource/LICENSE.txt %files event %{!?_licensedir:%global license %%doc} %license src/Event/LICENSE.txt %doc src/Event/composer.json %doc src/Event/*md -%{php_home}/%{ns_vendor}/Event -%exclude %{php_home}/%{ns_vendor}/Event/*.md -%exclude %{php_home}/%{ns_vendor}/Event/composer.json -%exclude %{php_home}/%{ns_vendor}/Event/LICENSE.txt +%{php_home}/%{ns_vendor}%{major}/Event +%exclude %{php_home}/%{ns_vendor}%{major}/Event/*.md +%exclude %{php_home}/%{ns_vendor}%{major}/Event/composer.json +%exclude %{php_home}/%{ns_vendor}%{major}/Event/LICENSE.txt + +%files filesystem +%{!?_licensedir:%global license %%doc} +%license src/Filesystem/LICENSE.txt +%doc src/Filesystem/composer.json +%doc src/Filesystem/*md +%{php_home}/%{ns_vendor}%{major}/Filesystem +%exclude %{php_home}/%{ns_vendor}%{major}/Filesystem/*.md +%exclude %{php_home}/%{ns_vendor}%{major}/Filesystem/composer.json +%exclude %{php_home}/%{ns_vendor}%{major}/Filesystem/LICENSE.txt %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 -%exclude %{php_home}/%{ns_vendor}/Log/composer.json -%exclude %{php_home}/%{ns_vendor}/Log/LICENSE.txt +%{php_home}/%{ns_vendor}%{major}/Log +%exclude %{php_home}/%{ns_vendor}%{major}/Log/*.md +%exclude %{php_home}/%{ns_vendor}%{major}/Log/composer.json +%exclude %{php_home}/%{ns_vendor}%{major}/Log/LICENSE.txt %files utility %{!?_licensedir:%global license %%doc} %license src/Utility/LICENSE.txt %doc src/Utility/composer.json %doc src/Utility/*md -%{php_home}/%{ns_vendor}/Utility -%exclude %{php_home}/%{ns_vendor}/Utility/*.md -%exclude %{php_home}/%{ns_vendor}/Utility/composer.json -%exclude %{php_home}/%{ns_vendor}/Utility/LICENSE.txt +%{php_home}/%{ns_vendor}%{major}/Utility +%exclude %{php_home}/%{ns_vendor}%{major}/Utility/*.md +%exclude %{php_home}/%{ns_vendor}%{major}/Utility/composer.json +%exclude %{php_home}/%{ns_vendor}%{major}/Utility/LICENSE.txt %changelog +* Mon Dec 16 2019 Remi Collet <remi@remirepo.net> - 4.0.0-1 +- update to 4.0.0 +- raise dependency on PHP 7.2 +- use Chronos 2.0.1 +- add Chronos, Console and Filesystem + * Mon Dec 9 2019 Remi Collet <remi@remirepo.net> - 3.8.7-1 - update to 3.8.7 diff --git a/src/Cache/composer.json b/src/Cache/composer.json index 2760303..f78e504 100644 --- a/src/Cache/composer.json +++ b/src/Cache/composer.json @@ -22,9 +22,12 @@ "source": "https://github.com/cakephp/cache" }, "require": { - "php": ">=5.6.0", - "psr/simple-cache": "^1.0.0", - "cakephp/core": "^3.6.0" + "php": ">=7.2.0", + "cakephp/core": "^4.0", + "psr/simple-cache": "^1.0.0" + }, + "provide": { + "psr/simple-cache-implementation": "^1.0.0" }, "autoload": { "psr-4": { diff --git a/src/Collection/composer.json b/src/Collection/composer.json index 47a24c4..87c0566 100644 --- a/src/Collection/composer.json +++ b/src/Collection/composer.json @@ -23,7 +23,7 @@ "source": "https://github.com/cakephp/collection" }, "require": { - "php": ">=5.6.0" + "php": ">=7.2.0" }, "autoload": { "psr-4": { diff --git a/src/Console/composer.json b/src/Console/composer.json new file mode 100644 index 0000000..971d9a6 --- /dev/null +++ b/src/Console/composer.json @@ -0,0 +1,42 @@ +{ + "name": "cakephp/console", + "description": "Build beautiful console applications with CakePHP", + "type": "library", + "keywords": [ + "cakephp", + "console", + "cli", + "framework" + ], + "homepage": "https://cakephp.org", + "license": "MIT", + "authors": [ + { + "name": "CakePHP Community", + "homepage": "https://github.com/cakephp/cache/graphs/contributors" + } + ], + "support": { + "issues": "https://github.com/cakephp/cakephp/issues", + "forum": "https://stackoverflow.com/tags/cakephp", + "irc": "irc://irc.freenode.org/cakephp", + "source": "https://github.com/cakephp/console" + }, + "require": { + "php": ">=7.2.0", + "cakephp/core": "^4.0", + "cakephp/event": "^4.0", + "cakephp/filesystem": "^4.0", + "cakephp/log": "^4.0", + "cakephp/utility": "^4.0" + }, + "suggest": { + "cakephp/datasource": "To use the Shell or Command base classes", + "cakephp/orm": "To use the Shell or Command base classes" + }, + "autoload": { + "psr-4": { + "Cake\\Console\\": "." + } + } +} diff --git a/src/Core/composer.json b/src/Core/composer.json index 0ee9afc..a59fd08 100644 --- a/src/Core/composer.json +++ b/src/Core/composer.json @@ -22,8 +22,8 @@ "source": "https://github.com/cakephp/core" }, "require": { - "php": ">=5.6.0", - "cakephp/utility": "^3.6.0" + "php": ">=7.2.0", + "cakephp/utility": "^4.0" }, "suggest": { "cakephp/event": "To use PluginApplicationInterface or plugin applications.", diff --git a/src/Database/composer.json b/src/Database/composer.json index c197115..9325117 100644 --- a/src/Database/composer.json +++ b/src/Database/composer.json @@ -24,11 +24,12 @@ "source": "https://github.com/cakephp/database" }, "require": { - "php": ">=5.6.0", - "cakephp/cache": "^3.6.0", - "cakephp/core": "^3.6.0", - "cakephp/datasource": "^3.6.0", - "cakephp/log": "^3.6.0" + "php": ">=7.2.0", + "cakephp/core": "^4.0", + "cakephp/datasource": "^4.0" + }, + "suggest": { + "cakephp/i18n": "If you are using locale-aware datetime formats or Chronos types." }, "autoload": { "psr-4": { diff --git a/src/Datasource/composer.json b/src/Datasource/composer.json index 7846db2..ffd623c 100644 --- a/src/Datasource/composer.json +++ b/src/Datasource/composer.json @@ -24,8 +24,10 @@ "source": "https://github.com/cakephp/datasource" }, "require": { - "php": ">=5.6.0", - "cakephp/core": "^3.6.0" + "php": ">=7.2.0", + "cakephp/core": "^4.0", + "psr/log": "^1.1", + "psr/simple-cache": "^1.0" }, "suggest": { "cakephp/utility": "If you decide to use EntityTrait.", diff --git a/src/Event/composer.json b/src/Event/composer.json index e984d41..d3a9bc5 100644 --- a/src/Event/composer.json +++ b/src/Event/composer.json @@ -23,8 +23,8 @@ "source": "https://github.com/cakephp/event" }, "require": { - "php": ">=5.6.0", - "cakephp/core": "^3.6.0" + "php": ">=7.2.0", + "cakephp/core": "^4.0" }, "autoload": { "psr-4": { diff --git a/src/Filesystem/composer.json b/src/Filesystem/composer.json index e5dcb07..edaffd5 100644 --- a/src/Filesystem/composer.json +++ b/src/Filesystem/composer.json @@ -23,8 +23,8 @@ "source": "https://github.com/cakephp/filesystem" }, "require": { - "php": ">=5.6.0", - "cakephp/core": "^3.6.0" + "php": ">=7.2.0", + "cakephp/core": "^4.0" }, "autoload": { "psr-4": { diff --git a/src/Form/composer.json b/src/Form/composer.json index 5e1dfdc..7942811 100644 --- a/src/Form/composer.json +++ b/src/Form/composer.json @@ -21,9 +21,9 @@ "source": "https://github.com/cakephp/form" }, "require": { - "php": ">=5.6.0", - "cakephp/event": "^3.6.0", - "cakephp/validation": "^3.6.0" + "php": ">=7.2.0", + "cakephp/event": "^4.0", + "cakephp/validation": "^4.0" }, "autoload": { "psr-4": { diff --git a/src/Http/composer.json b/src/Http/composer.json new file mode 100644 index 0000000..73cdd62 --- /dev/null +++ b/src/Http/composer.json @@ -0,0 +1,48 @@ +{ + "name": "cakephp/http", + "description": "CakePHP HTTP client and PSR7/15 middleware libraries", + "type": "library", + "keywords": [ + "cakephp", + "http", + "psr7", + "psr15" + ], + "homepage": "https://cakephp.org", + "license": "MIT", + "authors": [ + { + "name": "CakePHP Community", + "homepage": "https://github.com/cakephp/http/graphs/contributors" + } + ], + "support": { + "issues": "https://github.com/cakephp/cakephp/issues", + "forum": "https://stackoverflow.com/tags/cakephp", + "irc": "irc://irc.freenode.org/cakephp", + "source": "https://github.com/cakephp/http" + }, + "require": { + "php": ">=7.2.0", + "cakephp/core": "^4.0", + "cakephp/event": "^4.0", + "cakephp/utility": "^4.0", + "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" + }, + "provide": { + "psr/http-client-implementation": "^1.0" + }, + "suggest": { + "cakephp/cache": "To use cache session storage", + "cakephp/orm": "To use database session storage" + }, + "autoload": { + "psr-4": { + "Cake\\Http\\": "." + } + } +} diff --git a/src/I18n/composer.json b/src/I18n/composer.json index 7ffc86f..94976f0 100644 --- a/src/I18n/composer.json +++ b/src/I18n/composer.json @@ -28,10 +28,10 @@ "source": "https://github.com/cakephp/i18n" }, "require": { - "php": ">=5.6.0", + "php": ">=7.2.0", "ext-intl": "*", - "cakephp/core": "^3.6.0", - "cakephp/chronos": "^1.0.0", + "cakephp/core": "^4.0", + "cakephp/chronos": "^2.0.0", "aura/intl": "^3.0.0" }, "suggest": { diff --git a/src/Log/composer.json b/src/Log/composer.json index a775a4f..0d43640 100644 --- a/src/Log/composer.json +++ b/src/Log/composer.json @@ -23,10 +23,13 @@ "source": "https://github.com/cakephp/log" }, "require": { - "php": ">=5.6.0", - "cakephp/core": "^3.6.0", + "php": ">=7.2.0", + "cakephp/core": "^4.0", "psr/log": "^1.0.0" }, + "provide": { + "psr/log-implementation": "^1.0.0" + }, "autoload": { "psr-4": { "Cake\\Log\\": "." diff --git a/src/ORM/composer.json b/src/ORM/composer.json index 1432893..c0f2675 100644 --- a/src/ORM/composer.json +++ b/src/ORM/composer.json @@ -23,17 +23,18 @@ "source": "https://github.com/cakephp/orm" }, "require": { - "php": ">=5.6.0", - "cakephp/collection": "^3.6.0", - "cakephp/core": "^3.6.0", - "cakephp/datasource": "^3.6.0", - "cakephp/database": "^3.6.0", - "cakephp/event": "^3.6.0", - "cakephp/utility": "^3.6.0", - "cakephp/validation": "^3.6.0" + "php": ">=7.2.0", + "cakephp/collection": "^4.0", + "cakephp/core": "^4.0", + "cakephp/datasource": "^4.0", + "cakephp/database": "^4.0", + "cakephp/event": "^4.0", + "cakephp/utility": "^4.0", + "cakephp/validation": "^4.0" }, "suggest": { - "cakephp/i18n": "If you are using Translate / Timestamp Behavior." + "cakephp/cache": "If you decide to use Query caching.", + "cakephp/i18n": "If you are using Translate/TimestampBehavior or Chronos types." }, "autoload": { "psr-4": { diff --git a/src/Utility/composer.json b/src/Utility/composer.json index 4c5c8f1..fccb2f8 100644 --- a/src/Utility/composer.json +++ b/src/Utility/composer.json @@ -25,8 +25,8 @@ "source": "https://github.com/cakephp/utility" }, "require": { - "php": ">=5.6.0", - "cakephp/core": "^3.6.0" + "php": ">=7.2.0", + "cakephp/core": "^4.0" }, "suggest": { "ext-intl": "To use Text::transliterate() or Text::slug()", diff --git a/src/Validation/composer.json b/src/Validation/composer.json index e4de56a..eceaafd 100644 --- a/src/Validation/composer.json +++ b/src/Validation/composer.json @@ -22,9 +22,9 @@ "source": "https://github.com/cakephp/validation" }, "require": { - "php": ">=5.6.0", - "cakephp/core": "^3.6.0", - "cakephp/utility": "^3.6.0", + "php": ">=7.2.0", + "cakephp/core": "^4.0", + "cakephp/utility": "^4.0", "psr/http-message": "^1.0.0" }, "suggest": { |