Skip to content

Commit d546b81

Browse files
committed
Add PHP82 + PSL2 Support
1 parent 7201b06 commit d546b81

File tree

10 files changed

+19
-10
lines changed

10 files changed

+19
-10
lines changed

.github/workflows/analyzers.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
matrix:
99
operating-system: [ubuntu-latest]
10-
php-versions: ['8.0', '8.1']
10+
php-versions: ['8.1', '8.2']
1111
fail-fast: false
1212
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
1313
steps:

.github/workflows/code-style.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
matrix:
99
operating-system: [ubuntu-latest]
10-
php-versions: ['8.0', '8.1']
10+
php-versions: ['8.1', '8.2']
1111
fail-fast: false
1212
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
1313
steps:

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
matrix:
99
operating-system: [ubuntu-latest]
10-
php-versions: ['8.0', '8.1']
10+
php-versions: ['8.1', '8.2']
1111
fail-fast: false
1212
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
1313
steps:

.phive/phars.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
3-
<phar name="psalm" version="^4.13.1" installed="4.13.1" location="./tools/psalm.phar" copy="true"/>
4-
<phar name="php-cs-fixer" version="^3.3.2" installed="3.3.2" location="./tools/php-cs-fixer.phar" copy="true"/>
3+
<phar name="psalm" version="^4.29.0" installed="4.29.0" location="./tools/psalm.phar" copy="true"/>
4+
<phar name="php-cs-fixer" version="^3.12.0" installed="3.12.0" location="./tools/php-cs-fixer.phar" copy="true"/>
55
</phive>

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
}
2121
],
2222
"require": {
23-
"php": "^8.0",
23+
"php": "~8.1.0 || ~8.2.0",
2424
"ext-dom": "*",
25-
"veewee/xml": "^1.0"
25+
"veewee/xml": "^2.1"
2626
},
2727
"require-dev": {
2828
"phpunit/phpunit": "^9.5"

psalm.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<psalm
33
errorLevel="1"
44
resolveFromConfigFile="true"
5-
forbidEcho="true"
65
strictBinaryOperands="true"
76
phpVersion="8.0"
87
allowStringToStandInForClass="true"

src/Builder/SoapHeader.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33

44
namespace Soap\Xml\Builder;
55

6+
use Closure;
67
use DOMElement;
78
use DOMNode;
89
use VeeWee\Xml\Dom\Builder\Builder;
10+
use function Psl\Vec\map;
911
use function VeeWee\Xml\Dom\Builder\children;
1012
use function VeeWee\Xml\Dom\Builder\namespaced_element;
1113

@@ -37,7 +39,10 @@ public function __invoke(DOMNode $node): DOMNode
3739
namespaced_element(
3840
$this->namespace,
3941
$this->name,
40-
...$this->configurators
42+
...map(
43+
$this->configurators,
44+
static fn (callable $configurator): Closure => $configurator(...)
45+
)
4146
)
4247
)($node);
4348
}

src/Builder/SoapHeaders.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
namespace Soap\Xml\Builder;
44

5+
use Closure;
56
use DOMElement;
67
use DOMNode;
78
use VeeWee\Xml\Dom\Builder\Builder;
9+
use function Psl\Vec\map;
810
use function VeeWee\Xml\Dom\Builder\namespaced_element;
911
use function VeeWee\Xml\Dom\Locator\Node\detect_document;
1012
use function VeeWee\Xml\Dom\Locator\root_namespace_uri;
@@ -35,7 +37,10 @@ public function __invoke(DOMNode $node): DOMNode
3537
return namespaced_element(
3638
root_namespace_uri()($document) ?? '',
3739
'soap:Header',
38-
...$this->configurators
40+
...map(
41+
$this->configurators,
42+
static fn (callable $configurator): Closure => $configurator(...)
43+
)
3944
)($node);
4045
}
4146
}

tools/php-cs-fixer.phar

163 KB
Binary file not shown.

tools/psalm.phar

591 KB
Binary file not shown.

0 commit comments

Comments
 (0)