Skip to content

Commit aa02368

Browse files
authored
Merge pull request #35 from SanderMuller/PHP8.4-support
Add explicit nullable types for PHP 8.4 support
2 parents 83dbbe6 + 871e971 commit aa02368

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

.github/workflows/phpstan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup PHP
1919
uses: shivammathur/setup-php@v2
2020
with:
21-
php-version: '8.3'
21+
php-version: '8.4'
2222
coverage: none
2323

2424
- name: Install composer dependencies

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
fail-fast: true
1919
matrix:
2020
os: [ ubuntu-latest, windows-latest ]
21-
php: [ 8.1, 8.2, 8.3 ]
21+
php: [ 8.1, 8.2, 8.3, 8.4 ]
2222
stability: [ prefer-lowest, prefer-stable ]
2323

2424
name: P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}

src/Data/CDATA.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ class CDATA
1616
*
1717
* Base XML Element DTO
1818
*/
19-
public function __construct(string $content = null)
19+
public function __construct(?string $content = null)
2020
{
2121
$this->setContent($content);
2222
}
2323

2424
/**
2525
* Create an element instance
2626
*/
27-
public static function make(string $content = null): static
27+
public static function make(?string $content = null): static
2828
{
2929
return new static($content);
3030
}

src/XmlWriter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class XmlWriter
3838
/**
3939
* Constructor
4040
*/
41-
public function __construct(string $xmlEncoding = 'utf-8', string $xmlVersion = '1.0', bool $xmlStandalone = null)
41+
public function __construct(string $xmlEncoding = 'utf-8', string $xmlVersion = '1.0', ?bool $xmlStandalone = null)
4242
{
4343
$this->xmlEncoding = $xmlEncoding;
4444
$this->xmlVersion = $xmlVersion;
@@ -51,7 +51,7 @@ public function __construct(string $xmlEncoding = 'utf-8', string $xmlVersion =
5151
/**
5252
* Create an XML writer instance
5353
*/
54-
public static function make(string $xmlEncoding = 'utf-8', string $xmlVersion = '1.0', bool $xmlStandalone = null): static
54+
public static function make(string $xmlEncoding = 'utf-8', string $xmlVersion = '1.0', ?bool $xmlStandalone = null): static
5555
{
5656
return new static($xmlEncoding, $xmlVersion, $xmlStandalone);
5757
}

0 commit comments

Comments
 (0)