diff options
author | Remi Collet <remi@remirepo.net> | 2020-12-21 15:29:45 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-12-21 15:29:45 +0100 |
commit | 582950f268ade910c42ee22724f48ad20a1a3232 (patch) | |
tree | 047a80c93438d3c28f27ff05d9876bce6b250330 | |
parent | d0cccf21476286ad7907f039765213025abec762 (diff) |
update to 4.2.0
add dependency on league/container
drop dependency on aura/intl
-rw-r--r-- | composer.json | 6 | ||||
-rw-r--r-- | php-cakephp4.spec | 55 | ||||
-rw-r--r-- | src/Core/composer.json | 3 | ||||
-rw-r--r-- | src/I18n/composer.json | 3 |
4 files changed, 36 insertions, 31 deletions
diff --git a/composer.json b/composer.json index d5ed4a0..41ba806 100644 --- a/composer.json +++ b/composer.json @@ -32,11 +32,11 @@ "ext-json": "*", "ext-intl": "*", "ext-mbstring": "*", - "aura/intl": "^3.0.0", "cakephp/chronos": "^2.0", "composer/ca-bundle": "^1.2", "laminas/laminas-diactoros": "^2.2.2", "laminas/laminas-httphandlerrunner": "^1.1", + "league/container": "^3.2", "psr/http-client": "^1.0", "psr/http-server-handler": "^1.0", "psr/http-server-middleware": "^1.0", @@ -53,7 +53,7 @@ "cakephp/cakephp-codesniffer": "^4.0", "mikey179/vfsstream": "^1.6", "paragonie/csp-builder": "^2.3", - "phpunit/phpunit": "~8.5.0" + "phpunit/phpunit": "^8.5 || ^9.3" }, "autoload": { "psr-4": { @@ -112,7 +112,7 @@ "@phpstan", "@psalm" ], - "stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:0.12.49 psalm/phar:~3.18.1 && mv composer.backup composer.json" + "stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:0.12.58 psalm/phar:~4.3.0 && mv composer.backup composer.json" }, "config": { "sort-packages": true, diff --git a/php-cakephp4.spec b/php-cakephp4.spec index f8479db..1f707ea 100644 --- a/php-cakephp4.spec +++ b/php-cakephp4.spec @@ -8,10 +8,11 @@ # # TODO: -# Auth, Command, Controller, Error, Mailer, Network, Routing, Shell, TestSuite, View +# phpunit9.... seems a mess + # https://github.com/cakephp/cakephp/releases -%global gh_commit bba723770e6f8861ce5117650251f5848033193e +%global gh_commit d4b68a6dd2404d0b8cc7431838a39ec44b3f5f6b %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner cakephp %global gh_project cakephp @@ -27,7 +28,7 @@ %global chronos_version 2.0.6 Name: php-%{pk_vendor}%{major} -Version: 4.1.7 +Version: 4.2.0 Release: 1%{?dist} Summary: The CakePHP framework @@ -60,8 +61,8 @@ BuildRequires: php-spl # "cakephp/cakephp-codesniffer": "dev-next", # "mikey179/vfsstream": "^1.6", # "paragonie/csp-builder": "^2.3", -# "phpunit/phpunit": "~8.5.0" -BuildRequires: phpunit8 >= 8.5.0 +# "phpunit/phpunit": "^8.5 || ^9.3" +BuildRequires: phpunit8 >= 8.5 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(mikey179/vfsstream) >= 1.6 with php-composer(mikey179/vfsstream) < 6) BuildRequires: glibc-langpack-fr @@ -215,9 +216,14 @@ Requires: php-composer(%{pk_vendor}/utility) = %{version} %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(psr/http-server-handler) >= 1.0.0 with php-composer(psr/http-server-handler) < 2) Requires: (php-composer(psr/http-server-handler) >= 1.0.0 with php-composer(psr/http-server-handler) < 2) +# Optional for core but required by full framework +BuildRequires: (php-composer(league/container) >= 3.2.0 with php-composer(league/container) < 4) +Requires: (php-composer(league/container) >= 3.2.0 with php-composer(league/container) < 4) %else BuildRequires: php-psr-http-server-handler >= 1.0.0 Requires: php-psr-http-server-handler >= 1.0.0 +BuildRequires: php-league-container >= 3.2.0 +Requires: php-league-container >= 3.2.0 %endif # From phpcompatinfo report Requires: php-reflection @@ -455,19 +461,11 @@ Summary: CakePHP I18n Library # "php": ">=7.2.0", # "ext-intl": "*", # "cakephp/core": "^4.0", -# "cakephp/chronos": "^2.0.0", -# "aura/intl": "^3.0.0" +# "cakephp/chronos": "^2.0.0" Requires: php(language) >= 7.2 Requires: php-intl Requires: php-composer(%{pk_vendor}/core) = %{version} Requires: php-composer(%{pk_vendor}/chronos) = %{chronos_version} -%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -BuildRequires: (php-composer(aura/intl) >= 3.0.0 with php-composer(aura/intl) < 4) -Requires: (php-composer(aura/intl) >= 3.0.0 with php-composer(aura/intl) < 4) -%else -BuildRequires: php-aura-intl >= 3.0.0 -Requires: php-aura-intl >= 3.0.0 -%endif # From phpcompatinfo report Requires: php-date Requires: php-pcre @@ -624,18 +622,19 @@ require_once '%{php_home}/Fedora/Autoloader/autoload.php'; __DIR__ . '/I18n/functions.php', __DIR__ . '/Routing/functions.php', __DIR__ . '/Utility/bootstrap.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', + '%{php_home}/League/Container/autoload.php', '%{php_home}/Composer/CaBundle/autoload.php', '%{php_home}/Laminas/Diactoros2/autoload.php', '%{php_home}/Laminas/HttpHandlerRunner/autoload.php', ]); EOF + : ===== Generate test autoloader for full framework mkdir vendor cat << 'EOF' | tee vendor/autoload.php @@ -714,6 +713,7 @@ require_once '%{php_home}/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('Cake\\Core\\', __DIR__); \Fedora\Autoloader\Dependencies::required([ '%{php_home}/Psr/Http/Server/autoload.php', + '%{php_home}/League/Container/autoload.php', dirname(__DIR__) . '/Utility/autoload.php', __DIR__ . '/functions.php', ]); @@ -809,7 +809,6 @@ require_once '%{php_home}/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Dependencies::required([ dirname(__DIR__) . '/Core/autoload.php', dirname(__DIR__) . '/Chronos/autoload.php', - '%{php_home}/Aura/Intl/autoload.php', __DIR__ . '/functions.php', ]); EOF @@ -950,23 +949,24 @@ sed -e 's:vendor/phpunit/phpunit/src/::' -i \ tests/TestCase/Error/Middleware/ErrorHandlerMiddlewareTest.php \ tests/TestCase/Error/ErrorHandlerTest.php -%if 0%{?rhel} == 6 -: skip suite as sqlite is too old -rm -rf tests/TestCase/Datasource -%endif - export LANG=fr_FR.UTF-8 ret=0 : Run chronos test suite -phpunit8 tests2 --verbose || ret=1 +%{_bindir}/phpunit8 tests2 --verbose || ret=1 + +# https://github.com/cakephp/cakephp/pull/15229 +sed -e 's/BinaryUuiditems/BinaryUuidItems/' \ + -e 's/BinaryUuidItemsBinaryUuidtags/BinaryUuiditemsBinaryUuidtags/' \ + -i tests/TestCase/ORM/Association/BelongsToManyTest.php : Run cakephp test suite # testEmailDeep|testConfigContext|testDataAvailable|testAddresses|testHost are online # testCurrency|testConfig issue with ICU version # CspMiddlewareTest paragonie/csp-builder not packaged -phpunit8 tests/TestCase \ - --filter '^((?!(CspMiddlewareTest|testEmailDeep|testConfigContext|testDataAvailable|testAddresses|testHost|testCurrency|testConfig)).)*$' \ - --verbose || ret=1 +# testReplaceLinkBinaryUuid nedd investigation +%{_bindir}/phpunit8 tests/TestCase \ + --filter '^((?!(CspMiddlewareTest|testEmailDeep|testConfigContext|testDataAvailable|testAddresses|testHost|testCurrency|testConfig|testReplaceLinkBinaryUuid)).)*$' \ + --verbose || ret=1 exit $ret %else @@ -1135,6 +1135,11 @@ exit $ret %changelog +* Mon Dec 21 2020 Remi Collet <remi@remirepo.net> - 4.2.0-1 +- update to 4.2.0 +- add dependency on league/container +- drop dependency on aura/intl + * Mon Dec 14 2020 Remi Collet <remi@remirepo.net> - 4.1.7-1 - update to 4.1.7 diff --git a/src/Core/composer.json b/src/Core/composer.json index a59fd08..ffd17ba 100644 --- a/src/Core/composer.json +++ b/src/Core/composer.json @@ -27,7 +27,8 @@ }, "suggest": { "cakephp/event": "To use PluginApplicationInterface or plugin applications.", - "cakephp/cache": "To use Configure::store() and restore()." + "cakephp/cache": "To use Configure::store() and restore().", + "league/container": "To use Container and ServiceProvider classes" }, "autoload": { "psr-4": { diff --git a/src/I18n/composer.json b/src/I18n/composer.json index 94976f0..8b75144 100644 --- a/src/I18n/composer.json +++ b/src/I18n/composer.json @@ -31,8 +31,7 @@ "php": ">=7.2.0", "ext-intl": "*", "cakephp/core": "^4.0", - "cakephp/chronos": "^2.0.0", - "aura/intl": "^3.0.0" + "cakephp/chronos": "^2.0.0" }, "suggest": { "cakephp/cache": "Require this if you want automatic caching of translators" |