Skip to content

Commit 49a15d9

Browse files
authored
Merge branch 'release-7.x' into refactor/soap-ssl-validator-openssl
2 parents c85384d + 9246bb0 commit 49a15d9

38 files changed

Lines changed: 126 additions & 118 deletions

.github/workflows/php.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
php-version: ['8.5']
22+
php-version: ['8.5', '8.6']
2323

24-
uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_phplinter.yml@v1
24+
uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_phplinter.yml@release-2.x
2525
secrets: inherit
2626
with:
2727
php-version: ${{ matrix.php-version }}
@@ -31,7 +31,7 @@ jobs:
3131
strategy:
3232
fail-fast: false
3333

34-
uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_linter.yml@v1
34+
uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_linter.yml@release-2.x
3535
secrets: inherit
3636
with:
3737
enable_eslinter: false
@@ -47,7 +47,7 @@ jobs:
4747
fail-fast: false
4848
matrix:
4949
operating-system: [ubuntu-latest]
50-
php-versions: ['8.5']
50+
php-versions: ['8.5', '8.6']
5151

5252
steps:
5353
- name: Setup PHP, with composer and extensions
@@ -57,7 +57,7 @@ jobs:
5757
php-version: ${{ matrix.php-versions }}
5858
extensions: ctype, date, dom, filter, hash, intl, mbstring, openssl, pcre, soap, spl, sodium, xml
5959
tools: composer
60-
ini-values: error_reporting=E_ALL
60+
ini-values: error_reporting=E_ALL, display_errors=on
6161
coverage: pcov
6262

6363
- name: Setup problem matchers for PHP
@@ -118,7 +118,7 @@ jobs:
118118
fail-fast: true
119119
matrix:
120120
operating-system: [windows-latest]
121-
php-versions: ['8.5']
121+
php-versions: ['8.5', '8.6']
122122

123123
steps:
124124
- name: Setup PHP, with composer and extensions
@@ -129,7 +129,7 @@ jobs:
129129
extensions: ctype, date, dom, filter, hash, intl, mbstring, openssl, pcre,\
130130
soap, sodium, spl, xml, zip
131131
tools: composer
132-
ini-values: error_reporting=E_ALL
132+
ini-values: error_reporting=E_ALL, display_errors=on
133133
coverage: none
134134

135135
- name: Setup problem matchers for PHP

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@
3939
"ext-intl": "*",
4040

4141
"beste/clock": "~3.0",
42-
"mockery/mockery": "~1.6",
43-
"simplesamlphp/simplesamlphp": "^2.5",
44-
"simplesamlphp/simplesamlphp-test-framework": "~1.11",
4542
"icanhazstring/composer-unused": "^0.9.6",
4643
"maglnet/composer-require-checker": "^4.20"
44+
"mockery/mockery": "~1.6",
45+
"simplesamlphp/simplesamlphp": "^2.5",
46+
"simplesamlphp/simplesamlphp-test-framework": "~2.0",
4747
},
4848
"suggest": {
4949
"ext-soap": "*"

src/Configuration/IdentityProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use SimpleSAML\XMLSecurity\Constants as C;
99

1010
use function array_filter;
11-
use function array_pop;
11+
use function array_last;
1212
use function count;
1313
use function sprintf;
1414

@@ -94,7 +94,7 @@ public function getPrivateKey(string $name, ?bool $required = null)
9494
return null;
9595
}
9696

97-
return array_pop($key);
97+
return array_last($key);
9898
}
9999

100100

src/Configuration/ServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use SimpleSAML\XMLSecurity\Constants as C;
99

1010
use function array_filter;
11-
use function array_pop;
11+
use function array_last;
1212
use function count;
1313
use function sprintf;
1414

@@ -102,7 +102,7 @@ public function getPrivateKey(string $name, ?bool $required = null)
102102
return null;
103103
}
104104

105-
return array_pop($key);
105+
return array_last($key);
106106
}
107107

108108

src/XML/IdentifierTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use SimpleSAML\SAML2\XML\saml\NameID;
1313
use SimpleSAML\XMLSchema\Exception\TooManyElementsException;
1414

15-
use function array_pop;
15+
use function array_last;
1616

1717
/**
1818
* Trait grouping common functionality for elements that can hold identifiers.
@@ -94,7 +94,7 @@ protected static function getIdentifierFromXML(DOMElement $xml): ?IdentifierInte
9494
TooManyElementsException::class,
9595
);
9696

97-
$identifier = array_pop($identifiers);
97+
$identifier = array_last($identifiers);
9898

9999
return $identifier;
100100
}

src/XML/SignedElementTrait.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
use SimpleSAML\XMLSecurity\XML\ds\Signature;
1212
use SimpleSAML\XMLSecurity\XML\SignedElementTrait as BaseSignedElementTrait;
1313

14+
use function array_last;
15+
1416
/**
1517
* Helper trait for processing signed elements.
1618
*
@@ -37,7 +39,7 @@ protected function setSignature(Signature $signature): void
3739
$references = $signature->getSignedInfo()->getReferences();
3840
Assert::count($references, 1, "A signature needs to have exactly one Reference, %d found.");
3941

40-
$reference = array_pop($references);
42+
$reference = array_last($references);
4143
Assert::notNull($reference->getURI(), "URI attribute not found.", ReferenceValidationFailedException::class);
4244
Assert::startsWith(
4345
$reference->getURI()->getValue(),

src/XML/ecp/Request.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use SimpleSAML\XMLSchema\Exception\TooManyElementsException;
2020
use SimpleSAML\XMLSchema\Type\BooleanValue;
2121

22+
use function array_last;
2223
use function intval;
2324
use function strval;
2425

@@ -140,8 +141,8 @@ public static function fromXML(DOMElement $xml): static
140141
$idpList = IDPList::getChildrenOfClass($xml);
141142

142143
return new static(
143-
array_pop($issuer),
144-
array_pop($idpList),
144+
array_last($issuer),
145+
array_last($idpList),
145146
self::getOptionalAttribute($xml, 'ProviderName', SAMLStringValue::class, null),
146147
self::getOptionalAttribute($xml, 'IsPassive', BooleanValue::class, null),
147148
);

src/XML/ecp/SubjectConfirmation.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
use SimpleSAML\XMLSchema\Exception\MissingAttributeException;
1818
use SimpleSAML\XMLSchema\Exception\TooManyElementsException;
1919

20+
use function array_last;
21+
2022
/**
2123
* Class representing the ECP SubjectConfirmation element.
2224
*
@@ -113,7 +115,7 @@ public static function fromXML(DOMElement $xml): static
113115

114116
return new static(
115117
self::getAttribute($xml, 'Method', SAMLAnyURIValue::class),
116-
array_pop($subjectConfirmationData),
118+
array_last($subjectConfirmationData),
117119
);
118120
}
119121

src/XML/emd/RepublishRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException;
1515
use SimpleSAML\XMLSchema\Exception\SchemaViolationException;
1616

17-
use function array_pop;
17+
use function array_last;
1818

1919
/**
2020
* Class implementing RepublishRequest.
@@ -71,7 +71,7 @@ public static function fromXML(DOMElement $xml): static
7171
SchemaViolationException::class,
7272
);
7373

74-
return new static(array_pop($republishTarget));
74+
return new static(array_last($republishTarget));
7575
}
7676

7777

src/XML/md/AbstractRoleDescriptor.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
use SimpleSAML\XMLSchema\Type\IDValue;
2525
use SimpleSAML\XMLSchema\Type\QNameValue;
2626

27-
use function array_pop;
27+
use function array_last;
2828

2929
/**
3030
* Class representing a SAML2 RoleDescriptor element.
@@ -148,10 +148,10 @@ public static function fromXML(DOMElement $xml): static
148148
self::getOptionalAttribute($xml, 'ID', IDValue::class, null),
149149
self::getOptionalAttribute($xml, 'validUntil', SAMLDateTimeValue::class, null),
150150
self::getOptionalAttribute($xml, 'cacheDuration', DurationValue::class, null),
151-
array_pop($extensions),
151+
array_last($extensions),
152152
self::getOptionalAttribute($xml, 'errorURL', SAMLAnyURIValue::class, null),
153153
KeyDescriptor::getChildrenOfClass($xml),
154-
array_pop($orgs),
154+
array_last($orgs),
155155
ContactPerson::getChildrenOfClass($xml),
156156
self::getAttributesNSFromXML($xml),
157157
);

0 commit comments

Comments
 (0)