Fix PHP 8.2: ${var} deprecated string interpolation syntax
Ref: https://php.watch/versions/8.2/$%7Bvar%7D-string-interpolation-deprecated Left over to patch: - libraries/classes/Git.php#L397 - libraries/classes/Database/Qbe.php#L878 - libraries/classes/Database/Qbe.php#L879 Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
parent
af7338f706
commit
6a69face6c
@ -99,20 +99,20 @@ final class SaveController extends AbstractController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$changes[] = 'CHANGE ' . Table::generateAlter(
|
$changes[] = 'CHANGE ' . Table::generateAlter(
|
||||||
Util::getValueByKey($_POST, "field_orig.${i}", ''),
|
Util::getValueByKey($_POST, 'field_orig.' . $i, ''),
|
||||||
$_POST['field_name'][$i],
|
$_POST['field_name'][$i],
|
||||||
$_POST['field_type'][$i],
|
$_POST['field_type'][$i],
|
||||||
$_POST['field_length'][$i],
|
$_POST['field_length'][$i],
|
||||||
$_POST['field_attribute'][$i],
|
$_POST['field_attribute'][$i],
|
||||||
Util::getValueByKey($_POST, "field_collation.${i}", ''),
|
Util::getValueByKey($_POST, 'field_collation.' . $i, ''),
|
||||||
Util::getValueByKey($_POST, "field_null.${i}", 'NO'),
|
Util::getValueByKey($_POST, 'field_null.' . $i, 'NO'),
|
||||||
$_POST['field_default_type'][$i],
|
$_POST['field_default_type'][$i],
|
||||||
$_POST['field_default_value'][$i],
|
$_POST['field_default_value'][$i],
|
||||||
Util::getValueByKey($_POST, "field_extra.${i}", false),
|
Util::getValueByKey($_POST, 'field_extra.' . $i, false),
|
||||||
Util::getValueByKey($_POST, "field_comments.${i}", ''),
|
Util::getValueByKey($_POST, 'field_comments.' . $i, ''),
|
||||||
Util::getValueByKey($_POST, "field_virtuality.${i}", ''),
|
Util::getValueByKey($_POST, 'field_virtuality.' . $i, ''),
|
||||||
Util::getValueByKey($_POST, "field_expression.${i}", ''),
|
Util::getValueByKey($_POST, 'field_expression.' . $i, ''),
|
||||||
Util::getValueByKey($_POST, "field_move_to.${i}", ''),
|
Util::getValueByKey($_POST, 'field_move_to.' . $i, ''),
|
||||||
$columns_with_index
|
$columns_with_index
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -243,20 +243,20 @@ final class SaveController extends AbstractController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$changes_revert[] = 'CHANGE ' . Table::generateAlter(
|
$changes_revert[] = 'CHANGE ' . Table::generateAlter(
|
||||||
Util::getValueByKey($_POST, "field_orig.${i}", ''),
|
Util::getValueByKey($_POST, 'field_orig.' . $i, ''),
|
||||||
$_POST['field_name'][$i],
|
$_POST['field_name'][$i],
|
||||||
$_POST['field_type_orig'][$i],
|
$_POST['field_type_orig'][$i],
|
||||||
$_POST['field_length_orig'][$i],
|
$_POST['field_length_orig'][$i],
|
||||||
$_POST['field_attribute_orig'][$i],
|
$_POST['field_attribute_orig'][$i],
|
||||||
Util::getValueByKey($_POST, "field_collation_orig.${i}", ''),
|
Util::getValueByKey($_POST, 'field_collation_orig.' . $i, ''),
|
||||||
Util::getValueByKey($_POST, "field_null_orig.${i}", 'NO'),
|
Util::getValueByKey($_POST, 'field_null_orig.' . $i, 'NO'),
|
||||||
$_POST['field_default_type_orig'][$i],
|
$_POST['field_default_type_orig'][$i],
|
||||||
$_POST['field_default_value_orig'][$i],
|
$_POST['field_default_value_orig'][$i],
|
||||||
Util::getValueByKey($_POST, "field_extra_orig.${i}", false),
|
Util::getValueByKey($_POST, 'field_extra_orig.' . $i, false),
|
||||||
Util::getValueByKey($_POST, "field_comments_orig.${i}", ''),
|
Util::getValueByKey($_POST, 'field_comments_orig.' . $i, ''),
|
||||||
Util::getValueByKey($_POST, "field_virtuality_orig.${i}", ''),
|
Util::getValueByKey($_POST, 'field_virtuality_orig.' . $i, ''),
|
||||||
Util::getValueByKey($_POST, "field_expression_orig.${i}", ''),
|
Util::getValueByKey($_POST, 'field_expression_orig.' . $i, ''),
|
||||||
Util::getValueByKey($_POST, "field_move_to_orig.${i}", '')
|
Util::getValueByKey($_POST, 'field_move_to_orig.' . $i, '')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -168,47 +168,47 @@ final class ColumnsDefinition
|
|||||||
[
|
[
|
||||||
'Field' => Util::getValueByKey(
|
'Field' => Util::getValueByKey(
|
||||||
$_POST,
|
$_POST,
|
||||||
"field_name.${columnNumber}",
|
'field_name.' . $columnNumber,
|
||||||
null
|
null
|
||||||
),
|
),
|
||||||
'Type' => Util::getValueByKey(
|
'Type' => Util::getValueByKey(
|
||||||
$_POST,
|
$_POST,
|
||||||
"field_type.${columnNumber}",
|
'field_type.' . $columnNumber,
|
||||||
null
|
null
|
||||||
),
|
),
|
||||||
'Collation' => Util::getValueByKey(
|
'Collation' => Util::getValueByKey(
|
||||||
$_POST,
|
$_POST,
|
||||||
"field_collation.${columnNumber}",
|
'field_collation.' . $columnNumber,
|
||||||
''
|
''
|
||||||
),
|
),
|
||||||
'Null' => Util::getValueByKey(
|
'Null' => Util::getValueByKey(
|
||||||
$_POST,
|
$_POST,
|
||||||
"field_null.${columnNumber}",
|
'field_null.' . $columnNumber,
|
||||||
''
|
''
|
||||||
),
|
),
|
||||||
'DefaultType' => Util::getValueByKey(
|
'DefaultType' => Util::getValueByKey(
|
||||||
$_POST,
|
$_POST,
|
||||||
"field_default_type.${columnNumber}",
|
'field_default_type.' . $columnNumber,
|
||||||
'NONE'
|
'NONE'
|
||||||
),
|
),
|
||||||
'DefaultValue' => Util::getValueByKey(
|
'DefaultValue' => Util::getValueByKey(
|
||||||
$_POST,
|
$_POST,
|
||||||
"field_default_value.${columnNumber}",
|
'field_default_value.' . $columnNumber,
|
||||||
''
|
''
|
||||||
),
|
),
|
||||||
'Extra' => Util::getValueByKey(
|
'Extra' => Util::getValueByKey(
|
||||||
$_POST,
|
$_POST,
|
||||||
"field_extra.${columnNumber}",
|
'field_extra.' . $columnNumber,
|
||||||
null
|
null
|
||||||
),
|
),
|
||||||
'Virtuality' => Util::getValueByKey(
|
'Virtuality' => Util::getValueByKey(
|
||||||
$_POST,
|
$_POST,
|
||||||
"field_virtuality.${columnNumber}",
|
'field_virtuality.' . $columnNumber,
|
||||||
''
|
''
|
||||||
),
|
),
|
||||||
'Expression' => Util::getValueByKey(
|
'Expression' => Util::getValueByKey(
|
||||||
$_POST,
|
$_POST,
|
||||||
"field_expression.${columnNumber}",
|
'field_expression.' . $columnNumber,
|
||||||
''
|
''
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
@ -217,7 +217,7 @@ final class ColumnsDefinition
|
|||||||
$columnMeta['Key'] = '';
|
$columnMeta['Key'] = '';
|
||||||
$parts = explode(
|
$parts = explode(
|
||||||
'_',
|
'_',
|
||||||
Util::getValueByKey($_POST, "field_key.${columnNumber}", ''),
|
Util::getValueByKey($_POST, 'field_key.' . $columnNumber, ''),
|
||||||
2
|
2
|
||||||
);
|
);
|
||||||
if (count($parts) === 2 && $parts[1] == $columnNumber) {
|
if (count($parts) === 2 && $parts[1] == $columnNumber) {
|
||||||
@ -250,21 +250,21 @@ final class ColumnsDefinition
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$length = Util::getValueByKey($_POST, "field_length.${columnNumber}", $length);
|
$length = Util::getValueByKey($_POST, 'field_length.' . $columnNumber, $length);
|
||||||
$submit_attribute = Util::getValueByKey($_POST, "field_attribute.${columnNumber}", false);
|
$submit_attribute = Util::getValueByKey($_POST, 'field_attribute.' . $columnNumber, false);
|
||||||
$comments_map[$columnMeta['Field']] = Util::getValueByKey($_POST, "field_comments.${columnNumber}");
|
$comments_map[$columnMeta['Field']] = Util::getValueByKey($_POST, 'field_comments.' . $columnNumber);
|
||||||
|
|
||||||
$mime_map[$columnMeta['Field']] = array_merge(
|
$mime_map[$columnMeta['Field']] = array_merge(
|
||||||
$mime_map[$columnMeta['Field']] ?? [],
|
$mime_map[$columnMeta['Field']] ?? [],
|
||||||
[
|
[
|
||||||
'mimetype' => Util::getValueByKey($_POST, "field_mimetype.${columnNumber}"),
|
'mimetype' => Util::getValueByKey($_POST, 'field_mimetype.' . $columnNumber),
|
||||||
'transformation' => Util::getValueByKey(
|
'transformation' => Util::getValueByKey(
|
||||||
$_POST,
|
$_POST,
|
||||||
"field_transformation.${columnNumber}"
|
'field_transformation.' . $columnNumber
|
||||||
),
|
),
|
||||||
'transformation_options' => Util::getValueByKey(
|
'transformation_options' => Util::getValueByKey(
|
||||||
$_POST,
|
$_POST,
|
||||||
"field_transformation_options.${columnNumber}"
|
'field_transformation_options.' . $columnNumber
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
@ -383,45 +383,45 @@ final class ColumnsDefinition
|
|||||||
$form_params = array_merge(
|
$form_params = array_merge(
|
||||||
$form_params,
|
$form_params,
|
||||||
[
|
[
|
||||||
"field_default_value_orig[${columnNumber}]" => Util::getValueByKey(
|
'field_default_value_orig[' . $columnNumber . ']' => Util::getValueByKey(
|
||||||
$columnMeta,
|
$columnMeta,
|
||||||
'Default',
|
'Default',
|
||||||
''
|
''
|
||||||
),
|
),
|
||||||
"field_default_type_orig[${columnNumber}]" => Util::getValueByKey(
|
'field_default_type_orig[' . $columnNumber . ']' => Util::getValueByKey(
|
||||||
$columnMeta,
|
$columnMeta,
|
||||||
'DefaultType',
|
'DefaultType',
|
||||||
''
|
''
|
||||||
),
|
),
|
||||||
"field_collation_orig[${columnNumber}]" => Util::getValueByKey(
|
'field_collation_orig[' . $columnNumber . ']' => Util::getValueByKey(
|
||||||
$columnMeta,
|
$columnMeta,
|
||||||
'Collation',
|
'Collation',
|
||||||
''
|
''
|
||||||
),
|
),
|
||||||
"field_attribute_orig[${columnNumber}]" => trim(
|
'field_attribute_orig[' . $columnNumber . ']' => trim(
|
||||||
Util::getValueByKey($extracted_columnspec, 'attribute', '')
|
Util::getValueByKey($extracted_columnspec, 'attribute', '')
|
||||||
),
|
),
|
||||||
"field_null_orig[${columnNumber}]" => Util::getValueByKey(
|
'field_null_orig[' . $columnNumber . ']' => Util::getValueByKey(
|
||||||
$columnMeta,
|
$columnMeta,
|
||||||
'Null',
|
'Null',
|
||||||
''
|
''
|
||||||
),
|
),
|
||||||
"field_extra_orig[${columnNumber}]" => Util::getValueByKey(
|
'field_extra_orig[' . $columnNumber . ']' => Util::getValueByKey(
|
||||||
$columnMeta,
|
$columnMeta,
|
||||||
'Extra',
|
'Extra',
|
||||||
''
|
''
|
||||||
),
|
),
|
||||||
"field_comments_orig[${columnNumber}]" => Util::getValueByKey(
|
'field_comments_orig[' . $columnNumber . ']' => Util::getValueByKey(
|
||||||
$columnMeta,
|
$columnMeta,
|
||||||
'Comment',
|
'Comment',
|
||||||
''
|
''
|
||||||
),
|
),
|
||||||
"field_virtuality_orig[${columnNumber}]" => Util::getValueByKey(
|
'field_virtuality_orig[' . $columnNumber . ']' => Util::getValueByKey(
|
||||||
$columnMeta,
|
$columnMeta,
|
||||||
'Virtuality',
|
'Virtuality',
|
||||||
''
|
''
|
||||||
),
|
),
|
||||||
"field_expression_orig[${columnNumber}]" => Util::getValueByKey(
|
'field_expression_orig[' . $columnNumber . ']' => Util::getValueByKey(
|
||||||
$columnMeta,
|
$columnMeta,
|
||||||
'Expression',
|
'Expression',
|
||||||
''
|
''
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user