diff --git a/composer.json b/composer.json index 326d79eb9771ddfeda29fdcec4108199817859d9..097dceb68a0423d2a6d04a8c7f2618e48f7d0615 100644 --- a/composer.json +++ b/composer.json @@ -39,8 +39,10 @@ "php": "^8.1", "ext-PDO": "*", "ext-dom": "*", + "ext-intl": "*", "ext-json": "*", "ext-libxml": "*", + "ext-mbstring": "*", "ext-pcre": "*", "ext-session": "*", "ext-xml": "*", @@ -80,10 +82,6 @@ "symfony/mailer": "^5.4", "symfony/mime": "^5.4", "symfony/options-resolver": "^5.4", - "symfony/polyfill-intl-icu": "^1.23.0", - "symfony/polyfill-intl-idn": "^1.23.0", - "symfony/polyfill-intl-normalizer": "^1.23.0", - "symfony/polyfill-mbstring": "^1.23.1", "symfony/property-access": "^5.4", "symfony/property-info": "^5.4", "symfony/rate-limiter": "^5.4", @@ -124,7 +122,6 @@ "ext-gd": "GDlib/Freetype is required for building images with text (GIFBUILDER) and can also be used to scale images", "ext-fileinfo": "Used for proper file type detection in the file abstraction layer", "ext-zlib": "TYPO3 uses zlib for amongst others output compression and un/packing t3x extension files", - "ext-intl": "Used for locale-aware operations", "ext-openssl": "OpenSSL is required for sending SMTP mails over an encrypted channel endpoint", "ext-zip": "", "ext-mysqli": "" diff --git a/composer.lock b/composer.lock index afad2370612672118b4deb6e5093e99339d42551..d81698f8fe081fc0e42955444156136106b1a4ca 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": "4250daef7fd84893cebcd2224af30ce2", + "content-hash": "ae5859a16d6f972e06167f7f231d3e78", "packages": [ { "name": "bacon/bacon-qr-code", @@ -3356,105 +3356,18 @@ ], "time": "2021-05-27T12:26:48+00:00" }, - { - "name": "symfony/polyfill-intl-icu", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-icu.git", - "reference": "4a80a521d6176870b6445cfb469c130f9cae1dda" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/4a80a521d6176870b6445cfb469c130f9cae1dda", - "reference": "4a80a521d6176870b6445cfb469c130f9cae1dda", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance and support of other locales than \"en\"" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Icu\\": "" - }, - "classmap": [ - "Resources/stubs" - ], - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's ICU-related data and classes", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "icu", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-icu/tree/v1.23.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-05-24T10:04:56+00:00" - }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.23.0", + "version": "v1.24.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65" + "reference": "749045c69efb97c70d25d7463abba812e91f3a44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/65bd267525e82759e7d8c4e8ceea44f398838e65", - "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/749045c69efb97c70d25d7463abba812e91f3a44", + "reference": "749045c69efb97c70d25d7463abba812e91f3a44", "shasum": "" }, "require": { @@ -3476,12 +3389,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Idn\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3512,7 +3425,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.24.0" }, "funding": [ { @@ -3528,11 +3441,11 @@ "type": "tidelift" } ], - "time": "2021-05-27T09:27:20+00:00" + "time": "2021-09-14T14:02:44+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.23.0", + "version": "v1.24.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -3561,12 +3474,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -3596,7 +3509,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.24.0" }, "funding": [ { @@ -3616,21 +3529,24 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.23.1", + "version": "v1.24.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-mbstring": "*" + }, "suggest": { "ext-mbstring": "For best performance" }, @@ -3645,12 +3561,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3676,7 +3592,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0" }, "funding": [ { @@ -3692,11 +3608,11 @@ "type": "tidelift" } ], - "time": "2021-05-27T12:26:48+00:00" + "time": "2021-11-30T18:21:41+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.23.0", + "version": "v1.24.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", @@ -3722,12 +3638,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3752,7 +3668,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.24.0" }, "funding": [ { @@ -9129,8 +9045,10 @@ "php": "^8.1", "ext-pdo": "*", "ext-dom": "*", + "ext-intl": "*", "ext-json": "*", "ext-libxml": "*", + "ext-mbstring": "*", "ext-pcre": "*", "ext-session": "*", "ext-xml": "*", diff --git a/typo3/sysext/core/Documentation/Changelog/12.0/Breaking-96889-RequirePHPMbstringAndIntl.rst b/typo3/sysext/core/Documentation/Changelog/12.0/Breaking-96889-RequirePHPMbstringAndIntl.rst new file mode 100644 index 0000000000000000000000000000000000000000..02fe4895bdab72e6fd627c855ea792ad3a972552 --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/12.0/Breaking-96889-RequirePHPMbstringAndIntl.rst @@ -0,0 +1,49 @@ +.. include:: ../../Includes.txt + +================================================ +Breaking: #96889 - Require PHP mbstring and intl +================================================ + +See :issue:`96889` + +Description +=========== + +The two PHP extensions :php:`mbstring` and :php:`intl` are required to +be loaded when running TYPO3 v12. + +:php:`mbstring` is a common extension that is either compiled directly +into PHP or available as standard package in all distributions and +operating systems. Similar for :php:`intl`. While there are symfony +packages that mimic these extensions partially if not available, these +"polyfill" packages are slower, and most importantly, they implement only +parts of the native extensions. To further improve TYPO3 character set +and internationalization handling, the system needs the full functionality. + + +Impact +====== + +System environments not providing these PHP extensions may fail. + + +Affected Installations +====================== + +The install tool "Environment Status" and the reports module notify +about missing PHP extensions, and it is shown during the installation process. + + +Migration +========= + +Provide the extensions in the PHP. + +A debian / ubuntu based Linux host typically install such packages with +a command similar to this: + +.. code-block:: bash + + sudo apt install php8.1-mbstring php8.1-intl + +.. index:: PHP-API, NotScanned, ext:core diff --git a/typo3/sysext/core/composer.json b/typo3/sysext/core/composer.json index e0191adb5f1a168a7145320eecb676c1c2943554..822bff3d53b7d98cb6de5007ab2f7eb651ff568b 100644 --- a/typo3/sysext/core/composer.json +++ b/typo3/sysext/core/composer.json @@ -22,8 +22,10 @@ "php": "^8.1", "ext-PDO": "*", "ext-dom": "*", + "ext-intl": "*", "ext-json": "*", "ext-libxml": "*", + "ext-mbstring": "*", "ext-pcre": "*", "ext-session": "*", "ext-xml": "*", @@ -60,10 +62,6 @@ "symfony/mailer": "^5.4", "symfony/mime": "^5.4", "symfony/options-resolver": "^5.4", - "symfony/polyfill-intl-icu": "^1.23.0", - "symfony/polyfill-intl-idn": "^1.23.0", - "symfony/polyfill-intl-normalizer": "^1.23.0", - "symfony/polyfill-mbstring": "^1.23.1", "symfony/rate-limiter": "^5.4", "symfony/routing": "^5.4", "symfony/yaml": "^5.4", @@ -78,7 +76,6 @@ "suggest": { "ext-fileinfo": "Used for proper file type detection in the file abstraction layer", "ext-gd": "GDlib/Freetype is required for building images with text (GIFBUILDER) and can also be used to scale images", - "ext-intl": "TYPO3 with unicode-based filesystems", "ext-mysqli": "", "ext-openssl": "OpenSSL is required for sending SMTP mails over an encrypted channel endpoint", "ext-zip": "", diff --git a/typo3/sysext/frontend/composer.json b/typo3/sysext/frontend/composer.json index ff54bf76c469e9cbd73a5244c9c922e5cb1b7a61..f04de071803fffbd0b99b4e24936c95c0a88d20e 100644 --- a/typo3/sysext/frontend/composer.json +++ b/typo3/sysext/frontend/composer.json @@ -20,7 +20,6 @@ }, "require": { "ext-libxml": "*", - "symfony/polyfill-mbstring": "^1.23.1", "typo3/cms-core": "12.0.*@dev" }, "conflict": { diff --git a/typo3/sysext/indexed_search/Classes/Indexer.php b/typo3/sysext/indexed_search/Classes/Indexer.php index 0fb8fe2161806fdc20865a69d51aeab9e0a03a73..259210b9ffdebe43589e977c8045c80696cd52d3 100644 --- a/typo3/sysext/indexed_search/Classes/Indexer.php +++ b/typo3/sysext/indexed_search/Classes/Indexer.php @@ -1044,11 +1044,9 @@ class Indexer $maxL = MathUtility::forceIntegerInRange($this->conf['index_descrLgd'], 0, 255, 200); if ($maxL) { $bodyDescription = preg_replace('/\s+/u', ' ', $contentArr['body']); - // Shorten the string. If the database has the wrong character set - // set the string is probably truncated again. mb_strcut can not be - // used here because it's not part of the fallback package - // symfony/polyfill-mbstring in case of the missing ext:mbstring. - $bodyDescription = \mb_substr($bodyDescription, 0, $maxL, 'utf-8'); + // Shorten the string. If the database has the wrong character set, + // the string is probably truncated again. + $bodyDescription = \mb_strcut($bodyDescription, 0, $maxL, 'utf-8'); } return $bodyDescription; } diff --git a/typo3/sysext/install/Classes/SystemEnvironment/Check.php b/typo3/sysext/install/Classes/SystemEnvironment/Check.php index 373a3e190911300bde1cd49d5d2796796e034c3a..eb9396e4a290a2874d650af7ad75d783c97437d8 100644 --- a/typo3/sysext/install/Classes/SystemEnvironment/Check.php +++ b/typo3/sysext/install/Classes/SystemEnvironment/Check.php @@ -65,8 +65,10 @@ class Check implements CheckInterface 'filter', 'gd', 'hash', + 'intl', 'json', 'libxml', + 'mbstring', 'PDO', 'session', 'SPL', @@ -81,7 +83,6 @@ class Check implements CheckInterface */ protected $suggestedPhpExtensions = [ 'fileinfo' => 'This extension is used for proper file type detection in the File Abstraction Layer.', - 'intl' => 'This extension is used for correct language and locale handling.', 'openssl' => 'This extension is used for sending SMTP mails over an encrypted channel endpoint.', ];