Skip to content
Snippets Groups Projects
Commit ab644a3c authored by Stefan Bürk's avatar Stefan Bürk
Browse files

[TASK] Avoid implicitly nullable class method parameter in `EXT:belog`

With PHP 8.4 marking method parameter implicitly nullable
is deprecated and will emit a `E_DEPRECATED` warning. One
recommended way to resolve this, is making it explicitly
nullable using the `?` nullable operator or adding a null
type to an union type definition. [1]

This prepares the way towards PHP 8.4 compatibility.

[1] https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated

Resolves: #104265
Releases: main, 12.4, 11.5
Change-Id: Ifb6887a9fc77bc74c2d287b34a6876cc5da477da
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/85020


Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarMogens Fiebrandt <mogens.fiebrandt@googlemail.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
parent 9668593e
Branches
Tags
No related merge requests found
......@@ -66,7 +66,7 @@ class BackendLogController extends ActionController
/**
* Show general information and the installed modules
*/
public function listAction(Constraint $constraint = null, string $operation = ''): ResponseInterface
public function listAction(?Constraint $constraint = null, string $operation = ''): ResponseInterface
{
if ($operation === 'reset-filters') {
$constraint = new Constraint();
......
......@@ -35,7 +35,7 @@ final class SystemInformationController
{
protected array $backendUserConfiguration;
public function __construct(array $backendUserConfiguration = null)
public function __construct(?array $backendUserConfiguration = null)
{
$this->backendUserConfiguration = $backendUserConfiguration ?? $GLOBALS['BE_USER']->uc;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment