diff --git a/composer.json b/composer.json
index dbbf31bec1ea6fc2c52c40cd6a7282b4a3447849..ae8b0fd587699abec2a9a0c8d230f89d0750b00e 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 dbe03cd9602d619f1c3b0618915ef1b019f9a40d..4aa5d2a1f9989e57eb08432032f13d7e807902ce 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 1d19f720cdff717e8d951a4bf8d4e24d208ded41..e7df3b8c716582162901ff98f634d4040c038c2e 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);