From 6c0fe9b018bf1c389c6d54f8c6b65924af3ac415 Mon Sep 17 00:00:00 2001 From: Thomas Hohn <thomas@hohn.dk> Date: Wed, 8 Mar 2023 10:02:09 +0100 Subject: [PATCH] [TASK] Add todo for strictly typing class UnableToLinkException The constructor of UnableToLinkException should be strictly typed, since the method getLinkText() is strictly typed. Also make the variable declaration of $linkText strictly typed. It will throw an error if $linkText isn't a string. Added a todo for TYPO3 v13. Resolves: #100119 Related: #100106 Releases: main Change-Id: Ifbb9a3f5b4aa1fd1588eb0596731377f41bc5ffd Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78072 Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: core-ci <typo3@b13.com> Tested-by: Georg Ringer <georg.ringer@gmail.com> Reviewed-by: Georg Ringer <georg.ringer@gmail.com> Tested-by: Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de> --- .../sysext/frontend/Classes/Typolink/UnableToLinkException.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/typo3/sysext/frontend/Classes/Typolink/UnableToLinkException.php b/typo3/sysext/frontend/Classes/Typolink/UnableToLinkException.php index a095f0e8f6f7..1020ddf2fa84 100644 --- a/typo3/sysext/frontend/Classes/Typolink/UnableToLinkException.php +++ b/typo3/sysext/frontend/Classes/Typolink/UnableToLinkException.php @@ -26,6 +26,7 @@ class UnableToLinkException extends Exception { /** * @var string the text which should have gone inside the + * @todo Make $linkText strictly typed in TYPO3 v13 */ protected $linkText; @@ -36,6 +37,7 @@ class UnableToLinkException extends Exception * @param int $code [optional] The Exception code. * @param \Throwable $previous [optional] The previous throwable used for the exception chaining. * @param string $linkText [optional] + * @todo Make the signature strictly typed in TYPO3 v13 */ public function __construct($message = '', $code = 0, \Throwable $previous = null, $linkText = '') { -- GitLab