From 193473ce7ce87adb470602a83ecc54131f35bbd6 Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Sun, 12 Jul 2026 23:07:28 +0200 Subject: [PATCH 1/4] Migrate to new PHP 8.4 DOM-aPI --- composer.json | 12 +++++----- src/Utils/XPath.php | 9 ++++---- .../auth/AbstractAdditionalContextType.php | 6 ++--- src/XML/auth/AbstractClaimType.php | 6 ++--- .../auth/AbstractConstrainedManyValueType.php | 6 ++--- .../AbstractConstrainedSingleValueType.php | 6 ++--- src/XML/auth/AbstractConstrainedValueType.php | 6 ++--- src/XML/auth/AbstractContextItemType.php | 6 ++--- src/XML/auth/AbstractDescriptionType.php | 6 ++--- src/XML/auth/AbstractDisplayNameType.php | 6 ++--- src/XML/auth/AbstractDisplayValueType.php | 6 ++--- src/XML/auth/AbstractEncryptedValueType.php | 6 ++--- src/XML/auth/AbstractStructuredValueType.php | 6 ++--- src/XML/auth/AbstractValueInRangeType.php | 6 ++--- .../fed/AbstractApplicationServiceType.php | 4 ++-- src/XML/fed/AbstractAssertionType.php | 6 ++--- .../fed/AbstractAttributeExtensibleString.php | 4 ++-- .../fed/AbstractAttributeExtensibleURI.php | 6 ++--- src/XML/fed/AbstractAttributeServiceType.php | 4 ++-- src/XML/fed/AbstractClaimDialectType.php | 6 ++--- .../fed/AbstractClaimDialectsOfferedType.php | 6 ++--- src/XML/fed/AbstractClaimTypesOfferedType.php | 6 ++--- .../fed/AbstractClaimTypesRequestedType.php | 6 ++--- src/XML/fed/AbstractClientPseudonymType.php | 6 ++--- src/XML/fed/AbstractEndpointType.php | 6 ++--- .../AbstractFederationMetadataHandlerType.php | 6 ++--- .../fed/AbstractFederationMetadataType.php | 6 ++--- src/XML/fed/AbstractFederationType.php | 6 ++--- src/XML/fed/AbstractFilterPseudonymsType.php | 6 ++--- src/XML/fed/AbstractFreshnessType.php | 6 ++--- src/XML/fed/AbstractIssuerNameType.php | 6 ++--- ...AbstractLogicalServiceNamesOfferedType.php | 6 ++--- src/XML/fed/AbstractProofTokenType.php | 6 ++--- src/XML/fed/AbstractPseudonymBasisType.php | 6 ++--- src/XML/fed/AbstractPseudonymServiceType.php | 4 ++-- src/XML/fed/AbstractPseudonymType.php | 6 ++--- src/XML/fed/AbstractReferenceDigestType.php | 6 ++--- src/XML/fed/AbstractReferenceTokenType.php | 6 ++--- src/XML/fed/AbstractRelativeToType.php | 6 ++--- src/XML/fed/AbstractRequestProofTokenType.php | 6 ++--- src/XML/fed/AbstractRequestPseudonymType.php | 6 ++--- .../fed/AbstractSecurityTokenServiceType.php | 4 ++-- src/XML/fed/AbstractSecurityTokenType.php | 6 ++--- src/XML/fed/AbstractSignOutBasisType.php | 6 ++--- src/XML/fed/AbstractSignOutType.php | 6 ++--- src/XML/fed/AbstractTokenType.php | 6 ++--- src/XML/fed/AbstractTokenTypesOfferedType.php | 6 ++--- .../fed/AbstractWebServiceDescriptorType.php | 4 ++-- src/XML/fed/DisplayName.php | 4 ++-- src/XML/fed/EMail.php | 4 ++-- src/XML/fed/PPID.php | 4 ++-- src/XML/fed/SecurityTokenServiceType.php | 4 ++-- tests/Federation/XML/auth/ClaimTypeTest.php | 2 +- .../fed/ApplicationServiceEndpointTest.php | 14 ++++++------ .../XML/fed/AttributeServiceEndpointTest.php | 14 ++++++------ .../XML/fed/AttributeServiceEndpointsTest.php | 14 ++++++------ .../XML/fed/ClientPseudonymTest.php | 2 +- .../XML/fed/PassiveRequestorEndpointTest.php | 14 ++++++------ .../XML/fed/PassiveRequestorEndpointsTest.php | 14 ++++++------ .../XML/fed/PseudonymServiceEndpointTest.php | 14 ++++++------ .../XML/fed/PseudonymServiceEndpointsTest.php | 14 ++++++------ tests/Federation/XML/fed/PseudonymTest.php | 2 +- tests/Federation/XML/fed/ReferenceEPRTest.php | 14 ++++++------ .../Federation/XML/fed/ReferenceTokenTest.php | 22 +++++++++---------- .../fed/SecurityTokenServiceEndpointTest.php | 14 ++++++------ tests/Federation/XML/fed/SignOutTest.php | 2 +- .../SingleSignOutNotificationEndpointTest.php | 14 ++++++------ ...SingleSignOutNotificationEndpointsTest.php | 14 ++++++------ .../SingleSignOutSubscriptionEndpointTest.php | 14 ++++++------ ...SingleSignOutSubscriptionEndpointsTest.php | 14 ++++++------ tests/Federation/XML/fed/TargetScopesTest.php | 14 ++++++------ .../xml/fed/ApplicationServiceEndpoint.xml | 2 +- .../xml/fed/AttributeServiceEndpoint.xml | 2 +- .../xml/fed/AttributeServiceEndpoints.xml | 2 +- .../xml/fed/PassiveRequestorEndpoint.xml | 2 +- .../xml/fed/PassiveRequestorEndpoints.xml | 2 +- .../xml/fed/PseudonymServiceEndpoint.xml | 2 +- .../xml/fed/PseudonymServiceEndpoints.xml | 2 +- .../xml/fed/SecurityTokenServiceEndpoint.xml | 2 +- .../fed/SingleSignOutNotificationEndpoint.xml | 2 +- .../SingleSignOutNotificationEndpoints.xml | 2 +- .../fed/SingleSignOutSubscriptionEndpoint.xml | 2 +- .../SingleSignOutSubscriptionEndpoints.xml | 2 +- tests/resources/xml/fed/TargetScopes.xml | 2 +- 84 files changed, 276 insertions(+), 277 deletions(-) diff --git a/composer.json b/composer.json index dc45685..82607c4 100644 --- a/composer.json +++ b/composer.json @@ -14,12 +14,12 @@ "ext-dom": "*", "simplesamlphp/assert": "~2.0", - "simplesamlphp/saml2": "~6.1", - "simplesamlphp/xml-common": "~2.8", - "simplesamlphp/xml-security": "~2.3", - "simplesamlphp/xml-ws-addressing": "~1.3", - "simplesamlphp/xml-ws-security-policy": "~1.2", - "simplesamlphp/xml-wss-core": "~1.3" + "simplesamlphp/saml2": "dev-feature/dom-migration-php84", + "simplesamlphp/xml-common": "dev-feature/dom-migration-php84", + "simplesamlphp/xml-security": "dev-feature/dom-migration-php84", + "simplesamlphp/xml-ws-addressing": "dev-feature/dom-migration-php84", + "simplesamlphp/xml-ws-security-policy": "dev-feature/dom-migration-php84", + "simplesamlphp/xml-wss-core": "dev-feature/dom-migration-php84" }, "require-dev": { "simplesamlphp/simplesamlphp-test-framework": "~1.11" diff --git a/src/Utils/XPath.php b/src/Utils/XPath.php index bb6d80c..fa75cbf 100644 --- a/src/Utils/XPath.php +++ b/src/Utils/XPath.php @@ -4,8 +4,7 @@ namespace SimpleSAML\WebServices\Federation\Utils; -use DOMNode; -use DOMXPath; +use Dom; use SimpleSAML\WebServices\Federation\Constants as C; /** @@ -18,13 +17,13 @@ class XPath extends \SimpleSAML\WebServices\Security\Utils\XPath /* * Get a DOMXPath object that can be used to search for WS Federation elements. * - * @param \DOMNode $node The document to associate to the DOMXPath object. + * @param \Dom\Node $node The document to associate to the \Dom\XPath object. * @param bool $autoregister Whether to auto-register all namespaces used in the document * - * @return \DOMXPath A DOMXPath object ready to use in the given document, with several + * @return \Dom\XPath A \Dom\XPath object ready to use in the given document, with several * ws-related namespaces already registered. */ - public static function getXPath(DOMNode $node, bool $autoregister = false): DOMXPath + public static function getXPath(Dom\Node $node, bool $autoregister = false): Dom\XPath { $xp = parent::getXPath($node, $autoregister); diff --git a/src/XML/auth/AbstractAdditionalContextType.php b/src/XML/auth/AbstractAdditionalContextType.php index 3395663..b172e8b 100644 --- a/src/XML/auth/AbstractAdditionalContextType.php +++ b/src/XML/auth/AbstractAdditionalContextType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\auth; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\WebServices\Federation\XML\auth\ContextItem; use SimpleSAML\XML\ExtendableAttributesTrait; @@ -64,7 +64,7 @@ public function getContextItem(): array * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -83,7 +83,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this AdditionalContext to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/auth/AbstractClaimType.php b/src/XML/auth/AbstractClaimType.php index bd19b1d..a7e9c5f 100644 --- a/src/XML/auth/AbstractClaimType.php +++ b/src/XML/auth/AbstractClaimType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\auth; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\WebServices\Federation\XML\auth\ConstrainedValue; use SimpleSAML\WebServices\Federation\XML\auth\Description; @@ -168,7 +168,7 @@ public function getOptional(): ?BooleanValue * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -212,7 +212,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this ClaimType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/auth/AbstractConstrainedManyValueType.php b/src/XML/auth/AbstractConstrainedManyValueType.php index 9ce93d6..f77a817 100644 --- a/src/XML/auth/AbstractConstrainedManyValueType.php +++ b/src/XML/auth/AbstractConstrainedManyValueType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\auth; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException; @@ -70,7 +70,7 @@ public function isEmptyElement(): bool * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * If the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -88,7 +88,7 @@ public static function fromXML(DOMElement $xml): static /** * Convert this element to XML. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/auth/AbstractConstrainedSingleValueType.php b/src/XML/auth/AbstractConstrainedSingleValueType.php index fcd8a6d..74bbf4e 100644 --- a/src/XML/auth/AbstractConstrainedSingleValueType.php +++ b/src/XML/auth/AbstractConstrainedSingleValueType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\auth; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException; use SimpleSAML\XMLSchema\Exception\TooManyElementsException; @@ -73,7 +73,7 @@ public function isEmptyElement(): bool * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * If the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -94,7 +94,7 @@ public static function fromXML(DOMElement $xml): static /** * Convert this element to XML. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/auth/AbstractConstrainedValueType.php b/src/XML/auth/AbstractConstrainedValueType.php index 897885a..266163d 100644 --- a/src/XML/auth/AbstractConstrainedValueType.php +++ b/src/XML/auth/AbstractConstrainedValueType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\auth; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableElementTrait; use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException; @@ -74,7 +74,7 @@ public function getAssertConstraint(): ?BooleanValue * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -108,7 +108,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this ConstrainedValueType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/auth/AbstractContextItemType.php b/src/XML/auth/AbstractContextItemType.php index 0e64860..d279cb5 100644 --- a/src/XML/auth/AbstractContextItemType.php +++ b/src/XML/auth/AbstractContextItemType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\auth; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\ExtendableElementTrait; @@ -101,7 +101,7 @@ public function getScope(): ?AnyURIValue * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -125,7 +125,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this ContextItemType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/auth/AbstractDescriptionType.php b/src/XML/auth/AbstractDescriptionType.php index 6948f3f..5dd2de8 100644 --- a/src/XML/auth/AbstractDescriptionType.php +++ b/src/XML/auth/AbstractDescriptionType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\auth; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\TypedTextContentTrait; @@ -48,7 +48,7 @@ final public function __construct(StringValue $value, array $namespacedAttribute * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * If the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -60,7 +60,7 @@ public static function fromXML(DOMElement $xml): static /** * Convert this element to XML. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = $this->instantiateParentElement($parent); $e->textContent = $this->getContent()->getValue(); diff --git a/src/XML/auth/AbstractDisplayNameType.php b/src/XML/auth/AbstractDisplayNameType.php index 45459bf..43498d8 100644 --- a/src/XML/auth/AbstractDisplayNameType.php +++ b/src/XML/auth/AbstractDisplayNameType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\auth; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\TypedTextContentTrait; @@ -48,7 +48,7 @@ final public function __construct(StringValue $value, array $namespacedAttribute * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * If the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -60,7 +60,7 @@ public static function fromXML(DOMElement $xml): static /** * Convert this element to XML. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = $this->instantiateParentElement($parent); $e->textContent = $this->getContent()->getValue(); diff --git a/src/XML/auth/AbstractDisplayValueType.php b/src/XML/auth/AbstractDisplayValueType.php index ee118db..4845c78 100644 --- a/src/XML/auth/AbstractDisplayValueType.php +++ b/src/XML/auth/AbstractDisplayValueType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\auth; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\TypedTextContentTrait; @@ -48,7 +48,7 @@ final public function __construct(StringValue $value, array $namespacedAttribute * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * If the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -60,7 +60,7 @@ public static function fromXML(DOMElement $xml): static /** * Convert this element to XML. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = $this->instantiateParentElement($parent); $e->textContent = $this->getContent()->getValue(); diff --git a/src/XML/auth/AbstractEncryptedValueType.php b/src/XML/auth/AbstractEncryptedValueType.php index ecc87e6..779d20c 100644 --- a/src/XML/auth/AbstractEncryptedValueType.php +++ b/src/XML/auth/AbstractEncryptedValueType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\auth; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException; use SimpleSAML\XMLSchema\Exception\MissingElementException; @@ -60,7 +60,7 @@ public function getEncryptedData(): EncryptedData * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * If the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -79,7 +79,7 @@ public static function fromXML(DOMElement $xml): static /** * Convert this element to XML. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/auth/AbstractStructuredValueType.php b/src/XML/auth/AbstractStructuredValueType.php index 54dee9e..70bd3c7 100644 --- a/src/XML/auth/AbstractStructuredValueType.php +++ b/src/XML/auth/AbstractStructuredValueType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\auth; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\ExtendableElementTrait; @@ -53,7 +53,7 @@ final public function __construct( * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -68,7 +68,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this StructuredValueType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/auth/AbstractValueInRangeType.php b/src/XML/auth/AbstractValueInRangeType.php index bac63d1..e2d0110 100644 --- a/src/XML/auth/AbstractValueInRangeType.php +++ b/src/XML/auth/AbstractValueInRangeType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\auth; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException; use SimpleSAML\XMLSchema\Exception\MissingElementException; @@ -36,7 +36,7 @@ final public function __construct( * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -81,7 +81,7 @@ public function getValueLowerBound(): ValueLowerBound /** * Add this ValueInRangeType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractApplicationServiceType.php b/src/XML/fed/AbstractApplicationServiceType.php index 2c76b7c..bd756fc 100644 --- a/src/XML/fed/AbstractApplicationServiceType.php +++ b/src/XML/fed/AbstractApplicationServiceType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\SAML2\Type\SAMLAnyURIListValue; use SimpleSAML\SAML2\Type\SAMLAnyURIValue; use SimpleSAML\SAML2\Type\SAMLDateTimeValue; @@ -172,7 +172,7 @@ public function getPassiveRequestorEndpoint(): array /** * Convert this element to XML. */ - public function toUnsignedXML(?DOMElement $parent = null): DOMElement + public function toUnsignedXML(?Dom\Element $parent = null): Dom\Element { $e = parent::toXML($parent); diff --git a/src/XML/fed/AbstractAssertionType.php b/src/XML/fed/AbstractAssertionType.php index a2f751b..9b6953a 100644 --- a/src/XML/fed/AbstractAssertionType.php +++ b/src/XML/fed/AbstractAssertionType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\ExtendableElementTrait; @@ -60,7 +60,7 @@ public function isEmptyElement(): bool * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -75,7 +75,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this AssertionType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractAttributeExtensibleString.php b/src/XML/fed/AbstractAttributeExtensibleString.php index 472d8e4..3fb8860 100644 --- a/src/XML/fed/AbstractAttributeExtensibleString.php +++ b/src/XML/fed/AbstractAttributeExtensibleString.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\TypedTextContentTrait; use SimpleSAML\XMLSchema\Type\StringValue; @@ -41,7 +41,7 @@ public function __construct(StringValue $content, array $namespacedAttributes = /** * Create XML from this class */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = $this->instantiateParentElement($parent); $e->textContent = $this->getContent()->getValue(); diff --git a/src/XML/fed/AbstractAttributeExtensibleURI.php b/src/XML/fed/AbstractAttributeExtensibleURI.php index 92ff71e..52dcd92 100644 --- a/src/XML/fed/AbstractAttributeExtensibleURI.php +++ b/src/XML/fed/AbstractAttributeExtensibleURI.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\TypedTextContentTrait; @@ -43,7 +43,7 @@ final public function __construct(AnyURIValue $content, array $namespacedAttribu /** * Create a class from XML */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -58,7 +58,7 @@ public static function fromXML(DOMElement $xml): static /** * Create XML from this class */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = $this->instantiateParentElement($parent); $e->textContent = $this->getContent()->getValue(); diff --git a/src/XML/fed/AbstractAttributeServiceType.php b/src/XML/fed/AbstractAttributeServiceType.php index 39cd4eb..0d96fd6 100644 --- a/src/XML/fed/AbstractAttributeServiceType.php +++ b/src/XML/fed/AbstractAttributeServiceType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\SAML2\Type\SAMLAnyURIListValue; use SimpleSAML\SAML2\Type\SAMLAnyURIValue; use SimpleSAML\SAML2\Type\SAMLDateTimeValue; @@ -154,7 +154,7 @@ public function getSingleSignOutNotificationEndpoint(): array /** * Convert this element to XML. */ - public function toUnsignedXML(?DOMElement $parent = null): DOMElement + public function toUnsignedXML(?Dom\Element $parent = null): Dom\Element { $e = parent::toXML($parent); diff --git a/src/XML/fed/AbstractClaimDialectType.php b/src/XML/fed/AbstractClaimDialectType.php index d04c6b5..0959d14 100644 --- a/src/XML/fed/AbstractClaimDialectType.php +++ b/src/XML/fed/AbstractClaimDialectType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\ExtendableElementTrait; @@ -65,7 +65,7 @@ public function getUri(): ?AnyURIValue * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -81,7 +81,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this ClaimDialectType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractClaimDialectsOfferedType.php b/src/XML/fed/AbstractClaimDialectsOfferedType.php index cde85cd..983db2e 100644 --- a/src/XML/fed/AbstractClaimDialectsOfferedType.php +++ b/src/XML/fed/AbstractClaimDialectsOfferedType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\WebServices\Federation\XML\fed\ClaimDialect; use SimpleSAML\XML\ExtendableAttributesTrait; @@ -59,7 +59,7 @@ public function getClaimDialect(): array * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -82,7 +82,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this ClaimDialectsOfferedType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractClaimTypesOfferedType.php b/src/XML/fed/AbstractClaimTypesOfferedType.php index 33d37ae..84b89d0 100644 --- a/src/XML/fed/AbstractClaimTypesOfferedType.php +++ b/src/XML/fed/AbstractClaimTypesOfferedType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\WebServices\Federation\XML\auth\ClaimType; use SimpleSAML\XML\ExtendableAttributesTrait; @@ -59,7 +59,7 @@ public function getClaimType(): array * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -81,7 +81,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this ClaimTypesOfferedType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractClaimTypesRequestedType.php b/src/XML/fed/AbstractClaimTypesRequestedType.php index b5dbe86..750c7f3 100644 --- a/src/XML/fed/AbstractClaimTypesRequestedType.php +++ b/src/XML/fed/AbstractClaimTypesRequestedType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\WebServices\Federation\XML\auth\ClaimType; use SimpleSAML\XML\ExtendableAttributesTrait; @@ -59,7 +59,7 @@ public function getClaimType(): array * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -81,7 +81,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this ClaimTypesRequestedType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractClientPseudonymType.php b/src/XML/fed/AbstractClientPseudonymType.php index e622bf9..51eb32c 100644 --- a/src/XML/fed/AbstractClientPseudonymType.php +++ b/src/XML/fed/AbstractClientPseudonymType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\ExtendableElementTrait; @@ -99,7 +99,7 @@ public function isEmptyElement(): bool * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -126,7 +126,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this ClientPseudonymType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractEndpointType.php b/src/XML/fed/AbstractEndpointType.php index bc0ae6d..2fd516f 100644 --- a/src/XML/fed/AbstractEndpointType.php +++ b/src/XML/fed/AbstractEndpointType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Addressing\XML\wsa_200508\EndpointReference; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException; @@ -45,7 +45,7 @@ public function getEndpointReference(): array * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -59,7 +59,7 @@ public static function fromXML(DOMElement $xml): static /** * Convert this element to XML. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractFederationMetadataHandlerType.php b/src/XML/fed/AbstractFederationMetadataHandlerType.php index 56b95ff..d0eb937 100644 --- a/src/XML/fed/AbstractFederationMetadataHandlerType.php +++ b/src/XML/fed/AbstractFederationMetadataHandlerType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException; @@ -51,7 +51,7 @@ public function isEmptyElement(): bool * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -65,7 +65,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this FederationMetadataHandlerType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractFederationMetadataType.php b/src/XML/fed/AbstractFederationMetadataType.php index c4dd01c..f66f4dc 100644 --- a/src/XML/fed/AbstractFederationMetadataType.php +++ b/src/XML/fed/AbstractFederationMetadataType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\ExtendableElementTrait; @@ -60,7 +60,7 @@ public function isEmptyElement(): bool * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -75,7 +75,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this FederationMetadataType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractFederationType.php b/src/XML/fed/AbstractFederationType.php index d2d426a..02e9048 100644 --- a/src/XML/fed/AbstractFederationType.php +++ b/src/XML/fed/AbstractFederationType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\ExtendableElementTrait; @@ -73,7 +73,7 @@ public function isEmptyElement(): bool * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -89,7 +89,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this FederationType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractFilterPseudonymsType.php b/src/XML/fed/AbstractFilterPseudonymsType.php index 72a87eb..c3508c2 100644 --- a/src/XML/fed/AbstractFilterPseudonymsType.php +++ b/src/XML/fed/AbstractFilterPseudonymsType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\ExtendableElementTrait; @@ -89,7 +89,7 @@ public function isEmptyElement(): bool * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -112,7 +112,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this FilterPseudonymsType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractFreshnessType.php b/src/XML/fed/AbstractFreshnessType.php index bbe02cc..96982ac 100644 --- a/src/XML/fed/AbstractFreshnessType.php +++ b/src/XML/fed/AbstractFreshnessType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\TypedTextContentTrait; @@ -64,7 +64,7 @@ public function getAllowCache(): ?BooleanValue * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -80,7 +80,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this IssuerNameType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); $e->textContent = $this->getContent()->getValue(); diff --git a/src/XML/fed/AbstractIssuerNameType.php b/src/XML/fed/AbstractIssuerNameType.php index e10bbf7..7d9c4f7 100644 --- a/src/XML/fed/AbstractIssuerNameType.php +++ b/src/XML/fed/AbstractIssuerNameType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException; @@ -54,7 +54,7 @@ public function getUri(): AnyURIValue * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -69,7 +69,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this IssuerNameType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); $e->setAttribute('Uri', $this->getUri()->getValue()); diff --git a/src/XML/fed/AbstractLogicalServiceNamesOfferedType.php b/src/XML/fed/AbstractLogicalServiceNamesOfferedType.php index d3885e7..6c1d160 100644 --- a/src/XML/fed/AbstractLogicalServiceNamesOfferedType.php +++ b/src/XML/fed/AbstractLogicalServiceNamesOfferedType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\WebServices\Federation\XML\fed\IssuerName; use SimpleSAML\XML\ExtendableAttributesTrait; @@ -58,7 +58,7 @@ public function getIssuerName(): array * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -81,7 +81,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this LogicalServiceNamesOfferedType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractProofTokenType.php b/src/XML/fed/AbstractProofTokenType.php index cc44a04..bc54287 100644 --- a/src/XML/fed/AbstractProofTokenType.php +++ b/src/XML/fed/AbstractProofTokenType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\ExtendableElementTrait; @@ -52,7 +52,7 @@ final public function __construct( * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -71,7 +71,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this AbstractProofTokenType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractPseudonymBasisType.php b/src/XML/fed/AbstractPseudonymBasisType.php index 910be86..7d10fb4 100644 --- a/src/XML/fed/AbstractPseudonymBasisType.php +++ b/src/XML/fed/AbstractPseudonymBasisType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\ExtendableElementTrait; @@ -53,7 +53,7 @@ final public function __construct( * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -72,7 +72,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this AbstractPseudonymBasisType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractPseudonymServiceType.php b/src/XML/fed/AbstractPseudonymServiceType.php index f87c24b..6302938 100644 --- a/src/XML/fed/AbstractPseudonymServiceType.php +++ b/src/XML/fed/AbstractPseudonymServiceType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\SAML2\Type\SAMLAnyURIListValue; use SimpleSAML\SAML2\Type\SAMLAnyURIValue; use SimpleSAML\SAML2\Type\SAMLDateTimeValue; @@ -154,7 +154,7 @@ public function getSingleSignOutNotificationEndpoint(): array /** * Convert this element to XML. */ - public function toUnsignedXML(?DOMElement $parent = null): DOMElement + public function toUnsignedXML(?Dom\Element $parent = null): Dom\Element { $e = parent::toXML($parent); diff --git a/src/XML/fed/AbstractPseudonymType.php b/src/XML/fed/AbstractPseudonymType.php index 565a34a..fd3646e 100644 --- a/src/XML/fed/AbstractPseudonymType.php +++ b/src/XML/fed/AbstractPseudonymType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\ExtendableElementTrait; @@ -83,7 +83,7 @@ public function getRelativeTo(): RelativeTo * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -108,7 +108,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this PseudonymType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractReferenceDigestType.php b/src/XML/fed/AbstractReferenceDigestType.php index aa93614..b73f055 100644 --- a/src/XML/fed/AbstractReferenceDigestType.php +++ b/src/XML/fed/AbstractReferenceDigestType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\TypedTextContentTrait; @@ -43,7 +43,7 @@ final public function __construct(Base64BinaryValue $content, array $namespacedA /** * Create a class from XML */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -58,7 +58,7 @@ public static function fromXML(DOMElement $xml): static /** * Create XML from this class */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = $this->instantiateParentElement($parent); $e->textContent = $this->getContent()->getValue(); diff --git a/src/XML/fed/AbstractReferenceTokenType.php b/src/XML/fed/AbstractReferenceTokenType.php index 88561dc..3575fa9 100644 --- a/src/XML/fed/AbstractReferenceTokenType.php +++ b/src/XML/fed/AbstractReferenceTokenType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\ExtendableElementTrait; @@ -111,7 +111,7 @@ public function getSerialNo(): ?SerialNo * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -135,7 +135,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this ReferenceToken to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractRelativeToType.php b/src/XML/fed/AbstractRelativeToType.php index 05da64a..4d2b29a 100644 --- a/src/XML/fed/AbstractRelativeToType.php +++ b/src/XML/fed/AbstractRelativeToType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\ExtendableElementTrait; @@ -60,7 +60,7 @@ public function isEmptyElement(): bool * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -75,7 +75,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this AbstractRelativeToType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractRequestProofTokenType.php b/src/XML/fed/AbstractRequestProofTokenType.php index 1c3f53c..200cc67 100644 --- a/src/XML/fed/AbstractRequestProofTokenType.php +++ b/src/XML/fed/AbstractRequestProofTokenType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\ExtendableElementTrait; @@ -60,7 +60,7 @@ public function isEmptyElement(): bool * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -75,7 +75,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this AssertionType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractRequestPseudonymType.php b/src/XML/fed/AbstractRequestPseudonymType.php index 8b13e62..7d17e73 100644 --- a/src/XML/fed/AbstractRequestPseudonymType.php +++ b/src/XML/fed/AbstractRequestPseudonymType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\ExtendableElementTrait; @@ -87,7 +87,7 @@ public function isEmptyElement(): bool * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -104,7 +104,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this AbstractRequestPseudonymType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractSecurityTokenServiceType.php b/src/XML/fed/AbstractSecurityTokenServiceType.php index ea479fa..8944285 100644 --- a/src/XML/fed/AbstractSecurityTokenServiceType.php +++ b/src/XML/fed/AbstractSecurityTokenServiceType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\SAML2\Type\SAMLAnyURIListValue; use SimpleSAML\SAML2\Type\SAMLAnyURIValue; use SimpleSAML\SAML2\Type\SAMLDateTimeValue; @@ -192,7 +192,7 @@ public function getPassiveRequestorEndpoint(): array /** * Convert this element to XML. */ - public function toUnsignedXML(?DOMElement $parent = null): DOMElement + public function toUnsignedXML(?Dom\Element $parent = null): Dom\Element { $e = parent::toUnsignedXML($parent); diff --git a/src/XML/fed/AbstractSecurityTokenType.php b/src/XML/fed/AbstractSecurityTokenType.php index fb2d50b..3a9a099 100644 --- a/src/XML/fed/AbstractSecurityTokenType.php +++ b/src/XML/fed/AbstractSecurityTokenType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\ExtendableElementTrait; @@ -52,7 +52,7 @@ final public function __construct( * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -71,7 +71,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this AbstractSecurityTokenType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractSignOutBasisType.php b/src/XML/fed/AbstractSignOutBasisType.php index a20db3f..0e43dd1 100644 --- a/src/XML/fed/AbstractSignOutBasisType.php +++ b/src/XML/fed/AbstractSignOutBasisType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\ExtendableElementTrait; @@ -53,7 +53,7 @@ final public function __construct( * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -68,7 +68,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this SignOutBasisType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractSignOutType.php b/src/XML/fed/AbstractSignOutType.php index 6b4e8a8..9d9644b 100644 --- a/src/XML/fed/AbstractSignOutType.php +++ b/src/XML/fed/AbstractSignOutType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\WebServices\Federation\Constants as C; use SimpleSAML\WebServices\Security\Type\IDValue; @@ -92,7 +92,7 @@ public function getRealm(): ?Realm * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -122,7 +122,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this SignOutType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractTokenType.php b/src/XML/fed/AbstractTokenType.php index 1c98afd..6d11147 100644 --- a/src/XML/fed/AbstractTokenType.php +++ b/src/XML/fed/AbstractTokenType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XML\ExtendableAttributesTrait; use SimpleSAML\XML\ExtendableElementTrait; @@ -73,7 +73,7 @@ public function isEmptyElement(): bool * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -89,7 +89,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this TokenType to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractTokenTypesOfferedType.php b/src/XML/fed/AbstractTokenTypesOfferedType.php index 7b156ad..43bfd44 100644 --- a/src/XML/fed/AbstractTokenTypesOfferedType.php +++ b/src/XML/fed/AbstractTokenTypesOfferedType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\WebServices\Federation\XML\fed\TokenType; use SimpleSAML\XML\ExtendableAttributesTrait; @@ -67,7 +67,7 @@ public function getTokenType(): array * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * if the qualified name of the supplied element is wrong */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); @@ -91,7 +91,7 @@ public static function fromXML(DOMElement $xml): static /** * Add this TokenTypesOffered to an XML element. */ - public function toXML(?DOMElement $parent = null): DOMElement + public function toXML(?Dom\Element $parent = null): Dom\Element { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/fed/AbstractWebServiceDescriptorType.php b/src/XML/fed/AbstractWebServiceDescriptorType.php index 011c3ef..92faec6 100644 --- a/src/XML/fed/AbstractWebServiceDescriptorType.php +++ b/src/XML/fed/AbstractWebServiceDescriptorType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\SAML2\Type\SAMLAnyURIListValue; use SimpleSAML\SAML2\Type\SAMLAnyURIValue; use SimpleSAML\SAML2\Type\SAMLDateTimeValue; @@ -194,7 +194,7 @@ public function getServiceDescription(): ?SAMLStringValue /** * Convert this element to XML. */ - public function toUnsignedXML(?DOMElement $parent = null): DOMElement + public function toUnsignedXML(?Dom\Element $parent = null): Dom\Element { $e = parent::toUnsignedXML($parent); diff --git a/src/XML/fed/DisplayName.php b/src/XML/fed/DisplayName.php index da0d0db..14160c6 100644 --- a/src/XML/fed/DisplayName.php +++ b/src/XML/fed/DisplayName.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException; use SimpleSAML\XMLSchema\Type\StringValue; @@ -19,7 +19,7 @@ final class DisplayName extends AbstractAttributeExtensibleString /** * Create a class from XML */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); diff --git a/src/XML/fed/EMail.php b/src/XML/fed/EMail.php index 4781008..e44420f 100644 --- a/src/XML/fed/EMail.php +++ b/src/XML/fed/EMail.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\SAML2\Type\EmailAddressValue; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException; @@ -29,7 +29,7 @@ public function __construct(EmailAddressValue $content, array $namespacedAttribu /** * Create a class from XML */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); diff --git a/src/XML/fed/PPID.php b/src/XML/fed/PPID.php index 800710c..57b0349 100644 --- a/src/XML/fed/PPID.php +++ b/src/XML/fed/PPID.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\WebServices\Federation\Assert\Assert; use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException; use SimpleSAML\XMLSchema\Type\StringValue; @@ -19,7 +19,7 @@ final class PPID extends AbstractAttributeExtensibleString /** * Create a class from XML */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); diff --git a/src/XML/fed/SecurityTokenServiceType.php b/src/XML/fed/SecurityTokenServiceType.php index 019a48b..3586db2 100644 --- a/src/XML/fed/SecurityTokenServiceType.php +++ b/src/XML/fed/SecurityTokenServiceType.php @@ -4,7 +4,7 @@ namespace SimpleSAML\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use SimpleSAML\SAML2\Type\SAMLAnyURIListValue; use SimpleSAML\SAML2\Type\SAMLAnyURIValue; use SimpleSAML\SAML2\Type\SAMLDateTimeValue; @@ -38,7 +38,7 @@ final class SecurityTokenServiceType extends AbstractSecurityTokenServiceType * @throws \SimpleSAML\XMLSchema\Exception\TooManyElementsException * if too many child-elements of a type are specified */ - public static function fromXML(DOMElement $xml): static + public static function fromXML(Dom\Element $xml): static { Assert::same($xml->localName, 'RoleDescriptor', InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); diff --git a/tests/Federation/XML/auth/ClaimTypeTest.php b/tests/Federation/XML/auth/ClaimTypeTest.php index d567635..b44a7fd 100644 --- a/tests/Federation/XML/auth/ClaimTypeTest.php +++ b/tests/Federation/XML/auth/ClaimTypeTest.php @@ -102,7 +102,7 @@ public function testMarshallingElementOrdering(): void $this->assertCount(1, $claimTypeElements); // Test ordering of ClaimType contents - /** @var \DOMElement[] $claimTypeElements */ + /** @var \Dom\Element[] $claimTypeElements */ $claimTypeElements = XPath::xpQuery($claimTypeElement, './auth:DisplayName/following-sibling::*', $xpCache); $this->assertCount(3, $claimTypeElements); $this->assertEquals('auth:Description', $claimTypeElements[0]->tagName); diff --git a/tests/Federation/XML/fed/ApplicationServiceEndpointTest.php b/tests/Federation/XML/fed/ApplicationServiceEndpointTest.php index 6ea473c..6672b06 100644 --- a/tests/Federation/XML/fed/ApplicationServiceEndpointTest.php +++ b/tests/Federation/XML/fed/ApplicationServiceEndpointTest.php @@ -4,7 +4,7 @@ namespace SimpleSAML\Test\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; @@ -41,14 +41,14 @@ final class ApplicationServiceEndpointTest extends TestCase use SerializableElementTestTrait; - /** @var \DOMElement $referenceParameters */ - protected static DOMElement $referenceParameters; + /** @var \Dom\Element $referenceParameters */ + protected static Dom\Element $referenceParameters; - /** @var \DOMElement $metadataContent */ - protected static DOMElement $metadataContent; + /** @var \Dom\Element $metadataContent */ + protected static Dom\Element $metadataContent; - /** @var \DOMElement $customContent */ - protected static DOMElement $customContent; + /** @var \Dom\Element $customContent */ + protected static Dom\Element $customContent; /** diff --git a/tests/Federation/XML/fed/AttributeServiceEndpointTest.php b/tests/Federation/XML/fed/AttributeServiceEndpointTest.php index cbc1608..0395d33 100644 --- a/tests/Federation/XML/fed/AttributeServiceEndpointTest.php +++ b/tests/Federation/XML/fed/AttributeServiceEndpointTest.php @@ -4,7 +4,7 @@ namespace SimpleSAML\Test\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; @@ -44,14 +44,14 @@ final class AttributeServiceEndpointTest extends TestCase use SerializableElementTestTrait; - /** @var \DOMElement $referenceParameters */ - protected static DOMElement $referenceParameters; + /** @var \Dom\Element $referenceParameters */ + protected static Dom\Element $referenceParameters; - /** @var \DOMElement $metadataContent */ - protected static DOMElement $metadataContent; + /** @var \Dom\Element $metadataContent */ + protected static Dom\Element $metadataContent; - /** @var \DOMElement $customContent */ - protected static DOMElement $customContent; + /** @var \Dom\Element $customContent */ + protected static Dom\Element $customContent; /** diff --git a/tests/Federation/XML/fed/AttributeServiceEndpointsTest.php b/tests/Federation/XML/fed/AttributeServiceEndpointsTest.php index 457e7b6..3284708 100644 --- a/tests/Federation/XML/fed/AttributeServiceEndpointsTest.php +++ b/tests/Federation/XML/fed/AttributeServiceEndpointsTest.php @@ -4,7 +4,7 @@ namespace SimpleSAML\Test\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; @@ -41,14 +41,14 @@ final class AttributeServiceEndpointsTest extends TestCase use SerializableElementTestTrait; - /** @var \DOMElement $referenceParameters */ - protected static DOMElement $referenceParameters; + /** @var \Dom\Element $referenceParameters */ + protected static Dom\Element $referenceParameters; - /** @var \DOMElement $metadataContent */ - protected static DOMElement $metadataContent; + /** @var \Dom\Element $metadataContent */ + protected static Dom\Element $metadataContent; - /** @var \DOMElement $customContent */ - protected static DOMElement $customContent; + /** @var \Dom\Element $customContent */ + protected static Dom\Element $customContent; /** diff --git a/tests/Federation/XML/fed/ClientPseudonymTest.php b/tests/Federation/XML/fed/ClientPseudonymTest.php index 88d4a83..0faeea3 100644 --- a/tests/Federation/XML/fed/ClientPseudonymTest.php +++ b/tests/Federation/XML/fed/ClientPseudonymTest.php @@ -122,7 +122,7 @@ public function testMarshallingElementOrdering(): void $this->assertCount(1, $clientPseudonymElements); // Test ordering of ClientPseudonym contents - /** @var \DOMElement[] $clientPseudonymElements */ + /** @var \Dom\Element[] $clientPseudonymElements */ $clientPseudonymElements = XPath::xpQuery($clientPseudonymElement, './fed:PPID/following-sibling::*', $xpCache); $this->assertCount(3, $clientPseudonymElements); diff --git a/tests/Federation/XML/fed/PassiveRequestorEndpointTest.php b/tests/Federation/XML/fed/PassiveRequestorEndpointTest.php index 52d9307..f93d8e7 100644 --- a/tests/Federation/XML/fed/PassiveRequestorEndpointTest.php +++ b/tests/Federation/XML/fed/PassiveRequestorEndpointTest.php @@ -4,7 +4,7 @@ namespace SimpleSAML\Test\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; @@ -41,14 +41,14 @@ final class PassiveRequestorEndpointTest extends TestCase use SerializableElementTestTrait; - /** @var \DOMElement $referenceParameters */ - protected static DOMElement $referenceParameters; + /** @var \Dom\Element $referenceParameters */ + protected static Dom\Element $referenceParameters; - /** @var \DOMElement $metadataContent */ - protected static DOMElement $metadataContent; + /** @var \Dom\Element $metadataContent */ + protected static Dom\Element $metadataContent; - /** @var \DOMElement $customContent */ - protected static DOMElement $customContent; + /** @var \Dom\Element $customContent */ + protected static Dom\Element $customContent; /** diff --git a/tests/Federation/XML/fed/PassiveRequestorEndpointsTest.php b/tests/Federation/XML/fed/PassiveRequestorEndpointsTest.php index c7cb691..7b036d8 100644 --- a/tests/Federation/XML/fed/PassiveRequestorEndpointsTest.php +++ b/tests/Federation/XML/fed/PassiveRequestorEndpointsTest.php @@ -4,7 +4,7 @@ namespace SimpleSAML\Test\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; @@ -41,14 +41,14 @@ final class PassiveRequestorEndpointsTest extends TestCase use SerializableElementTestTrait; - /** @var \DOMElement $referenceParameters */ - protected static DOMElement $referenceParameters; + /** @var \Dom\Element $referenceParameters */ + protected static Dom\Element $referenceParameters; - /** @var \DOMElement $metadataContent */ - protected static DOMElement $metadataContent; + /** @var \Dom\Element $metadataContent */ + protected static Dom\Element $metadataContent; - /** @var \DOMElement $customContent */ - protected static DOMElement $customContent; + /** @var \Dom\Element $customContent */ + protected static Dom\Element $customContent; /** diff --git a/tests/Federation/XML/fed/PseudonymServiceEndpointTest.php b/tests/Federation/XML/fed/PseudonymServiceEndpointTest.php index c142ce7..417f430 100644 --- a/tests/Federation/XML/fed/PseudonymServiceEndpointTest.php +++ b/tests/Federation/XML/fed/PseudonymServiceEndpointTest.php @@ -4,7 +4,7 @@ namespace SimpleSAML\Test\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; @@ -41,14 +41,14 @@ final class PseudonymServiceEndpointTest extends TestCase use SerializableElementTestTrait; - /** @var \DOMElement $referenceParameters */ - protected static DOMElement $referenceParameters; + /** @var \Dom\Element $referenceParameters */ + protected static Dom\Element $referenceParameters; - /** @var \DOMElement $metadataContent */ - protected static DOMElement $metadataContent; + /** @var \Dom\Element $metadataContent */ + protected static Dom\Element $metadataContent; - /** @var \DOMElement $customContent */ - protected static DOMElement $customContent; + /** @var \Dom\Element $customContent */ + protected static Dom\Element $customContent; /** diff --git a/tests/Federation/XML/fed/PseudonymServiceEndpointsTest.php b/tests/Federation/XML/fed/PseudonymServiceEndpointsTest.php index 02a3117..66d11b3 100644 --- a/tests/Federation/XML/fed/PseudonymServiceEndpointsTest.php +++ b/tests/Federation/XML/fed/PseudonymServiceEndpointsTest.php @@ -4,7 +4,7 @@ namespace SimpleSAML\Test\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; @@ -41,14 +41,14 @@ final class PseudonymServiceEndpointsTest extends TestCase use SerializableElementTestTrait; - /** @var \DOMElement $referenceParameters */ - protected static DOMElement $referenceParameters; + /** @var \Dom\Element $referenceParameters */ + protected static Dom\Element $referenceParameters; - /** @var \DOMElement $metadataContent */ - protected static DOMElement $metadataContent; + /** @var \Dom\Element $metadataContent */ + protected static Dom\Element $metadataContent; - /** @var \DOMElement $customContent */ - protected static DOMElement $customContent; + /** @var \Dom\Element $customContent */ + protected static Dom\Element $customContent; /** diff --git a/tests/Federation/XML/fed/PseudonymTest.php b/tests/Federation/XML/fed/PseudonymTest.php index db85adc..c29b7ad 100644 --- a/tests/Federation/XML/fed/PseudonymTest.php +++ b/tests/Federation/XML/fed/PseudonymTest.php @@ -186,7 +186,7 @@ public function testMarshallingElementOrder(): void $this->assertCount(1, $pseudonymBasisElements); // Test ordering of Pseudonym contents - /** @var \DOMElement[] $pseudonymElements */ + /** @var \Dom\Element[] $pseudonymElements */ $pseudonymElements = XPath::xpQuery($pseudonymElement, './fed:PseudonymBasis/following-sibling::*', $xpCache); $this->assertCount(5, $pseudonymElements); diff --git a/tests/Federation/XML/fed/ReferenceEPRTest.php b/tests/Federation/XML/fed/ReferenceEPRTest.php index f5bff9b..cb9c55d 100644 --- a/tests/Federation/XML/fed/ReferenceEPRTest.php +++ b/tests/Federation/XML/fed/ReferenceEPRTest.php @@ -4,7 +4,7 @@ namespace SimpleSAML\Test\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; @@ -34,14 +34,14 @@ final class ReferenceEPRTest extends TestCase use SerializableElementTestTrait; - /** @var \DOMElement $referenceParametersContent */ - protected static DOMElement $referenceParametersContent; + /** @var \Dom\Element $referenceParametersContent */ + protected static Dom\Element $referenceParametersContent; - /** @var \DOMElement $metadataContent */ - protected static DOMElement $metadataContent; + /** @var \Dom\Element $metadataContent */ + protected static Dom\Element $metadataContent; - /** @var \DOMElement $customContent */ - protected static DOMElement $customContent; + /** @var \Dom\Element $customContent */ + protected static Dom\Element $customContent; /** diff --git a/tests/Federation/XML/fed/ReferenceTokenTest.php b/tests/Federation/XML/fed/ReferenceTokenTest.php index 0041182..9a06bcd 100644 --- a/tests/Federation/XML/fed/ReferenceTokenTest.php +++ b/tests/Federation/XML/fed/ReferenceTokenTest.php @@ -4,7 +4,7 @@ namespace SimpleSAML\Test\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; @@ -44,20 +44,20 @@ final class ReferenceTokenTest extends TestCase use SerializableElementTestTrait; - /** @var \DOMElement $referenceParametersContent */ - protected static DOMElement $referenceParametersContent; + /** @var \Dom\Element $referenceParametersContent */ + protected static Dom\Element $referenceParametersContent; - /** @var \DOMElement $metadataContent */ - protected static DOMElement $metadataContent; + /** @var \Dom\Element $metadataContent */ + protected static Dom\Element $metadataContent; - /** @var \DOMElement $customContent */ - protected static DOMElement $customContent; + /** @var \Dom\Element $customContent */ + protected static Dom\Element $customContent; - /** @var \DOMElement $someChunk */ - protected static DOMElement $someChunk; + /** @var \Dom\Element $someChunk */ + protected static Dom\Element $someChunk; - /** @var \DOMElement $some */ - protected static DOMElement $some; + /** @var \Dom\Element $some */ + protected static Dom\Element $some; /** diff --git a/tests/Federation/XML/fed/SecurityTokenServiceEndpointTest.php b/tests/Federation/XML/fed/SecurityTokenServiceEndpointTest.php index 8e261cd..d8dee53 100644 --- a/tests/Federation/XML/fed/SecurityTokenServiceEndpointTest.php +++ b/tests/Federation/XML/fed/SecurityTokenServiceEndpointTest.php @@ -4,7 +4,7 @@ namespace SimpleSAML\Test\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; @@ -41,14 +41,14 @@ final class SecurityTokenServiceEndpointTest extends TestCase use SerializableElementTestTrait; - /** @var \DOMElement $referenceParameters */ - protected static DOMElement $referenceParameters; + /** @var \Dom\Element $referenceParameters */ + protected static Dom\Element $referenceParameters; - /** @var \DOMElement $metadataContent */ - protected static DOMElement $metadataContent; + /** @var \Dom\Element $metadataContent */ + protected static Dom\Element $metadataContent; - /** @var \DOMElement $customContent */ - protected static DOMElement $customContent; + /** @var \Dom\Element $customContent */ + protected static Dom\Element $customContent; /** diff --git a/tests/Federation/XML/fed/SignOutTest.php b/tests/Federation/XML/fed/SignOutTest.php index c7b713c..a3a55e4 100644 --- a/tests/Federation/XML/fed/SignOutTest.php +++ b/tests/Federation/XML/fed/SignOutTest.php @@ -128,7 +128,7 @@ public function testMarshallingElementOrder(): void $this->assertCount(1, $signOutElements); // Test ordering of SignOUt contents - /** @var \DOMElement[] $signOutElements */ + /** @var \Dom\Element[] $signOutElements */ $signOutElements = XPath::xpQuery($signOutElement, './fed:Realm/following-sibling::*', $xpCache); $this->assertCount(2, $signOutElements); diff --git a/tests/Federation/XML/fed/SingleSignOutNotificationEndpointTest.php b/tests/Federation/XML/fed/SingleSignOutNotificationEndpointTest.php index bea2542..4e7e013 100644 --- a/tests/Federation/XML/fed/SingleSignOutNotificationEndpointTest.php +++ b/tests/Federation/XML/fed/SingleSignOutNotificationEndpointTest.php @@ -4,7 +4,7 @@ namespace SimpleSAML\Test\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; @@ -41,14 +41,14 @@ final class SingleSignOutNotificationEndpointTest extends TestCase use SerializableElementTestTrait; - /** @var \DOMElement $referenceParameters */ - protected static DOMElement $referenceParameters; + /** @var \Dom\Element $referenceParameters */ + protected static Dom\Element $referenceParameters; - /** @var \DOMElement $metadataContent */ - protected static DOMElement $metadataContent; + /** @var \Dom\Element $metadataContent */ + protected static Dom\Element $metadataContent; - /** @var \DOMElement $customContent */ - protected static DOMElement $customContent; + /** @var \Dom\Element $customContent */ + protected static Dom\Element $customContent; /** diff --git a/tests/Federation/XML/fed/SingleSignOutNotificationEndpointsTest.php b/tests/Federation/XML/fed/SingleSignOutNotificationEndpointsTest.php index f4ccc50..4072df9 100644 --- a/tests/Federation/XML/fed/SingleSignOutNotificationEndpointsTest.php +++ b/tests/Federation/XML/fed/SingleSignOutNotificationEndpointsTest.php @@ -4,7 +4,7 @@ namespace SimpleSAML\Test\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; @@ -41,14 +41,14 @@ final class SingleSignOutNotificationEndpointsTest extends TestCase use SerializableElementTestTrait; - /** @var \DOMElement $referenceParameters */ - protected static DOMElement $referenceParameters; + /** @var \Dom\Element $referenceParameters */ + protected static Dom\Element $referenceParameters; - /** @var \DOMElement $metadataContent */ - protected static DOMElement $metadataContent; + /** @var \Dom\Element $metadataContent */ + protected static Dom\Element $metadataContent; - /** @var \DOMElement $customContent */ - protected static DOMElement $customContent; + /** @var \Dom\Element $customContent */ + protected static Dom\Element $customContent; /** diff --git a/tests/Federation/XML/fed/SingleSignOutSubscriptionEndpointTest.php b/tests/Federation/XML/fed/SingleSignOutSubscriptionEndpointTest.php index 46e80fe..55ac478 100644 --- a/tests/Federation/XML/fed/SingleSignOutSubscriptionEndpointTest.php +++ b/tests/Federation/XML/fed/SingleSignOutSubscriptionEndpointTest.php @@ -4,7 +4,7 @@ namespace SimpleSAML\Test\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; @@ -41,14 +41,14 @@ final class SingleSignOutSubscriptionEndpointTest extends TestCase use SerializableElementTestTrait; - /** @var \DOMElement $referenceParameters */ - protected static DOMElement $referenceParameters; + /** @var \Dom\Element $referenceParameters */ + protected static Dom\Element $referenceParameters; - /** @var \DOMElement $metadataContent */ - protected static DOMElement $metadataContent; + /** @var \Dom\Element $metadataContent */ + protected static Dom\Element $metadataContent; - /** @var \DOMElement $customContent */ - protected static DOMElement $customContent; + /** @var \Dom\Element $customContent */ + protected static Dom\Element $customContent; /** diff --git a/tests/Federation/XML/fed/SingleSignOutSubscriptionEndpointsTest.php b/tests/Federation/XML/fed/SingleSignOutSubscriptionEndpointsTest.php index 771d43c..eb93ac5 100644 --- a/tests/Federation/XML/fed/SingleSignOutSubscriptionEndpointsTest.php +++ b/tests/Federation/XML/fed/SingleSignOutSubscriptionEndpointsTest.php @@ -4,7 +4,7 @@ namespace SimpleSAML\Test\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; @@ -41,14 +41,14 @@ final class SingleSignOutSubscriptionEndpointsTest extends TestCase use SerializableElementTestTrait; - /** @var \DOMElement $referenceParameters */ - protected static DOMElement $referenceParameters; + /** @var \Dom\Element $referenceParameters */ + protected static Dom\Element $referenceParameters; - /** @var \DOMElement $metadataContent */ - protected static DOMElement $metadataContent; + /** @var \Dom\Element $metadataContent */ + protected static Dom\Element $metadataContent; - /** @var \DOMElement $customContent */ - protected static DOMElement $customContent; + /** @var \Dom\Element $customContent */ + protected static Dom\Element $customContent; /** diff --git a/tests/Federation/XML/fed/TargetScopesTest.php b/tests/Federation/XML/fed/TargetScopesTest.php index 7cf66ad..b06326e 100644 --- a/tests/Federation/XML/fed/TargetScopesTest.php +++ b/tests/Federation/XML/fed/TargetScopesTest.php @@ -4,7 +4,7 @@ namespace SimpleSAML\Test\WebServices\Federation\XML\fed; -use DOMElement; +use Dom; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; @@ -41,14 +41,14 @@ final class TargetScopesTest extends TestCase use SerializableElementTestTrait; - /** @var \DOMElement $referenceParameters */ - protected static DOMElement $referenceParameters; + /** @var \Dom\Element $referenceParameters */ + protected static Dom\Element $referenceParameters; - /** @var \DOMElement $metadataContent */ - protected static DOMElement $metadataContent; + /** @var \Dom\Element $metadataContent */ + protected static Dom\Element $metadataContent; - /** @var \DOMElement $customContent */ - protected static DOMElement $customContent; + /** @var \Dom\Element $customContent */ + protected static Dom\Element $customContent; /** diff --git a/tests/resources/xml/fed/ApplicationServiceEndpoint.xml b/tests/resources/xml/fed/ApplicationServiceEndpoint.xml index 6f572dd..c00e033 100644 --- a/tests/resources/xml/fed/ApplicationServiceEndpoint.xml +++ b/tests/resources/xml/fed/ApplicationServiceEndpoint.xml @@ -1,4 +1,4 @@ - + https://login.microsoftonline.com/login.srf diff --git a/tests/resources/xml/fed/AttributeServiceEndpoint.xml b/tests/resources/xml/fed/AttributeServiceEndpoint.xml index 1cc9863..48d961a 100644 --- a/tests/resources/xml/fed/AttributeServiceEndpoint.xml +++ b/tests/resources/xml/fed/AttributeServiceEndpoint.xml @@ -1,4 +1,4 @@ - + https://login.microsoftonline.com/login.srf diff --git a/tests/resources/xml/fed/AttributeServiceEndpoints.xml b/tests/resources/xml/fed/AttributeServiceEndpoints.xml index 87a49bd..e4e5d9f 100644 --- a/tests/resources/xml/fed/AttributeServiceEndpoints.xml +++ b/tests/resources/xml/fed/AttributeServiceEndpoints.xml @@ -1,4 +1,4 @@ - + https://login.microsoftonline.com/login.srf diff --git a/tests/resources/xml/fed/PassiveRequestorEndpoint.xml b/tests/resources/xml/fed/PassiveRequestorEndpoint.xml index c5d808a..e25301f 100644 --- a/tests/resources/xml/fed/PassiveRequestorEndpoint.xml +++ b/tests/resources/xml/fed/PassiveRequestorEndpoint.xml @@ -1,4 +1,4 @@ - + https://login.microsoftonline.com/login.srf diff --git a/tests/resources/xml/fed/PassiveRequestorEndpoints.xml b/tests/resources/xml/fed/PassiveRequestorEndpoints.xml index 153420f..ca9cdd4 100644 --- a/tests/resources/xml/fed/PassiveRequestorEndpoints.xml +++ b/tests/resources/xml/fed/PassiveRequestorEndpoints.xml @@ -1,4 +1,4 @@ - + https://login.microsoftonline.com/login.srf diff --git a/tests/resources/xml/fed/PseudonymServiceEndpoint.xml b/tests/resources/xml/fed/PseudonymServiceEndpoint.xml index ee32378..7ad5ba2 100644 --- a/tests/resources/xml/fed/PseudonymServiceEndpoint.xml +++ b/tests/resources/xml/fed/PseudonymServiceEndpoint.xml @@ -1,4 +1,4 @@ - + https://login.microsoftonline.com/login.srf diff --git a/tests/resources/xml/fed/PseudonymServiceEndpoints.xml b/tests/resources/xml/fed/PseudonymServiceEndpoints.xml index 46262e6..9672c8d 100644 --- a/tests/resources/xml/fed/PseudonymServiceEndpoints.xml +++ b/tests/resources/xml/fed/PseudonymServiceEndpoints.xml @@ -1,4 +1,4 @@ - + https://login.microsoftonline.com/login.srf diff --git a/tests/resources/xml/fed/SecurityTokenServiceEndpoint.xml b/tests/resources/xml/fed/SecurityTokenServiceEndpoint.xml index d468eef..09224c5 100644 --- a/tests/resources/xml/fed/SecurityTokenServiceEndpoint.xml +++ b/tests/resources/xml/fed/SecurityTokenServiceEndpoint.xml @@ -1,4 +1,4 @@ - + https://login.microsoftonline.com/login.srf diff --git a/tests/resources/xml/fed/SingleSignOutNotificationEndpoint.xml b/tests/resources/xml/fed/SingleSignOutNotificationEndpoint.xml index b117cf0..27137b3 100644 --- a/tests/resources/xml/fed/SingleSignOutNotificationEndpoint.xml +++ b/tests/resources/xml/fed/SingleSignOutNotificationEndpoint.xml @@ -1,4 +1,4 @@ - + https://login.microsoftonline.com/login.srf diff --git a/tests/resources/xml/fed/SingleSignOutNotificationEndpoints.xml b/tests/resources/xml/fed/SingleSignOutNotificationEndpoints.xml index 563c00b..69c9822 100644 --- a/tests/resources/xml/fed/SingleSignOutNotificationEndpoints.xml +++ b/tests/resources/xml/fed/SingleSignOutNotificationEndpoints.xml @@ -1,4 +1,4 @@ - + https://login.microsoftonline.com/login.srf diff --git a/tests/resources/xml/fed/SingleSignOutSubscriptionEndpoint.xml b/tests/resources/xml/fed/SingleSignOutSubscriptionEndpoint.xml index c9bcf27..6c5ddcd 100644 --- a/tests/resources/xml/fed/SingleSignOutSubscriptionEndpoint.xml +++ b/tests/resources/xml/fed/SingleSignOutSubscriptionEndpoint.xml @@ -1,4 +1,4 @@ - + https://login.microsoftonline.com/login.srf diff --git a/tests/resources/xml/fed/SingleSignOutSubscriptionEndpoints.xml b/tests/resources/xml/fed/SingleSignOutSubscriptionEndpoints.xml index b1b525f..197c45f 100644 --- a/tests/resources/xml/fed/SingleSignOutSubscriptionEndpoints.xml +++ b/tests/resources/xml/fed/SingleSignOutSubscriptionEndpoints.xml @@ -1,4 +1,4 @@ - + https://login.microsoftonline.com/login.srf diff --git a/tests/resources/xml/fed/TargetScopes.xml b/tests/resources/xml/fed/TargetScopes.xml index 60d5022..99fd56d 100644 --- a/tests/resources/xml/fed/TargetScopes.xml +++ b/tests/resources/xml/fed/TargetScopes.xml @@ -1,4 +1,4 @@ - + https://login.microsoftonline.com/login.srf From 1478a72ff5827bc71bc2bd6a92f198f1faa2d5b3 Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Mon, 17 Aug 2026 20:20:18 +0200 Subject: [PATCH 2/4] Bump libraries to their new versions --- composer.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 9ddd450..98f0453 100644 --- a/composer.json +++ b/composer.json @@ -13,13 +13,13 @@ "php": "^8.5", "ext-dom": "*", - "simplesamlphp/assert": "~2.0", - "simplesamlphp/saml2": "dev-feature/dom-migration-php84", - "simplesamlphp/xml-common": "dev-feature/dom-migration-php84", - "simplesamlphp/xml-security": "dev-feature/dom-migration-php84", - "simplesamlphp/xml-ws-addressing": "dev-feature/dom-migration-php84", - "simplesamlphp/xml-ws-security-policy": "dev-feature/dom-migration-php84", - "simplesamlphp/xml-wss-core": "dev-feature/dom-migration-php84" + "simplesamlphp/assert": "~3.0", + "simplesamlphp/saml2": "~7.0@RC", + "simplesamlphp/xml-common": "~3.0", + "simplesamlphp/xml-security": "~3.0", + "simplesamlphp/xml-ws-addressing": "~2.0", + "simplesamlphp/xml-ws-security-policy": " ~2.0", + "simplesamlphp/xml-wss-core": "~2.0" }, "require-dev": { "simplesamlphp/simplesamlphp-test-framework": "~2.0" From 1a05786178bfd83488748cd976b201e42eb5df2f Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Mon, 17 Aug 2026 23:19:31 +0200 Subject: [PATCH 3/4] Ensure textContent is not null --- src/XML/auth/AbstractDescriptionType.php | 6 +++++- src/XML/auth/AbstractDisplayNameType.php | 6 +++++- src/XML/auth/AbstractDisplayValueType.php | 6 +++++- src/XML/fed/AbstractAttributeExtensibleURI.php | 6 +++++- src/XML/fed/AbstractFreshnessType.php | 6 +++++- src/XML/fed/AbstractReferenceDigestType.php | 6 +++++- src/XML/fed/AbstractSignOutType.php | 4 +++- src/XML/fed/DisplayName.php | 6 +++++- src/XML/fed/EMail.php | 6 +++++- src/XML/fed/PPID.php | 6 +++++- src/XML/fed/SecurityTokenServiceType.php | 4 +++- 11 files changed, 51 insertions(+), 11 deletions(-) diff --git a/src/XML/auth/AbstractDescriptionType.php b/src/XML/auth/AbstractDescriptionType.php index 5dd2de8..96624d4 100644 --- a/src/XML/auth/AbstractDescriptionType.php +++ b/src/XML/auth/AbstractDescriptionType.php @@ -53,7 +53,11 @@ public static function fromXML(Dom\Element $xml): static Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); - return new static(StringValue::fromString($xml->textContent), self::getAttributesNSFromXML($xml)); + /** @var string $textContent */ + $textContent = $xml->textContent; + Assert::notNull($textContent); + + return new static(StringValue::fromString($textContent), self::getAttributesNSFromXML($xml)); } diff --git a/src/XML/auth/AbstractDisplayNameType.php b/src/XML/auth/AbstractDisplayNameType.php index 43498d8..2b10d53 100644 --- a/src/XML/auth/AbstractDisplayNameType.php +++ b/src/XML/auth/AbstractDisplayNameType.php @@ -53,7 +53,11 @@ public static function fromXML(Dom\Element $xml): static Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); - return new static(StringValue::fromString($xml->textContent), self::getAttributesNSFromXML($xml)); + /** @var string $textContent */ + $textContent = $xml->textContent; + Assert::notNull($textContent); + + return new static(StringValue::fromString($textContent), self::getAttributesNSFromXML($xml)); } diff --git a/src/XML/auth/AbstractDisplayValueType.php b/src/XML/auth/AbstractDisplayValueType.php index 4845c78..e5b9392 100644 --- a/src/XML/auth/AbstractDisplayValueType.php +++ b/src/XML/auth/AbstractDisplayValueType.php @@ -53,7 +53,11 @@ public static function fromXML(Dom\Element $xml): static Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); - return new static(StringValue::fromString($xml->textContent), self::getAttributesNSFromXML($xml)); + /** @var string $textContent */ + $textContent = $xml->textContent; + Assert::notNull($textContent); + + return new static(StringValue::fromString($textContent), self::getAttributesNSFromXML($xml)); } diff --git a/src/XML/fed/AbstractAttributeExtensibleURI.php b/src/XML/fed/AbstractAttributeExtensibleURI.php index 52dcd92..b3b7a63 100644 --- a/src/XML/fed/AbstractAttributeExtensibleURI.php +++ b/src/XML/fed/AbstractAttributeExtensibleURI.php @@ -48,8 +48,12 @@ public static function fromXML(Dom\Element $xml): static Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); + /** @var string $textContent */ + $textContent = $xml->textContent; + Assert::notNull($textContent); + return new static( - AnyURIValue::fromString($xml->textContent), + AnyURIValue::fromString($textContent), self::getAttributesNSFromXML($xml), ); } diff --git a/src/XML/fed/AbstractFreshnessType.php b/src/XML/fed/AbstractFreshnessType.php index 96982ac..17f5028 100644 --- a/src/XML/fed/AbstractFreshnessType.php +++ b/src/XML/fed/AbstractFreshnessType.php @@ -69,8 +69,12 @@ public static function fromXML(Dom\Element $xml): static Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); + /** @var string $textContent */ + $textContent = $xml->textContent; + Assert::notNull($textContent); + return new static( - UnsignedIntValue::fromString($xml->textContent), + UnsignedIntValue::fromString($textContent), self::getOptionalAttribute($xml, 'AllowCache', BooleanValue::class, null), self::getAttributesNSFromXML($xml), ); diff --git a/src/XML/fed/AbstractReferenceDigestType.php b/src/XML/fed/AbstractReferenceDigestType.php index b73f055..d9773d8 100644 --- a/src/XML/fed/AbstractReferenceDigestType.php +++ b/src/XML/fed/AbstractReferenceDigestType.php @@ -48,8 +48,12 @@ public static function fromXML(Dom\Element $xml): static Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); + /** @var string $textContent */ + $textContent = $xml->textContent; + Assert::notNull($textContent); + return new static( - Base64BinaryValue::fromString($xml->textContent), + Base64BinaryValue::fromString($textContent), self::getAttributesNSFromXML($xml), ); } diff --git a/src/XML/fed/AbstractSignOutType.php b/src/XML/fed/AbstractSignOutType.php index 8d19074..ea0c2fa 100644 --- a/src/XML/fed/AbstractSignOutType.php +++ b/src/XML/fed/AbstractSignOutType.php @@ -101,7 +101,9 @@ public static function fromXML(Dom\Element $xml): static $Id = null; if ($xml->hasAttributeNS(C::NS_SEC_UTIL, 'Id')) { - $Id = IDValue::fromString($xml->getAttributeNS(C::NS_SEC_UTIL, 'Id')); + /** @var string $IdValue */ + $IdValue = $xml->getAttributeNS(C::NS_SEC_UTIL, 'Id'); + $Id = IDValue::fromString($IdValue); } $signOutBasis = SignOutBasis::getChildrenOfClass($xml); diff --git a/src/XML/fed/DisplayName.php b/src/XML/fed/DisplayName.php index 14160c6..607328b 100644 --- a/src/XML/fed/DisplayName.php +++ b/src/XML/fed/DisplayName.php @@ -24,8 +24,12 @@ public static function fromXML(Dom\Element $xml): static Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); + /** @var string $textContent */ + $textContent = $xml->textContent; + Assert::notNull($textContent); + return new static( - StringValue::fromString($xml->textContent), + StringValue::fromString($textContent), self::getAttributesNSFromXML($xml), ); } diff --git a/src/XML/fed/EMail.php b/src/XML/fed/EMail.php index e44420f..0afeec0 100644 --- a/src/XML/fed/EMail.php +++ b/src/XML/fed/EMail.php @@ -34,8 +34,12 @@ public static function fromXML(Dom\Element $xml): static Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); + /** @var string $textContent */ + $textContent = $xml->textContent; + Assert::notNull($textContent); + return new static( - EmailAddressValue::fromString($xml->textContent), + EmailAddressValue::fromString($textContent), self::getAttributesNSFromXML($xml), ); } diff --git a/src/XML/fed/PPID.php b/src/XML/fed/PPID.php index 57b0349..e205065 100644 --- a/src/XML/fed/PPID.php +++ b/src/XML/fed/PPID.php @@ -24,8 +24,12 @@ public static function fromXML(Dom\Element $xml): static Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); + /** @var string $textContent */ + $textContent = $xml->textContent; + Assert::notNull($textContent); + return new static( - StringValue::fromString($xml->textContent), + StringValue::fromString($textContent), self::getAttributesNSFromXML($xml), ); } diff --git a/src/XML/fed/SecurityTokenServiceType.php b/src/XML/fed/SecurityTokenServiceType.php index 510e1f0..dcc35bf 100644 --- a/src/XML/fed/SecurityTokenServiceType.php +++ b/src/XML/fed/SecurityTokenServiceType.php @@ -51,7 +51,9 @@ public static function fromXML(Dom\Element $xml): static SchemaViolationException::class, ); - $type = QNameValue::fromDocument($xml->getAttributeNS(C::NS_XSI, 'type'), $xml); + /** @var string $typeValue */ + $typeValue = $xml->getAttributeNS(C::NS_XSI, 'type'); + $type = QNameValue::fromDocument($typeValue, $xml); $orgs = Organization::getChildrenOfClass($xml); Assert::maxCount( From d210ff4ca6aa8695ce1e41b268fd6a62f81d9ce5 Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Mon, 17 Aug 2026 23:32:14 +0200 Subject: [PATCH 4/4] Ensure string is non-empty --- tests/Federation/XML/auth/ConstrainedValueTest.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/Federation/XML/auth/ConstrainedValueTest.php b/tests/Federation/XML/auth/ConstrainedValueTest.php index 730212b..95b7c0a 100644 --- a/tests/Federation/XML/auth/ConstrainedValueTest.php +++ b/tests/Federation/XML/auth/ConstrainedValueTest.php @@ -78,9 +78,9 @@ public static function setUpBeforeClass(): void #[DataProvider('classProvider')] public function testMarshalling(string $class, string $xmlRepresentation): void { - $xmlRepresentation = DOMDocumentFactory::fromFile( - self::$resourcePath . $xmlRepresentation, - ); + /** @var non-empty-string $filePath */ + $filePath = self::$resourcePath . $xmlRepresentation; + $xmlRepresentation = DOMDocumentFactory::fromFile($filePath); /** * @var ( @@ -114,9 +114,9 @@ public function testMarshalling(string $class, string $xmlRepresentation): void #[DataProvider('classProvider')] public function testUnmarshalling(string $class, string $xmlRepresentation): void { - $xmlRepresentation = DOMDocumentFactory::fromFile( - self::$resourcePath . $xmlRepresentation, - ); + /** @var non-empty-string $filePath */ + $filePath = self::$resourcePath . $xmlRepresentation; + $xmlRepresentation = DOMDocumentFactory::fromFile($filePath); $constrainedValue = ConstrainedValue::fromXML($xmlRepresentation->documentElement); $this->assertEquals( @@ -127,7 +127,7 @@ public function testUnmarshalling(string $class, string $xmlRepresentation): voi /** - * @return array> + * @return array> */ public static function classProvider(): array {