From f2ead24a88672ada43b47bf6a19a208df82f5807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Wed, 14 Dec 2022 08:37:42 +0100 Subject: [PATCH] Upgrade laminas packages to get PHP 8.2 compatibility --- composer.json | 5 +- composer.lock | 250 ++++++++++++++-------------------- src/Config.php | 3 - tests/functionnal/Toolbox.php | 5 +- tests/imap/MailCollector.php | 3 +- 5 files changed, 109 insertions(+), 157 deletions(-) diff --git a/composer.json b/composer.json index 20394cd0f1f..f25c8658c40 100644 --- a/composer.json +++ b/composer.json @@ -32,11 +32,10 @@ "html2text/html2text": "^4.3", "htmlawed/htmlawed": "^1.2", "jasig/phpcas": "^1.6", - "laminas/laminas-i18n": "^2.12", + "laminas/laminas-i18n": "^2.21", "laminas/laminas-json": "^3.5", - "laminas/laminas-mail": "^2.15", + "laminas/laminas-mail": "^2.21", "laminas/laminas-mime": "^2.9", - "laminas/laminas-servicemanager": "~3.10.0", "league/csv": "^9.7", "mexitek/phpcolors": "^1.0", "michelf/php-markdown": "^2.0", diff --git a/composer.lock b/composer.lock index 22f0a098870..b8cde77dd62 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3e786decfabd580f57cff73c53f8569e", + "content-hash": "d9fe94399ff381c887aa1cf6689c2dcd", "packages": [ { "name": "blueimp/jquery-file-upload", @@ -127,42 +127,6 @@ ], "time": "2022-08-10T22:54:19+00:00" }, - { - "name": "container-interop/container-interop", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/container-interop/container-interop.git", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "shasum": "" - }, - "require": { - "psr/container": "^1.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Interop\\Container\\": "src/Interop/Container/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", - "homepage": "https://github.com/container-interop/container-interop", - "support": { - "issues": "https://github.com/container-interop/container-interop/issues", - "source": "https://github.com/container-interop/container-interop/tree/master" - }, - "abandoned": "psr/container", - "time": "2017-02-14T19:40:03+00:00" - }, { "name": "doctrine/lexer", "version": "1.2.3", @@ -951,22 +915,23 @@ }, { "name": "laminas/laminas-i18n", - "version": "2.15.0", + "version": "2.21.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-i18n.git", - "reference": "1654fcd6cd27c01a902b47fe71fa583ad227268c" + "reference": "fbd2d0373aaced4769cba2bf3d1425d55f68abb1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-i18n/zipball/1654fcd6cd27c01a902b47fe71fa583ad227268c", - "reference": "1654fcd6cd27c01a902b47fe71fa583ad227268c", + "url": "https://api.github.com/repos/laminas/laminas-i18n/zipball/fbd2d0373aaced4769cba2bf3d1425d55f68abb1", + "reference": "fbd2d0373aaced4769cba2bf3d1425d55f68abb1", "shasum": "" }, "require": { "ext-intl": "*", + "laminas/laminas-servicemanager": "^3.14.0", "laminas/laminas-stdlib": "^2.7 || ^3.0", - "php": "^7.4 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "laminas/laminas-view": "<2.20.0", @@ -974,20 +939,18 @@ "zendframework/zend-i18n": "*" }, "require-dev": { - "laminas/laminas-cache": "^3.1.2", - "laminas/laminas-cache-storage-adapter-memory": "^2.0.0", - "laminas/laminas-cache-storage-deprecated-factory": "^1.0.0", - "laminas/laminas-coding-standard": "~2.3.0", - "laminas/laminas-config": "^3.4.0", - "laminas/laminas-eventmanager": "^3.4.0", - "laminas/laminas-filter": "^2.10.0", - "laminas/laminas-servicemanager": "^3.7.0", - "laminas/laminas-validator": "^2.14.0", - "laminas/laminas-view": "^2.20.0", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.3", - "psalm/plugin-phpunit": "^0.16.1", - "vimeo/psalm": "^4.21" + "laminas/laminas-cache": "^3.8", + "laminas/laminas-cache-storage-adapter-memory": "^2.2.0", + "laminas/laminas-cache-storage-deprecated-factory": "^1.0.1", + "laminas/laminas-coding-standard": "~2.4.0", + "laminas/laminas-config": "^3.8.0", + "laminas/laminas-eventmanager": "^3.7", + "laminas/laminas-filter": "^2.28.1", + "laminas/laminas-validator": "^2.28", + "laminas/laminas-view": "^2.25", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^5.0.0" }, "suggest": { "laminas/laminas-cache": "You should install this package to cache the translations", @@ -995,7 +958,6 @@ "laminas/laminas-eventmanager": "You should install this package to use the events in the translator", "laminas/laminas-filter": "You should install this package to use the provided filters", "laminas/laminas-i18n-resources": "This package provides validator and captcha translations", - "laminas/laminas-servicemanager": "You should install this package to use the translator", "laminas/laminas-validator": "You should install this package to use the provided validators", "laminas/laminas-view": "You should install this package to use the provided view helpers" }, @@ -1035,7 +997,7 @@ "type": "community_bridge" } ], - "time": "2022-04-01T10:47:19+00:00" + "time": "2022-12-02T17:15:52+00:00" }, { "name": "laminas/laminas-json", @@ -1100,27 +1062,27 @@ }, { "name": "laminas/laminas-loader", - "version": "2.8.0", + "version": "2.9.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-loader.git", - "reference": "d0589ec9dd48365fd95ad10d1c906efd7711c16b" + "reference": "51ed9c3fa42d1098a9997571730c0cbf42d078d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-loader/zipball/d0589ec9dd48365fd95ad10d1c906efd7711c16b", - "reference": "d0589ec9dd48365fd95ad10d1c906efd7711c16b", + "url": "https://api.github.com/repos/laminas/laminas-loader/zipball/51ed9c3fa42d1098a9997571730c0cbf42d078d3", + "reference": "51ed9c3fa42d1098a9997571730c0cbf42d078d3", "shasum": "" }, "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-loader": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.2.1", - "phpunit/phpunit": "^9.3" + "laminas/laminas-coding-standard": "~2.4.0", + "phpunit/phpunit": "~9.5.25" }, "type": "library", "autoload": { @@ -1152,49 +1114,46 @@ "type": "community_bridge" } ], - "time": "2021-09-02T18:30:53+00:00" + "time": "2022-10-16T12:50:49+00:00" }, { "name": "laminas/laminas-mail", - "version": "2.16.0", + "version": "2.21.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-mail.git", - "reference": "1ee1a384b96c8af29ecad9b3a7adc27a150ebc49" + "reference": "451b33522a4e7f17e097e45fceea4752c86a2ace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-mail/zipball/1ee1a384b96c8af29ecad9b3a7adc27a150ebc49", - "reference": "1ee1a384b96c8af29ecad9b3a7adc27a150ebc49", + "url": "https://api.github.com/repos/laminas/laminas-mail/zipball/451b33522a4e7f17e097e45fceea4752c86a2ace", + "reference": "451b33522a4e7f17e097e45fceea4752c86a2ace", "shasum": "" }, "require": { "ext-iconv": "*", - "laminas/laminas-loader": "^2.8", - "laminas/laminas-mime": "^2.9.1", - "laminas/laminas-stdlib": "^3.6", - "laminas/laminas-validator": "^2.15", - "php": "^7.3 || ~8.0.0 || ~8.1.0", - "symfony/polyfill-intl-idn": "^1.24.0", - "symfony/polyfill-mbstring": "^1.12.0", - "webmozart/assert": "^1.10" - }, - "conflict": { - "zendframework/zend-mail": "*" + "laminas/laminas-loader": "^2.8.0", + "laminas/laminas-mime": "^2.10.0", + "laminas/laminas-stdlib": "^3.11.0", + "laminas/laminas-validator": "^2.23.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", + "symfony/polyfill-intl-idn": "^1.26.0", + "symfony/polyfill-mbstring": "^1.16.0", + "webmozart/assert": "^1.11.0" }, "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "laminas/laminas-crypt": "^2.6 || ^3.4", - "laminas/laminas-db": "^2.13.3", - "laminas/laminas-servicemanager": "^3.7", - "phpunit/phpunit": "^9.5.5", - "psalm/plugin-phpunit": "^0.15.1", - "symfony/process": "^5.3.7", - "vimeo/psalm": "^4.7" + "laminas/laminas-coding-standard": "~2.4.0", + "laminas/laminas-crypt": "^3.9.0", + "laminas/laminas-db": "^2.16", + "laminas/laminas-servicemanager": "^3.20", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.4", + "symfony/process": "^6.0.11", + "vimeo/psalm": "^5.1" }, "suggest": { - "laminas/laminas-crypt": "Crammd5 support in SMTP Auth", - "laminas/laminas-servicemanager": "^2.7.10 || ^3.3.1 when using SMTP to deliver messages" + "laminas/laminas-crypt": "^3.8 Crammd5 support in SMTP Auth", + "laminas/laminas-servicemanager": "^3.16 when using SMTP to deliver messages" }, "type": "library", "extra": { @@ -1232,7 +1191,7 @@ "type": "community_bridge" } ], - "time": "2022-02-23T21:08:17+00:00" + "time": "2022-12-05T18:42:59+00:00" }, { "name": "laminas/laminas-mime", @@ -1297,45 +1256,46 @@ }, { "name": "laminas/laminas-servicemanager", - "version": "3.10.0", + "version": "3.20.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-servicemanager.git", - "reference": "e52b985909e0940bf22d34f322eb3f48bbef6bd1" + "reference": "bc2c2cbe2dd90db8b9d16b0618f542692b76ab59" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/e52b985909e0940bf22d34f322eb3f48bbef6bd1", - "reference": "e52b985909e0940bf22d34f322eb3f48bbef6bd1", + "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/bc2c2cbe2dd90db8b9d16b0618f542692b76ab59", + "reference": "bc2c2cbe2dd90db8b9d16b0618f542692b76ab59", "shasum": "" }, "require": { - "container-interop/container-interop": "^1.2", "laminas/laminas-stdlib": "^3.2.1", - "php": "~7.4.0 || ~8.0.0 || ~8.1.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "psr/container": "^1.0" }, "conflict": { + "ext-psr": "*", "laminas/laminas-code": "<3.3.1", "zendframework/zend-code": "<3.3.1", "zendframework/zend-servicemanager": "*" }, "provide": { - "container-interop/container-interop-implementation": "^1.2", "psr/container-implementation": "^1.0" }, + "replace": { + "container-interop/container-interop": "^1.2.0" + }, "require-dev": { - "composer/package-versions-deprecated": "^1.0", - "laminas/laminas-coding-standard": "~2.2.1", - "laminas/laminas-container-config-test": "^0.3", - "laminas/laminas-dependency-plugin": "^2.1.2", - "mikey179/vfsstream": "^1.6.10@alpha", - "ocramius/proxy-manager": "^2.11", - "phpbench/phpbench": "^1.1", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.5", - "psalm/plugin-phpunit": "^0.16.1", - "vimeo/psalm": "^4.8" + "composer/package-versions-deprecated": "^1.11.99.5", + "laminas/laminas-coding-standard": "~2.4.0", + "laminas/laminas-container-config-test": "^0.8", + "laminas/laminas-dependency-plugin": "^2.2", + "mikey179/vfsstream": "^1.6.11@alpha", + "ocramius/proxy-manager": "^2.14.1", + "phpbench/phpbench": "^1.2.7", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0.0" }, "suggest": { "ocramius/proxy-manager": "ProxyManager ^2.1.1 to handle lazy initialization of services" @@ -1346,6 +1306,9 @@ ], "type": "library", "autoload": { + "files": [ + "src/autoload.php" + ], "psr-4": { "Laminas\\ServiceManager\\": "src/" } @@ -1379,20 +1342,20 @@ "type": "community_bridge" } ], - "time": "2021-09-18T20:19:36+00:00" + "time": "2022-12-01T17:03:38+00:00" }, { "name": "laminas/laminas-stdlib", - "version": "3.15.0", + "version": "3.16.1", "source": { "type": "git", "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "63b66bd4b696f024f42616b9d95cdb10e5109c27" + "reference": "f4f773641807c7ccee59b758bfe4ac4ba33ecb17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/63b66bd4b696f024f42616b9d95cdb10e5109c27", - "reference": "63b66bd4b696f024f42616b9d95cdb10e5109c27", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/f4f773641807c7ccee59b758bfe4ac4ba33ecb17", + "reference": "f4f773641807c7ccee59b758bfe4ac4ba33ecb17", "shasum": "" }, "require": { @@ -1403,10 +1366,10 @@ }, "require-dev": { "laminas/laminas-coding-standard": "^2.4.0", - "phpbench/phpbench": "^1.2.6", - "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.28" + "phpbench/phpbench": "^1.2.7", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0.0" }, "type": "library", "autoload": { @@ -1438,55 +1401,50 @@ "type": "community_bridge" } ], - "time": "2022-10-10T19:10:24+00:00" + "time": "2022-12-03T18:48:01+00:00" }, { "name": "laminas/laminas-validator", - "version": "2.16.0", + "version": "2.29.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-validator.git", - "reference": "329900ab7674c198e91e85b2e09080cdf493ce07" + "reference": "e40ee8d86cc1907083e273bfd6ed8b6dde2d9850" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/329900ab7674c198e91e85b2e09080cdf493ce07", - "reference": "329900ab7674c198e91e85b2e09080cdf493ce07", + "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/e40ee8d86cc1907083e273bfd6ed8b6dde2d9850", + "reference": "e40ee8d86cc1907083e273bfd6ed8b6dde2d9850", "shasum": "" }, "require": { - "container-interop/container-interop": "^1.1", - "laminas/laminas-stdlib": "^3.6", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "laminas/laminas-servicemanager": "^3.12.0", + "laminas/laminas-stdlib": "^3.13", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", + "psr/http-message": "^1.0.1" }, "conflict": { "zendframework/zend-validator": "*" }, "require-dev": { - "laminas/laminas-cache": "^2.6.1", - "laminas/laminas-coding-standard": "~2.2.1", - "laminas/laminas-db": "^2.7", - "laminas/laminas-filter": "^2.6", - "laminas/laminas-http": "^2.14.2", - "laminas/laminas-i18n": "^2.6", - "laminas/laminas-math": "^2.6", - "laminas/laminas-servicemanager": "^2.7.11 || ^3.0.3", - "laminas/laminas-session": "^2.8", - "laminas/laminas-uri": "^2.7", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.5", - "psalm/plugin-phpunit": "^0.15.0", - "psr/http-client": "^1.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0", - "vimeo/psalm": "^4.3" + "laminas/laminas-coding-standard": "^2.4.0", + "laminas/laminas-db": "^2.16", + "laminas/laminas-filter": "^2.28.1", + "laminas/laminas-http": "^2.18", + "laminas/laminas-i18n": "^2.19", + "laminas/laminas-session": "^2.15", + "laminas/laminas-uri": "^2.10.0", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.3", + "psr/http-client": "^1.0.1", + "psr/http-factory": "^1.0.1", + "vimeo/psalm": "^5.0" }, "suggest": { "laminas/laminas-db": "Laminas\\Db component, required by the (No)RecordExists validator", "laminas/laminas-filter": "Laminas\\Filter component, required by the Digits validator", "laminas/laminas-i18n": "Laminas\\I18n component to allow translation of validation error messages", "laminas/laminas-i18n-resources": "Translations of validator messages", - "laminas/laminas-math": "Laminas\\Math component, required by the Csrf validator", "laminas/laminas-servicemanager": "Laminas\\ServiceManager component to allow using the ValidatorPluginManager and validator chains", "laminas/laminas-session": "Laminas\\Session component, ^2.8; required by the Csrf validator", "laminas/laminas-uri": "Laminas\\Uri component, required by the Uri and Sitemap\\Loc validators", @@ -1528,7 +1486,7 @@ "type": "community_bridge" } ], - "time": "2022-01-21T14:30:01+00:00" + "time": "2022-12-13T22:53:38+00:00" }, { "name": "league/csv", diff --git a/src/Config.php b/src/Config.php index 8ecbd942ce8..25dbf2c9209 100644 --- a/src/Config.php +++ b/src/Config.php @@ -2099,9 +2099,6 @@ public static function getLibraries($all = false) [ 'name' => 'laminas/laminas-json', 'check' => 'Laminas\Json\Json' ], - [ 'name' => 'laminas/laminas-servicemanager', - 'check' => 'Laminas\\ServiceManager\\ServiceManager' - ], [ 'name' => 'monolog/monolog', 'check' => 'Monolog\\Logger' ], diff --git a/tests/functionnal/Toolbox.php b/tests/functionnal/Toolbox.php index bd76b577f39..df7a36ddeaf 100644 --- a/tests/functionnal/Toolbox.php +++ b/tests/functionnal/Toolbox.php @@ -94,9 +94,8 @@ protected function filenameProvider() 'name' => '00-logoteclib.png', 'expected' => '00-logoteclib.png', ], [ - // Space is missing between "France" and "très" due to a bug in laminas-mail - 'name' => '01-Screenshot-2018-4-12 Observatoire - Francetrès haut débit.png', - 'expected' => '01-screenshot-2018-4-12-observatoire-francetres-haut-debit.png', + 'name' => '01-Screenshot-2018-4-12 Observatoire - France très haut débit.png', + 'expected' => '01-screenshot-2018-4-12-observatoire-france-tres-haut-debit.png', ], [ 'name' => '01-test.JPG', 'expected' => '01-test.JPG', diff --git a/tests/imap/MailCollector.php b/tests/imap/MailCollector.php index 47e26995ac9..cfb29c109cb 100644 --- a/tests/imap/MailCollector.php +++ b/tests/imap/MailCollector.php @@ -844,8 +844,7 @@ function () use (&$msg) { // Check creation of expected documents $expected_docs = [ '00-logoteclib.png' => 'image/png', - // Space is missing between "France" and "très" due to a bug in laminas-mail - '01-screenshot-2018-4-12-observatoire-francetres-haut-debit.png' => 'image/png', + '01-screenshot-2018-4-12-observatoire-france-tres-haut-debit.png' => 'image/png', '01-test.JPG' => 'image/jpeg', '15-image001.png' => 'image/png', '18-blank.gif' => 'image/gif',