Skip to content

Commit 76e2c67

Browse files
authored
Merge pull request #2 from simplesamlphp/feature/php83
Feature/php83
2 parents 2577821 + e5547ec commit 76e2c67

21 files changed

Lines changed: 49 additions & 99 deletions

.github/workflows/php.yml

Lines changed: 10 additions & 10 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.2', '8.3', '8.4', '8.5']
22+
php-version: ['8.3', '8.4', '8.5']
2323

24-
uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_phplinter.yml@v1.10.6
24+
uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_phplinter.yml@v1.11.0
2525
with:
2626
php-version: ${{ matrix.php-version }}
2727

@@ -30,7 +30,7 @@ jobs:
3030
strategy:
3131
fail-fast: false
3232

33-
uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_linter.yml@v1.10.6
33+
uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_linter.yml@v1.11.0
3434
with:
3535
enable_eslinter: false
3636
enable_jsonlinter: true
@@ -45,15 +45,15 @@ jobs:
4545
fail-fast: false
4646
matrix:
4747
operating-system: [ubuntu-latest]
48-
php-versions: ['8.2', '8.3', '8.4', '8.5']
48+
php-versions: ['8.3', '8.4', '8.5']
4949

5050
steps:
5151
- name: Setup PHP, with composer and extensions
5252
# https://github.com/shivammathur/setup-php
5353
uses: shivammathur/setup-php@v2
5454
with:
5555
php-version: ${{ matrix.php-versions }}
56-
extensions: ctype, date, dom, filter, pcre, soap, spl, xml
56+
extensions: ctype, date, dom, filter, intl, pcre, soap, sodium, spl, xml
5757
tools: composer
5858
ini-values: error_reporting=E_ALL
5959
coverage: pcov
@@ -107,15 +107,15 @@ jobs:
107107
fail-fast: true
108108
matrix:
109109
operating-system: [windows-latest]
110-
php-versions: ['8.2', '8.3', '8.4', '8.5']
110+
php-versions: ['8.3', '8.4', '8.5']
111111

112112
steps:
113113
- name: Setup PHP, with composer and extensions
114114
# https://github.com/shivammathur/setup-php
115115
uses: shivammathur/setup-php@v2
116116
with:
117117
php-version: ${{ matrix.php-versions }}
118-
extensions: ctype, date, dom, filter, pcre, soap, spl, xml
118+
extensions: ctype, date, dom, filter, intl, pcre, soap, sodium, spl, xml
119119
tools: composer
120120
ini-values: error_reporting=E_ALL
121121
coverage: none
@@ -163,7 +163,7 @@ jobs:
163163
# Should be the higest supported version, so we can use the newest tools
164164
php-version: '8.5'
165165
tools: composer, composer-require-checker, composer-unused, phpcs
166-
extensions: ctype, date, dom, filter, pcre, soap, spl, xml
166+
extensions: ctype, date, dom, filter, intl, pcre, soap, sodium, spl, xml
167167
coverage: none
168168

169169
- name: Setup problem matchers for PHP
@@ -215,8 +215,8 @@ jobs:
215215
uses: shivammathur/setup-php@v2
216216
with:
217217
# Should be the lowest supported version
218-
php-version: '8.2'
219-
extensions: ctype, date, dom, filter, pcre, soap, spl, xml
218+
php-version: '8.3'
219+
extensions: ctype, date, dom, filter, intl, pcre, soap, sodium, spl, xml
220220
tools: composer
221221
coverage: none
222222

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
}
1111
],
1212
"require": {
13-
"php": "^8.2",
13+
"php": "^8.3",
1414
"ext-dom": "*",
1515
"ext-spl": "*",
1616

1717
"simplesamlphp/assert": "~1.9",
1818
"simplesamlphp/xml-common": "~2.4"
1919
},
2020
"require-dev": {
21-
"simplesamlphp/simplesamlphp-test-framework": "~1.10",
21+
"simplesamlphp/simplesamlphp-test-framework": "~1.11",
2222
"simplesamlphp/xml-security": "~2.0"
2323
},
2424
"autoload": {

src/Assert/DateTimeTrait.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
trait DateTimeTrait
1414
{
1515
/**
16-
* @param string $value
17-
* @param string $message
1816
*/
1917
protected static function validDateTime(string $value, string $message = ''): void
2018
{

src/Constants.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,21 @@ class Constants extends \SimpleSAML\XML\Constants
1515
/**
1616
* The namespace for WS-Security extensions.
1717
*/
18-
public const NS_SEC_EXT = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';
18+
public const string NS_SEC_EXT =
19+
'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';
1920

2021
/**
2122
* The namespace for WS-Security utilities protocol.
2223
*/
23-
public const NS_SEC_UTIL = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd';
24+
public const string NS_SEC_UTIL =
25+
'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd';
2426

2527
/**
2628
*/
27-
public const WSU_TIMESTAMP_FAULT = 'MessageExpired';
29+
public const string WSU_TIMESTAMP_FAULT = 'MessageExpired';
2830

2931
/**
3032
* The format to express a timestamp in WSU
3133
*/
32-
public const DATETIME_FORMAT = 'Y-m-d\\TH:i:sp';
34+
public const string DATETIME_FORMAT = 'Y-m-d\\TH:i:sp';
3335
}

src/Type/DateTimeValue.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,13 @@ class DateTimeValue extends BaseDateTimeValue
1515
{
1616
/**
1717
* Lowercase p as opposed to the base-class to covert the timestamp to UTC as required
18-
* by the WSSecurity specifications
18+
* by the WSSecurity specifications
1919
*/
20-
public const DATETIME_FORMAT = 'Y-m-d\\TH:i:sp';
20+
public const string DATETIME_FORMAT = 'Y-m-d\\TH:i:sp';
2121

2222

2323
/**
2424
* Validate the value.
25-
*
26-
* @param string $value
27-
* @return void
2825
*/
2926
protected function validateValue(string $value): void
3027
{

src/XML/wsse/AbstractAttributedString.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,14 @@ abstract class AbstractAttributedString extends AbstractWsseElement
2828

2929

3030
/** The namespace-attribute for the xs:anyAttribute element */
31-
public const XS_ANY_ATTR_NAMESPACE = NS::OTHER;
31+
public const string XS_ANY_ATTR_NAMESPACE = NS::OTHER;
3232

3333
/** The exclusions for the xs:anyAttribute element */
34-
public const XS_ANY_ATTR_EXCLUSIONS = [
34+
public const array XS_ANY_ATTR_EXCLUSIONS = [
3535
['http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd', 'Id'],
3636
];
3737

38-
/** @var string */
39-
public const TEXTCONTENT_TYPE = StringValue::class;
38+
public const string TEXTCONTENT_TYPE = StringValue::class;
4039

4140

4241
/**
@@ -69,7 +68,6 @@ public function getId(): ?IDValue
6968
* Create an instance of this object from its XML representation.
7069
*
7170
* @param \DOMElement $xml
72-
* @return static
7371
*
7472
* @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException
7573
* if the qualified name of the supplied element is wrong
@@ -94,7 +92,6 @@ public static function fromXML(DOMElement $xml): static
9492

9593
/**
9694
* @param \DOMElement|null $parent
97-
* @return \DOMElement
9895
*/
9996
public function toXML(?DOMElement $parent = null): DOMElement
10097
{

src/XML/wsse/AbstractBinarySecurityTokenType.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ public function getValueType(): ?AnyURIValue
5353
* Create an instance of this object from its XML representation.
5454
*
5555
* @param \DOMElement $xml
56-
* @return static
5756
*
5857
* @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException
5958
* if the qualified name of the supplied element is wrong
@@ -82,7 +81,6 @@ public static function fromXML(DOMElement $xml): static
8281
* Add this username token to an XML element.
8382
*
8483
* @param \DOMElement $parent The element we should append this username token to.
85-
* @return \DOMElement
8684
*/
8785
public function toXML(?DOMElement $parent = null): DOMElement
8886
{

src/XML/wsse/AbstractEmbeddedType.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ abstract class AbstractEmbeddedType extends AbstractWsseElement
2424

2525

2626
/** The namespace-attribute for the xs:anyAttribute element */
27-
public const XS_ANY_ATTR_NAMESPACE = NS::OTHER;
27+
public const string XS_ANY_ATTR_NAMESPACE = NS::OTHER;
2828

2929
/** The namespace-attribute for the xs:any element */
30-
public const XS_ANY_ELT_NAMESPACE = NS::ANY;
30+
public const string XS_ANY_ELT_NAMESPACE = NS::ANY;
3131

3232

3333
/**
@@ -58,8 +58,6 @@ public function getValueType(): ?AnyURIValue
5858

5959
/**
6060
* Test if an object, at the state it's in, would produce an empty XML-element
61-
*
62-
* @return bool
6361
*/
6462
public function isEmptyElement(): bool
6563
{
@@ -73,7 +71,6 @@ public function isEmptyElement(): bool
7371
* Create an instance of this object from its XML representation.
7472
*
7573
* @param \DOMElement $xml
76-
* @return static
7774
*
7875
* @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException
7976
* if the qualified name of the supplied element is wrong
@@ -95,7 +92,6 @@ public static function fromXML(DOMElement $xml): static
9592
* Add this username token to an XML element.
9693
*
9794
* @param \DOMElement|null $parent The element we should append this username token to.
98-
* @return \DOMElement
9995
*/
10096
public function toXML(?DOMElement $parent = null): DOMElement
10197
{

src/XML/wsse/AbstractEncodedString.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ public function getEncodingType(): ?AnyURIValue
5252
* Create an instance of this object from its XML representation.
5353
*
5454
* @param \DOMElement $xml
55-
* @return static
5655
*
5756
* @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException
5857
* if the qualified name of the supplied element is wrong
@@ -78,7 +77,6 @@ public static function fromXML(DOMElement $xml): static
7877

7978
/**
8079
* @param \DOMElement|null $parent
81-
* @return \DOMElement
8280
*/
8381
public function toXML(?DOMElement $parent = null): DOMElement
8482
{

src/XML/wsse/AbstractKeyIdentifierType.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ public function getValueType(): ?AnyURIValue
5252
* Create an instance of this object from its XML representation.
5353
*
5454
* @param \DOMElement $xml
55-
* @return static
5655
*
5756
* @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException
5857
* if the qualified name of the supplied element is wrong
@@ -81,7 +80,6 @@ public static function fromXML(DOMElement $xml): static
8180
* Add this username token to an XML element.
8281
*
8382
* @param \DOMElement $parent The element we should append this username token to.
84-
* @return \DOMElement
8583
*/
8684
public function toXML(?DOMElement $parent = null): DOMElement
8785
{

0 commit comments

Comments
 (0)