Skip to content

Commit 765dd78

Browse files
author
Albrecht Köhnlein
committed
[TASK] Define explicit nullable types for compatibility with PHP 8.4
1 parent c676bcd commit 765dd78

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Classes/Service/XsdGenerator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ protected function getDefaultPrefixForNamespace(string $namespace): int|string
124124
*
125125
* @return array Array of generated XML target namespaces
126126
*/
127-
public function generateXsd(string $path, string $namespace = null): array
127+
public function generateXsd(string $path, ?string $namespace = null): array
128128
{
129129
$generatedNameSpaces = [];
130130
$namespaces = $this->componentLoader->getNamespaces();

Classes/ViewHelpers/Form/TranslatedValidationResultsViewHelper.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,10 @@ protected static function translateMessage(
162162
RenderingContextInterface $renderingContext,
163163
Message $message,
164164
string $translatePrefix = '',
165-
RootRenderableInterface $element = null,
166-
string $extensionName = null,
167-
string $languageKey = null,
168-
array $alternativeLanguageKeys = null
165+
?RootRenderableInterface $element = null,
166+
?string $extensionName = null,
167+
?string $languageKey = null,
168+
?array $alternativeLanguageKeys = null
169169
) {
170170
// Make sure that messages are translated only once
171171
$hash = spl_object_hash($message);
@@ -229,9 +229,9 @@ public static function translateValidationError(
229229
int $code,
230230
array $arguments,
231231
string $defaultValue = '',
232-
string $extensionName = null,
233-
string $languageKey = null,
234-
array $alternativeLanguageKeys = null
232+
?string $extensionName = null,
233+
?string $languageKey = null,
234+
?array $alternativeLanguageKeys = null
235235
): ?string {
236236
if ($alternativeLanguageKeys) {
237237
trigger_error('Calling translatedValidationResults with the argument $alternativeLanguageKeys will be removed in fluid-components 4.0', E_USER_DEPRECATED);

0 commit comments

Comments
 (0)