Skip to content

Commit 215c158

Browse files
authored
Merge branch 'master' into feature/ds-missing-elements
2 parents b5fed62 + 2f478b2 commit 215c158

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+51
-51
lines changed

.github/workflows/php.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
uses: shivammathur/setup-php@v2
5353
with:
5454
# Should be the higest supported version, so we can use the newest tools
55-
php-version: '8.3'
55+
php-version: '8.4'
5656
tools: composer, composer-require-checker, composer-unused, phpcs
5757
extensions: ctype, date, dom, filter, hash, mbstring, openssl, pcre, spl, xml
5858
coverage: none
@@ -144,7 +144,7 @@ jobs:
144144
fail-fast: false
145145
matrix:
146146
operating-system: [ubuntu-latest]
147-
php-versions: ['8.1', '8.2', '8.3']
147+
php-versions: ['8.1', '8.2', '8.3', '8.4']
148148

149149
steps:
150150
- name: Print OpenSSL version
@@ -187,15 +187,15 @@ jobs:
187187
run: composer install --no-progress --prefer-dist --optimize-autoloader
188188

189189
- name: Run unit tests with coverage
190-
if: ${{ matrix.php-versions == '8.3' }}
190+
if: ${{ matrix.php-versions == '8.4' }}
191191
run: vendor/bin/phpunit
192192

193193
- name: Run unit tests (no coverage)
194-
if: ${{ matrix.php-versions != '8.3' }}
194+
if: ${{ matrix.php-versions != '8.4' }}
195195
run: vendor/bin/phpunit --no-coverage
196196

197197
- name: Save coverage data
198-
if: ${{ matrix.php-versions == '8.3' }}
198+
if: ${{ matrix.php-versions == '8.4' }}
199199
uses: actions/upload-artifact@v4
200200
with:
201201
name: coverage-data
@@ -209,7 +209,7 @@ jobs:
209209
fail-fast: true
210210
matrix:
211211
operating-system: [windows-latest]
212-
php-versions: ['8.1', '8.2', '8.3']
212+
php-versions: ['8.1', '8.2', '8.3', '8.4']
213213

214214
steps:
215215
- name: Print OpenSSL version

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
"ext-pcre": "*",
4444
"ext-spl": "*",
4545

46-
"simplesamlphp/assert": "^1.3",
47-
"simplesamlphp/xml-common": "^1.19.0"
46+
"simplesamlphp/assert": "^1.5",
47+
"simplesamlphp/xml-common": "^1.20.0"
4848
},
4949
"require-dev": {
5050
"simplesamlphp/simplesamlphp-test-framework": "^1.7"

src/Utils/XML.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ class XML
3333
public static function canonicalizeData(
3434
DOMElement $element,
3535
string $c14nMethod,
36-
array $xpaths = null,
37-
array $prefixes = null,
36+
?array $xpaths = null,
37+
?array $prefixes = null,
3838
): string {
3939
$withComments = match ($c14nMethod) {
4040
C::C14N_EXCLUSIVE_WITH_COMMENTS, C::C14N_INCLUSIVE_WITH_COMMENTS => true,

src/XML/EncryptedElementTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public static function fromXML(DOMElement $xml): static
179179
/**
180180
* @inheritDoc
181181
*/
182-
public function toXML(DOMElement $parent = null): DOMElement
182+
public function toXML(?DOMElement $parent = null): DOMElement
183183
{
184184
$e = $this->instantiateParentElement($parent);
185185
$this->encryptedData->toXML($e);
@@ -196,7 +196,7 @@ public function toXML(DOMElement $parent = null): DOMElement
196196
* @param \DOMElement|null $parent The element we should append to.
197197
* @return \DOMElement
198198
*/
199-
abstract public function instantiateParentElement(DOMElement $parent = null): DOMElement;
199+
abstract public function instantiateParentElement(?DOMElement $parent = null): DOMElement;
200200

201201

202202
/**

src/XML/SignedElementInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,5 @@ public function isSigned(): bool;
6565
* in the signature.
6666
* @throws \SimpleSAML\XMLSecurity\Exception\RuntimeException if the signature fails to validate.
6767
*/
68-
public function verify(SignatureAlgorithmInterface $verifier = null): SignedElementInterface;
68+
public function verify(?SignatureAlgorithmInterface $verifier = null): SignedElementInterface;
6969
}

src/XML/SignedElementTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ public function isSigned(): bool
251251
* in the signature.
252252
* @throws \SimpleSAML\XMLSecurity\Exception\RuntimeException if the signature fails to verify.
253253
*/
254-
public function verify(SignatureAlgorithmInterface $verifier = null): SignedElementInterface
254+
public function verify(?SignatureAlgorithmInterface $verifier = null): SignedElementInterface
255255
{
256256
if (!$this->isSigned()) {
257257
throw new NoSignatureFoundException();

src/XML/ds/AbstractKeyInfoType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function getInfo(): array
111111
* @param \DOMElement|null $parent The element we should append this KeyInfo to.
112112
* @return \DOMElement
113113
*/
114-
public function toXML(DOMElement $parent = null): DOMElement
114+
public function toXML(?DOMElement $parent = null): DOMElement
115115
{
116116
$e = $this->instantiateParentElement($parent);
117117

src/XML/ds/CanonicalizationMethod.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public static function fromXML(DOMElement $xml): static
7878
* @param \DOMElement|null $parent The element we should append this KeyName element to.
7979
* @return \DOMElement
8080
*/
81-
public function toXML(DOMElement $parent = null): DOMElement
81+
public function toXML(?DOMElement $parent = null): DOMElement
8282
{
8383
$e = $this->instantiateParentElement($parent);
8484
$e->setAttribute('Algorithm', $this->getAlgorithm());

src/XML/ds/DigestMethod.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public static function fromXML(DOMElement $xml): static
8484
* @param \DOMElement|null $parent The element we should append this DigestMethod element to.
8585
* @return \DOMElement
8686
*/
87-
public function toXML(DOMElement $parent = null): DOMElement
87+
public function toXML(?DOMElement $parent = null): DOMElement
8888
{
8989
$e = $this->instantiateParentElement($parent);
9090
$e->setAttribute('Algorithm', $this->getAlgorithm());

src/XML/ds/DsObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public static function fromXML(DOMElement $xml): static
123123
* @param \DOMElement|null $parent The element we should append this ds:Object element to.
124124
* @return \DOMElement
125125
*/
126-
public function toXML(DOMElement $parent = null): DOMElement
126+
public function toXML(?DOMElement $parent = null): DOMElement
127127
{
128128
$e = $this->instantiateParentElement($parent);
129129

0 commit comments

Comments
 (0)