Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ['8.2', '8.3', '8.4', '8.5']
php-version: ['8.3', '8.4', '8.5']

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

Expand All @@ -30,7 +30,7 @@ jobs:
strategy:
fail-fast: false

uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_linter.yml@v1.10.6
uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_linter.yml@v1.11.0
with:
enable_eslinter: false
enable_jsonlinter: true
Expand All @@ -45,15 +45,15 @@ jobs:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
php-versions: ['8.2', '8.3', '8.4', '8.5']
php-versions: ['8.3', '8.4', '8.5']

steps:
- name: Setup PHP, with composer and extensions
# https://github.com/shivammathur/setup-php
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: ctype, date, dom, filter, pcre, soap, spl, xml
extensions: ctype, date, dom, filter, intl, pcre, soap, sodium, spl, xml
tools: composer
ini-values: error_reporting=E_ALL
coverage: pcov
Expand Down Expand Up @@ -107,15 +107,15 @@ jobs:
fail-fast: true
matrix:
operating-system: [windows-latest]
php-versions: ['8.2', '8.3', '8.4', '8.5']
php-versions: ['8.3', '8.4', '8.5']

steps:
- name: Setup PHP, with composer and extensions
# https://github.com/shivammathur/setup-php
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: ctype, date, dom, filter, pcre, soap, spl, xml
extensions: ctype, date, dom, filter, intl, pcre, soap, sodium, spl, xml
tools: composer
ini-values: error_reporting=E_ALL
coverage: none
Expand Down Expand Up @@ -163,7 +163,7 @@ jobs:
# Should be the higest supported version, so we can use the newest tools
php-version: '8.5'
tools: composer, composer-require-checker, composer-unused, phpcs
extensions: ctype, date, dom, filter, pcre, soap, spl, xml
extensions: ctype, date, dom, filter, intl, pcre, soap, sodium, spl, xml
coverage: none

- name: Setup problem matchers for PHP
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
# Should be the lowest supported version
php-version: '8.2'
php-version: '8.3'
extensions: ctype, date, dom, filter, pcre, soap, spl, xml
tools: composer
coverage: none
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
],
"require": {
"php": "^8.2",
"php": "^8.3",
"ext-dom": "*",
"ext-spl": "*",

Expand All @@ -19,7 +19,7 @@
"simplesamlphp/xml-wss-core": "~1.1"
},
"require-dev": {
"simplesamlphp/simplesamlphp-test-framework": "~1.10",
"simplesamlphp/simplesamlphp-test-framework": "~1.11",
"simplesamlphp/xml-ws-addressing": "~1.1"
},
"autoload": {
Expand Down
4 changes: 2 additions & 2 deletions src/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ class Constants extends \SimpleSAML\WebServices\Security\Constants
/**
* The namespace for WS-Policy protocol.
*/
public const NS_POLICY_200409 = 'http://schemas.xmlsoap.org/ws/2004/09/policy';
public const string NS_POLICY_200409 = 'http://schemas.xmlsoap.org/ws/2004/09/policy';

/**
* The namespace for WS-Policy 1.5 protocol.
*/
public const NS_POLICY_200607 = 'http://www.w3.org/2006/07/ws-policy';
public const string NS_POLICY_200607 = 'http://www.w3.org/2006/07/ws-policy';
}
8 changes: 2 additions & 6 deletions src/XML/wsp_200409/AbstractOperatorContentType.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ abstract class AbstractOperatorContentType extends AbstractWspElement


/** The namespace-attribute for the xs:any element */
public const XS_ANY_ELT_NAMESPACE = NS::OTHER;
public const string XS_ANY_ELT_NAMESPACE = NS::OTHER;

/** The exclusions for the xs:any element */
public const XS_ANY_ELT_EXCLUSIONS = [
public const array XS_ANY_ELT_EXCLUSIONS = [
['http://schemas.xmlsoap.org/ws/2004/09/policy', 'All'],
['http://schemas.xmlsoap.org/ws/2004/09/policy', 'ExactlyOne'],
['http://schemas.xmlsoap.org/ws/2004/09/policy', 'Policy'],
Expand Down Expand Up @@ -82,8 +82,6 @@ public function getOperatorContent(): array

/**
* Test if an object, at the state it's in, would produce an empty XML-element
*
* @return bool
*/
public function isEmptyElement(): bool
{
Expand All @@ -96,7 +94,6 @@ public function isEmptyElement(): bool
* Convert XML into an wsp:OperatorContentType element
*
* @param \DOMElement $xml The XML element we should load
* @return static
*
* @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException
* If the qualified name of the supplied element is wrong
Expand All @@ -122,7 +119,6 @@ public static function fromXML(DOMElement $xml): static
* Convert this wsp:OperatorContentType to XML.
*
* @param \DOMElement|null $parent The element we should add this wsp:OperatorContentType to.
* @return \DOMElement This wsp:AbstractOperatorContentType element.
*/
public function toXML(?DOMElement $parent = null): DOMElement
{
Expand Down
9 changes: 3 additions & 6 deletions src/XML/wsp_200409/AbstractWspElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@
*/
abstract class AbstractWspElement extends AbstractElement
{
/** @var string */
public const NS = C::NS_POLICY_200409;
public const string NS = C::NS_POLICY_200409;

/** @var string */
public const NS_PREFIX = 'wsp';
public const string NS_PREFIX = 'wsp';

/** @var string */
public const SCHEMA = 'resources/schemas/ws-policy-200409.xsd';
public const string SCHEMA = 'resources/schemas/ws-policy-200409.xsd';
}
8 changes: 2 additions & 6 deletions src/XML/wsp_200409/AppliesTo.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ final class AppliesTo extends AbstractWspElement implements SchemaValidatableEle


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

/** The namespace-attribute for the xs:anyAttribute element */
public const XS_ANY_ATTR_NAMESPACE = NS::ANY;
public const string XS_ANY_ATTR_NAMESPACE = NS::ANY;


/**
Expand All @@ -47,8 +47,6 @@ public function __construct(array $children = [], array $namespacedAttributes =

/**
* Test if an object, at the state it's in, would produce an empty XML-element
*
* @return bool
*/
public function isEmptyElement(): bool
{
Expand All @@ -60,7 +58,6 @@ public function isEmptyElement(): bool
* Convert XML into an wsp:AppliesTo element
*
* @param \DOMElement $xml The XML element we should load
* @return static
*
* @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException
* If the qualified name of the supplied element is wrong
Expand All @@ -81,7 +78,6 @@ public static function fromXML(DOMElement $xml): static
* Convert this wsp:AppliesTo to XML.
*
* @param \DOMElement|null $parent The element we should add this wsp:AppliesTo to.
* @return \DOMElement This wsp:AppliesTo element.
*/
public function toXML(?DOMElement $parent = null): DOMElement
{
Expand Down
6 changes: 0 additions & 6 deletions src/XML/wsp_200409/OptionalTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,12 @@ trait OptionalTrait
{
/**
* The Optional.
*
* @var bool
*/
protected bool $Optional;


/**
* Collect the value of the Optional-property
*
* @return bool
*/
public function getOptional(): bool
{
Expand All @@ -34,8 +30,6 @@ public function getOptional(): bool

/**
* Set the value of the Optional-property
*
* @param bool $Optional
*/
protected function setOptional(?bool $Optional): void
{
Expand Down
10 changes: 3 additions & 7 deletions src/XML/wsp_200409/Policy.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ final class Policy extends AbstractOperatorContentType implements SchemaValidata


/** The namespace-attribute for the xs:anyAttribute element */
public const XS_ANY_ATTR_NAMESPACE = NS::ANY;
public const string XS_ANY_ATTR_NAMESPACE = NS::ANY;

/** The exclusions for the xs:anyAttribute element */
public const XS_ANY_ATTR_EXCLUSIONS = [
public const array XS_ANY_ATTR_EXCLUSIONS = [
['http://schemas.xmlsoap.org/ws/2004/09/policy', 'Name'],
['http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd', 'Id'],
];

/** The exclusions for the xs:any element */
public const XS_ANY_ELT_EXCLUSIONS = [
public const array XS_ANY_ELT_EXCLUSIONS = [
['http://schemas.xmlsoap.org/ws/2004/09/policy', 'All'],
['http://schemas.xmlsoap.org/ws/2004/09/policy', 'ExactlyOne'],
['http://schemas.xmlsoap.org/ws/2004/09/policy', 'Policy'],
Expand Down Expand Up @@ -92,8 +92,6 @@ public function getName(): ?AnyURIValue

/**
* Test if an object, at the state it's in, would produce an empty XML-element
*
* @return bool
*/
final public function isEmptyElement(): bool
{
Expand All @@ -108,7 +106,6 @@ final public function isEmptyElement(): bool
* Convert XML into an wsp:Policy element
*
* @param \DOMElement $xml The XML element we should load
* @return static
*
* @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException
* If the qualified name of the supplied element is wrong
Expand Down Expand Up @@ -143,7 +140,6 @@ public static function fromXML(DOMElement $xml): static
* Convert this wsp:Policy to XML.
*
* @param \DOMElement|null $parent The element we should add this wsp:Policy to
* @return \DOMElement This wsp:Policy element.
*/
public function toXML(?DOMElement $parent = null): DOMElement
{
Expand Down
6 changes: 2 additions & 4 deletions src/XML/wsp_200409/PolicyAttachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ final class PolicyAttachment extends AbstractWspElement implements SchemaValidat


/** The namespace-attribute for the xs:any element */
public const XS_ANY_ELT_NAMESPACE = NS::OTHER;
public const string XS_ANY_ELT_NAMESPACE = NS::OTHER;

/** The namespace-attribute for the xs:anyAttribute element */
public const XS_ANY_ATTR_NAMESPACE = NS::ANY;
public const string XS_ANY_ATTR_NAMESPACE = NS::ANY;


/**
Expand Down Expand Up @@ -94,7 +94,6 @@ public function getPolicies(): array
* Convert XML into an wsp:PolicyAttachment element
*
* @param \DOMElement $xml The XML element we should load
* @return static
*
* @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException
* If the qualified name of the supplied element is wrong
Expand Down Expand Up @@ -127,7 +126,6 @@ public static function fromXML(DOMElement $xml): static
* Convert this wsp:PolicyAttachment to XML.
*
* @param \DOMElement|null $parent The element we should add this wsp:AppliesTo to.
* @return \DOMElement This wsp:AppliesTo element.
*/
public function toXML(?DOMElement $parent = null): DOMElement
{
Expand Down
6 changes: 2 additions & 4 deletions src/XML/wsp_200409/PolicyReference.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ final class PolicyReference extends AbstractWspElement implements SchemaValidata


/** The namespace-attribute for the xs:anyAttribute element */
public const XS_ANY_ATTR_NAMESPACE = NS::ANY;
public const string XS_ANY_ATTR_NAMESPACE = NS::ANY;

/** The exclusions for the xs:anyAttribute element */
public const XS_ANY_ATTR_EXCLUSIONS = [
public const array XS_ANY_ATTR_EXCLUSIONS = [
[null, 'Digest'],
[null, 'DigestAlgorithm'],
[null, 'URI'],
Expand Down Expand Up @@ -85,7 +85,6 @@ public function getDigestAlgorithm(): ?AnyURIValue
* Convert XML into an wsp:PolicyReference element
*
* @param \DOMElement $xml The XML element we should load
* @return static
*
* @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException
* If the qualified name of the supplied element is wrong
Expand All @@ -108,7 +107,6 @@ public static function fromXML(DOMElement $xml): static
* Convert this wsp:PolicyReference to XML.
*
* @param \DOMElement|null $parent The element we should add this wsp:Policy to
* @return \DOMElement This wsp:PolicyReference element.
*/
public function toXML(?DOMElement $parent = null): DOMElement
{
Expand Down
8 changes: 2 additions & 6 deletions src/XML/wsp_200607/AbstractOperatorContentType.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ abstract class AbstractOperatorContentType extends AbstractWspElement


/** The namespace-attribute for the xs:any element */
public const XS_ANY_ELT_NAMESPACE = NS::OTHER;
public const string XS_ANY_ELT_NAMESPACE = NS::OTHER;

/** The exclusions for the xs:any element */
public const XS_ANY_ELT_EXCLUSIONS = [
public const array XS_ANY_ELT_EXCLUSIONS = [
['http://www.w3.org/2006/07/ws-policy', 'All'],
['http://www.w3.org/2006/07/ws-policy', 'ExactlyOne'],
['http://www.w3.org/2006/07/ws-policy', 'Policy'],
Expand Down Expand Up @@ -84,8 +84,6 @@ public function getOperatorContent(): array

/**
* Test if an object, at the state it's in, would produce an empty XML-element
*
* @return bool
*/
public function isEmptyElement(): bool
{
Expand All @@ -98,7 +96,6 @@ public function isEmptyElement(): bool
* Convert XML into an wsp:OperatorContentType element
*
* @param \DOMElement $xml The XML element we should load
* @return static
*
* @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException
* If the qualified name of the supplied element is wrong
Expand All @@ -124,7 +121,6 @@ public static function fromXML(DOMElement $xml): static
* Convert this wsp:OperatorContentType to XML.
*
* @param \DOMElement|null $parent The element we should add this wsp:OperatorContentType to.
* @return \DOMElement This wsp:AbstractOperatorContentType element.
*/
public function toXML(?DOMElement $parent = null): DOMElement
{
Expand Down
7 changes: 2 additions & 5 deletions src/XML/wsp_200607/AbstractURI.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ abstract class AbstractURI extends AbstractWspElement
use TypedTextContentTrait;


/** @var string */
public const TEXTCONTENT_TYPE = AnyURIValue::class;
public const string TEXTCONTENT_TYPE = AnyURIValue::class;

/** The namespace-attribute for the xs:anyAttribute element */
public const XS_ANY_ATTR_NAMESPACE = NS::ANY;
public const string XS_ANY_ATTR_NAMESPACE = NS::ANY;


/**
Expand All @@ -51,7 +50,6 @@ public function __construct(
* Convert XML into an wsp:URI type element
*
* @param \DOMElement $xml The XML element we should load
* @return static
*
* @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException
* If the qualified name of the supplied element is wrong
Expand All @@ -72,7 +70,6 @@ public static function fromXML(DOMElement $xml): static
* Convert this wsp:URI type to XML.
*
* @param \DOMElement|null $parent The element we should add this wsp:URI to.
* @return \DOMElement This wsp:URI type element.
*/
public function toXML(?DOMElement $parent = null): DOMElement
{
Expand Down
Loading
Loading