Skip to content

[BUGFIX] Declare nullable parameter explicitly for PHP 8.4 compatibility#14

Merged
bmack merged 1 commit intob13:v14from
davidsteeb:bugfix/php84-explicit-nullable
Apr 22, 2026
Merged

[BUGFIX] Declare nullable parameter explicitly for PHP 8.4 compatibility#14
bmack merged 1 commit intob13:v14from
davidsteeb:bugfix/php84-explicit-nullable

Conversation

@davidsteeb
Copy link
Copy Markdown
Contributor

Problem

On TYPO3 v14.3 / PHP 8.4+, every console command that loads TCA
(cache:flush, extension:setup, …) fails with:

PHP Runtime Deprecation Notice: Implicitly marking parameter $fieldConfigurationOverride as nullable is deprecated, the explicit nullable type must be used instead in vendor/b13/tag/Classes/TcaHelper.php line 21

PHP 8.4 deprecated implicitly nullable parameters of the form
Type $x = null. TYPO3's default ErrorHandler promotes that
deprecation into an exception via exceptionalErrors, which
aborts the command.

Fix

Change the signature of TcaHelper::buildFieldConfiguration()
from array $fieldConfigurationOverride = null to
?array $fieldConfigurationOverride = null.

This is a no-op at the behavioural level — the method body
already handles a null override correctly
(if (!empty($fieldConfigurationOverride))).

/cc @bmack

PHP 8.4 deprecates implicitly nullable parameters of the form
"Type $x = null". TYPO3's default ErrorHandler converts that
deprecation into an exception, so every console command that
loads TCA (cache:flush, extension:setup, …) fails when this
extension is installed on TYPO3 v14.3 / PHP 8.4+.

Switch the signature to explicit "?Type $x = null".
@davidsteeb davidsteeb requested a review from bmack April 22, 2026 10:35
@bmack bmack merged commit e209df1 into b13:v14 Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants