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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"require-dev": {
"simplesamlphp/simplesamlphp-test-framework": "~1.11",
"simplesamlphp/xml-soap": "~2.3"
"simplesamlphp/xml-soap": "dev-feature/dom-migration-php84"
},
"autoload": {
"psr-4": {
Expand Down
11 changes: 5 additions & 6 deletions src/Utils/XPath.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

namespace SimpleSAML\WebServices\Security\Utils;

use DOMNode;
use DOMXPath;
use Dom;
use SimpleSAML\WebServices\Security\Constants as C;

/**
Expand All @@ -16,15 +15,15 @@
class XPath extends \SimpleSAML\XPath\XPath
{
/*
* Get a DOMXPath object that can be used to search for WS Security elements.
* Get a Dom\XPath object that can be used to search for WS Security 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);

Expand Down
10 changes: 5 additions & 5 deletions src/XML/wsse/AbstractAttributedString.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SimpleSAML\WebServices\Security\XML\wsse;

use DOMElement;
use Dom;
use SimpleSAML\WebServices\Security\Assert\Assert;
use SimpleSAML\WebServices\Security\Constants as C;
use SimpleSAML\WebServices\Security\Type\IDValue;
Expand Down Expand Up @@ -61,12 +61,12 @@ public function __construct(
/**
* Create an instance of this object from its XML representation.
*
* @param \DOMElement $xml
* @param \Dom\Element $xml
*
* @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);
Expand All @@ -85,9 +85,9 @@ public static function fromXML(DOMElement $xml): static


/**
* @param \DOMElement|null $parent
* @param \Dom\Element|null $parent
*/
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();
Expand Down
10 changes: 5 additions & 5 deletions src/XML/wsse/AbstractBinarySecurityTokenType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SimpleSAML\WebServices\Security\XML\wsse;

use DOMElement;
use Dom;
use SimpleSAML\WebServices\Security\Assert\Assert;
use SimpleSAML\WebServices\Security\Constants as C;
use SimpleSAML\WebServices\Security\Type\IDValue;
Expand Down Expand Up @@ -56,12 +56,12 @@ public function getValueType(): ?AnyURIValue
/**
* Create an instance of this object from its XML representation.
*
* @param \DOMElement $xml
* @param \Dom\Element $xml
*
* @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);
Expand All @@ -84,9 +84,9 @@ public static function fromXML(DOMElement $xml): static
/**
* Add this username token to an XML element.
*
* @param \DOMElement $parent The element we should append this username token to.
* @param \Dom\Element $parent The element we should append this username token to.
*/
public function toXML(?DOMElement $parent = null): DOMElement
public function toXML(?Dom\Element $parent = null): Dom\Element
{
$e = parent::toXML($parent);

Expand Down
10 changes: 5 additions & 5 deletions src/XML/wsse/AbstractEmbeddedType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SimpleSAML\WebServices\Security\XML\wsse;

use DOMElement;
use Dom;
use SimpleSAML\WebServices\Security\Assert\Assert;
use SimpleSAML\XML\ExtendableAttributesTrait;
use SimpleSAML\XML\ExtendableElementTrait;
Expand Down Expand Up @@ -70,12 +70,12 @@ public function isEmptyElement(): bool
/**
* Create an instance of this object from its XML representation.
*
* @param \DOMElement $xml
* @param \Dom\Element $xml
*
* @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);
Expand All @@ -91,9 +91,9 @@ public static function fromXML(DOMElement $xml): static
/**
* Add this username token to an XML element.
*
* @param \DOMElement|null $parent The element we should append this username token to.
* @param \Dom\Element|null $parent The element we should append this username token to.
*/
public function toXML(?DOMElement $parent = null): DOMElement
public function toXML(?Dom\Element $parent = null): Dom\Element
{
$e = parent::instantiateParentElement($parent);

Expand Down
10 changes: 5 additions & 5 deletions src/XML/wsse/AbstractEncodedString.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SimpleSAML\WebServices\Security\XML\wsse;

use DOMElement;
use Dom;
use SimpleSAML\WebServices\Security\Assert\Assert;
use SimpleSAML\WebServices\Security\Constants as C;
use SimpleSAML\WebServices\Security\Type\IDValue;
Expand Down Expand Up @@ -51,12 +51,12 @@ public function getEncodingType(): ?AnyURIValue
/**
* Create an instance of this object from its XML representation.
*
* @param \DOMElement $xml
* @param \Dom\Element $xml
*
* @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);
Expand All @@ -76,9 +76,9 @@ public static function fromXML(DOMElement $xml): static


/**
* @param \DOMElement|null $parent
* @param \Dom\Element|null $parent
*/
public function toXML(?DOMElement $parent = null): DOMElement
public function toXML(?Dom\Element $parent = null): Dom\Element
{
$e = parent::toXML($parent);

Expand Down
10 changes: 5 additions & 5 deletions src/XML/wsse/AbstractKeyIdentifierType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SimpleSAML\WebServices\Security\XML\wsse;

use DOMElement;
use Dom;
use SimpleSAML\WebServices\Security\Assert\Assert;
use SimpleSAML\WebServices\Security\Constants as C;
use SimpleSAML\WebServices\Security\Type\IDValue;
Expand Down Expand Up @@ -51,12 +51,12 @@ public function getValueType(): ?AnyURIValue
/**
* Create an instance of this object from its XML representation.
*
* @param \DOMElement $xml
* @param \Dom\Element $xml
*
* @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);
Expand All @@ -79,9 +79,9 @@ public static function fromXML(DOMElement $xml): static
/**
* Add this username token to an XML element.
*
* @param \DOMElement $parent The element we should append this username token to.
* @param \Dom\Element $parent The element we should append this username token to.
*/
public function toXML(?DOMElement $parent = null): DOMElement
public function toXML(?Dom\Element $parent = null): Dom\Element
{
$e = parent::toXML($parent);

Expand Down
10 changes: 5 additions & 5 deletions src/XML/wsse/AbstractPasswordString.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SimpleSAML\WebServices\Security\XML\wsse;

use DOMElement;
use Dom;
use SimpleSAML\WebServices\Security\Assert\Assert;
use SimpleSAML\WebServices\Security\Constants as C;
use SimpleSAML\WebServices\Security\Type\IDValue;
Expand Down Expand Up @@ -50,12 +50,12 @@ public function getType(): ?AnyURIValue
/**
* Create an instance of this object from its XML representation.
*
* @param \DOMElement $xml
* @param \Dom\Element $xml
*
* @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);
Expand All @@ -75,9 +75,9 @@ public static function fromXML(DOMElement $xml): static


/**
* @param \DOMElement|null $parent
* @param \Dom\Element|null $parent
*/
public function toXML(?DOMElement $parent = null): DOMElement
public function toXML(?Dom\Element $parent = null): Dom\Element
{
$e = parent::toXML($parent);

Expand Down
10 changes: 5 additions & 5 deletions src/XML/wsse/AbstractReferenceType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SimpleSAML\WebServices\Security\XML\wsse;

use DOMElement;
use Dom;
use SimpleSAML\WebServices\Security\Assert\Assert;
use SimpleSAML\XML\ExtendableAttributesTrait;
use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException;
Expand Down Expand Up @@ -62,12 +62,12 @@ public function getURI(): ?AnyURIValue
/**
* Create an instance of this object from its XML representation.
*
* @param \DOMElement $xml
* @param \Dom\Element $xml
*
* @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);
Expand All @@ -83,9 +83,9 @@ public static function fromXML(DOMElement $xml): static
/**
* Add this username token to an XML element.
*
* @param \DOMElement|null $parent The element we should append this username token to.
* @param \Dom\Element|null $parent The element we should append this username token to.
*/
public function toXML(?DOMElement $parent = null): DOMElement
public function toXML(?Dom\Element $parent = null): Dom\Element
{
$e = parent::instantiateParentElement($parent);

Expand Down
10 changes: 5 additions & 5 deletions src/XML/wsse/AbstractSecurityHeaderType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SimpleSAML\WebServices\Security\XML\wsse;

use DOMElement;
use Dom;
use SimpleSAML\WebServices\Security\Assert\Assert;
use SimpleSAML\XML\ExtendableAttributesTrait;
use SimpleSAML\XML\ExtendableElementTrait;
Expand Down Expand Up @@ -57,12 +57,12 @@ public function isEmptyElement(): bool
/**
* Create an instance of this object from its XML representation.
*
* @param \DOMElement $xml
* @param \Dom\Element $xml
*
* @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);
Expand All @@ -77,9 +77,9 @@ public static function fromXML(DOMElement $xml): static
/**
* Add this SecurityHeaderType token to an XML element.
*
* @param \DOMElement|null $parent The element we should append this username token to.
* @param \Dom\Element|null $parent The element we should append this username token to.
*/
public function toXML(?DOMElement $parent = null): DOMElement
public function toXML(?Dom\Element $parent = null): Dom\Element
{
$e = parent::instantiateParentElement($parent);

Expand Down
10 changes: 5 additions & 5 deletions src/XML/wsse/AbstractSecurityTokenReferenceType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SimpleSAML\WebServices\Security\XML\wsse;

use DOMElement;
use Dom;
use SimpleSAML\WebServices\Security\Assert\Assert;
use SimpleSAML\WebServices\Security\Constants as C;
use SimpleSAML\WebServices\Security\Type\IDValue;
Expand Down Expand Up @@ -77,11 +77,11 @@ public function isEmptyElement(): bool
/**
* Create an instance of this object from its XML representation.
*
* @param \DOMElement $xml
* @param \Dom\Element $xml
* @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);
Expand All @@ -108,9 +108,9 @@ public static function fromXML(DOMElement $xml): static
/**
* Add this SecurityTokenReferenceType token to an XML element.
*
* @param \DOMElement|null $parent The element we should append this username token to.
* @param \Dom\Element|null $parent The element we should append this username token to.
*/
public function toXML(?DOMElement $parent = null): DOMElement
public function toXML(?Dom\Element $parent = null): Dom\Element
{
$e = parent::instantiateParentElement($parent);

Expand Down
10 changes: 5 additions & 5 deletions src/XML/wsse/AbstractTransformationParametersType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SimpleSAML\WebServices\Security\XML\wsse;

use DOMElement;
use Dom;
use SimpleSAML\WebServices\Security\Assert\Assert;
use SimpleSAML\XML\ExtendableAttributesTrait;
use SimpleSAML\XML\ExtendableElementTrait;
Expand Down Expand Up @@ -56,12 +56,12 @@ public function isEmptyElement(): bool
/**
* Create an instance of this object from its XML representation.
*
* @param \DOMElement $xml
* @param \Dom\Element $xml
*
* @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);
Expand All @@ -76,9 +76,9 @@ public static function fromXML(DOMElement $xml): static
/**
* Add this username token to an XML element.
*
* @param \DOMElement|null $parent The element we should append this username token to.
* @param \Dom\Element|null $parent The element we should append this username token to.
*/
public function toXML(?DOMElement $parent = null): DOMElement
public function toXML(?Dom\Element $parent = null): Dom\Element
{
$e = parent::instantiateParentElement($parent);

Expand Down
Loading
Loading