Skip to content

Commit f56b220

Browse files
authored
Fix explicit nullable parameter for PHP 8.4 compatibility (#233)
1 parent edee672 commit f56b220

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@
4040
'keep_multiple_spaces_after_comma' => true,
4141
],
4242
'single_trait_insert_per_statement' => true,
43+
'nullable_type_declaration_for_default_null_value' => true,
4344
])
4445
->setRiskyAllowed(true);

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
"scripts": {
3939
"test": "vendor/bin/pest"
4040
},
41+
"extra": {
42+
"branch-alias": {
43+
"dev-main": "3.x-dev"
44+
}
45+
},
4146
"config": {
4247
"allow-plugins": {
4348
"pestphp/pest-plugin": true

src/ArrayToXml.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ public static function convert(
6868
array $array,
6969
$rootElement = '',
7070
bool $replaceSpacesByUnderScoresInKeyNames = true,
71-
string $xmlEncoding = null,
71+
?string $xmlEncoding = null,
7272
string $xmlVersion = '1.0',
7373
array $domProperties = [],
74-
bool $xmlStandalone = null,
74+
?bool $xmlStandalone = null,
7575
bool $addXmlDeclaration = true,
7676
array $options = ['convertNullToXsiNil' => false]
7777
): string {

0 commit comments

Comments
 (0)