From 191b90a15b97e47fb6fda519c1178a74e4319906 Mon Sep 17 00:00:00 2001 From: Andreas Kienast <a.fernandez@scripting-base.de> Date: Mon, 13 May 2024 10:54:20 +0200 Subject: [PATCH] [TASK] Update `phpstan/phpstan` to 1.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit updates `phpstan/phpstan` to 1.11.0 and its related friends to their latest respective version. Executed command composer require --dev \ phpstan/phpdoc-parser:^1.29.0 \ phpstan/phpstan:^1.11.0 \ phpstan/phpstan-phpunit:^1.4.0 \ -W Resolves: #103823 Releases: main, 13.1, 12.4 Change-Id: Idc057895d503089c03a8cb5358be4ea7e3575e93 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84221 Reviewed-by: Benjamin Franzke <ben@bnf.dev> Tested-by: core-ci <typo3@b13.com> Reviewed-by: Stefan Bürk <stefan@buerk.tech> Tested-by: Stefan Bürk <stefan@buerk.tech> Tested-by: Benjamin Franzke <ben@bnf.dev> --- composer.json | 6 +-- composer.lock | 42 +++++++++---------- .../sysext/core/Classes/Html/HtmlCropper.php | 2 +- 3 files changed, 23 insertions(+), 27 deletions(-) diff --git a/composer.json b/composer.json index dbbf31bec1ea..ae8b0fd58769 100644 --- a/composer.json +++ b/composer.json @@ -111,9 +111,9 @@ "friendsofphp/php-cs-fixer": "^3.50", "friendsoftypo3/phpstan-typo3": "^0.9.0", "php-webdriver/webdriver": "^1.15.1", - "phpstan/phpdoc-parser": "^1.26.0", - "phpstan/phpstan": "^1.10.59", - "phpstan/phpstan-phpunit": "^1.3.16", + "phpstan/phpdoc-parser": "^1.29.0", + "phpstan/phpstan": "^1.11.0", + "phpstan/phpstan-phpunit": "^1.4.0", "phpunit/phpunit": "^11.0.3", "sokil/php-isocodes-db-i18n": "^4.0.22", "symfony/translation": "^7.0", diff --git a/composer.lock b/composer.lock index dbe03cd9602d..4aa5d2a1f998 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": "a863272cc92af84756475e5695c61870", + "content-hash": "6dfcba6d6d0e69822307a60fb4c8a43b", "packages": [ { "name": "bacon/bacon-qr-code", @@ -1500,16 +1500,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.26.0", + "version": "1.29.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "231e3186624c03d7e7c890ec662b81e6b0405227" + "reference": "536889f2b340489d328f5ffb7b02bb6b183ddedc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/231e3186624c03d7e7c890ec662b81e6b0405227", - "reference": "231e3186624c03d7e7c890ec662b81e6b0405227", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/536889f2b340489d328f5ffb7b02bb6b183ddedc", + "reference": "536889f2b340489d328f5ffb7b02bb6b183ddedc", "shasum": "" }, "require": { @@ -1541,9 +1541,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.26.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.0" }, - "time": "2024-02-23T16:05:55+00:00" + "time": "2024-05-06T12:04:23+00:00" }, { "name": "psr/cache", @@ -6511,16 +6511,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.59", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "e607609388d3a6d418a50a49f7940e8086798281" + "reference": "666cb1703742cea9cc80fee631f0940e1592fa6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e607609388d3a6d418a50a49f7940e8086798281", - "reference": "e607609388d3a6d418a50a49f7940e8086798281", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/666cb1703742cea9cc80fee631f0940e1592fa6e", + "reference": "666cb1703742cea9cc80fee631f0940e1592fa6e", "shasum": "" }, "require": { @@ -6563,31 +6563,27 @@ { "url": "https://github.com/phpstan", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", - "type": "tidelift" } ], - "time": "2024-02-20T13:59:13+00:00" + "time": "2024-05-13T06:02:22+00:00" }, { "name": "phpstan/phpstan-phpunit", - "version": "1.3.16", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-phpunit.git", - "reference": "d5242a59d035e46774f2e634b374bc39ff62cb95" + "reference": "f3ea021866f4263f07ca3636bf22c64be9610c11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/d5242a59d035e46774f2e634b374bc39ff62cb95", - "reference": "d5242a59d035e46774f2e634b374bc39ff62cb95", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/f3ea021866f4263f07ca3636bf22c64be9610c11", + "reference": "f3ea021866f4263f07ca3636bf22c64be9610c11", "shasum": "" }, "require": { "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.10" + "phpstan/phpstan": "^1.11" }, "conflict": { "phpunit/phpunit": "<7.0" @@ -6619,9 +6615,9 @@ "description": "PHPUnit extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-phpunit/issues", - "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.16" + "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.4.0" }, - "time": "2024-02-23T09:51:20+00:00" + "time": "2024-04-20T06:39:00+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/typo3/sysext/core/Classes/Html/HtmlCropper.php b/typo3/sysext/core/Classes/Html/HtmlCropper.php index 1d19f720cdff..e7df3b8c7165 100644 --- a/typo3/sysext/core/Classes/Html/HtmlCropper.php +++ b/typo3/sysext/core/Classes/Html/HtmlCropper.php @@ -112,7 +112,7 @@ class HtmlCropper implements LoggerAwareInterface // If we have found any html entities, these should be counted as 1 character. // Strategy is to replace all found entities with an arbitrary character ($) // and use this new string to count offsets. - if (($entityMatches ?? []) !== []) { + if ($entityMatches !== []) { $escapedContent = str_replace('$', ' ', $fullTempContent); $replacedContent = preg_replace($entityPattern, '$', $escapedContent, -1, $count); $croppedContent = !$cropFromRight ? mb_substr($replacedContent, 0, $cropPosition) : mb_substr($replacedContent, $numberOfChars, $cropPosition); -- GitLab