Modernize to PHP 8.1

This commit is contained in:
Yassine Guedidi
2025-04-05 14:01:48 +02:00
parent ca018c77e3
commit 9e2720cddc
26 changed files with 48 additions and 52 deletions

View File

@ -95,11 +95,11 @@ class GrabySiteConfigBuilder implements SiteConfigBuilder
$extraFields = [];
foreach ($extraFieldsStrings as $extraField) {
if (!str_contains($extraField, '=')) {
if (!str_contains((string) $extraField, '=')) {
continue;
}
[$fieldName, $fieldValue] = explode('=', $extraField, 2);
[$fieldName, $fieldValue] = explode('=', (string) $extraField, 2);
$extraFields[$fieldName] = $fieldValue;
}

View File

@ -98,9 +98,9 @@ class LoginFormAuthenticator
$extraFields = [];
foreach ($siteConfig->getExtraFields() as $fieldName => $fieldValue) {
if (str_starts_with($fieldValue, '@=')) {
if (str_starts_with((string) $fieldValue, '@=')) {
$fieldValue = $this->expressionLanguage->evaluate(
substr($fieldValue, 2),
substr((string) $fieldValue, 2),
[
'config' => $siteConfig,
]