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
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
"ext-spl": "*",

"simplesamlphp/assert": "~2.0",
"simplesamlphp/xml-common": "~2.8",
"simplesamlphp/xml-security": "~2.3",
"simplesamlphp/xml-ws-addressing": "~1.3",
"simplesamlphp/xml-ws-policy": "~1.3",
"simplesamlphp/xml-wss-core": "~1.4"
"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-policy": "dev-feature/dom-migration-php84",
"simplesamlphp/xml-wss-core": "dev-feature/dom-migration-php84"
},
"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\Trust\Utils;

use DOMNode;
use DOMXPath;
use Dom;
use SimpleSAML\WebServices\Trust\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-Trust elements.
* Get a Dom\XPath object that can be used to search for WS-Trust elements.
*
* @param \DOMNode $node The document to associate to the DOMXPath object.
* @param \Dom\Node $node The document to associate to the DOMXPath 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
6 changes: 3 additions & 3 deletions src/XML/wst_200502/AbstractAuthenticatorType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SimpleSAML\WebServices\Trust\XML\wst_200502;

use DOMElement;
use Dom;
use SimpleSAML\WebServices\Trust\Assert\Assert;
use SimpleSAML\XML\ExtendableElementTrait;
use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException;
Expand Down Expand Up @@ -65,7 +65,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);
Expand All @@ -82,7 +82,7 @@ public static function fromXML(DOMElement $xml): static
/**
* Add this AuthenticatorType to an XML element.
*/
public function toXML(?DOMElement $parent = null): DOMElement
public function toXML(?Dom\Element $parent = null): Dom\Element
{
$e = parent::instantiateParentElement($parent);

Expand Down
6 changes: 3 additions & 3 deletions src/XML/wst_200502/AbstractBinaryExchangeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SimpleSAML\WebServices\Trust\XML\wst_200502;

use DOMElement;
use Dom;
use SimpleSAML\WebServices\Trust\Assert\Assert;
use SimpleSAML\XML\ExtendableAttributesTrait;
use SimpleSAML\XML\TypedTextContentTrait;
Expand Down Expand Up @@ -75,7 +75,7 @@ public function getEncodingType(): 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);
Expand All @@ -92,7 +92,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();
Expand Down
9 changes: 3 additions & 6 deletions src/XML/wst_200502/AbstractBinarySecretType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SimpleSAML\WebServices\Trust\XML\wst_200502;

use DOMElement;
use Dom;
use SimpleSAML\WebServices\Trust\Assert\Assert;
use SimpleSAML\XML\ExtendableAttributesTrait;
use SimpleSAML\XML\TypedTextContentTrait;
Expand Down Expand Up @@ -61,7 +61,7 @@ public function getType(): ?AnyURIListValue
* @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,11 +76,8 @@ public static function fromXML(DOMElement $xml): static

/**
* Convert this element to XML.
*
* @param \DOMElement|null $parent The element we should append this element to.
* @return \DOMElement
*/
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
12 changes: 3 additions & 9 deletions src/XML/wst_200502/AbstractCancelTargetType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SimpleSAML\WebServices\Trust\XML\wst_200502;

use DOMElement;
use Dom;
use SimpleSAML\WebServices\Trust\Assert\Assert;
use SimpleSAML\XML\ExtendableElementTrait;
use SimpleSAML\XML\SerializableElementInterface;
Expand Down Expand Up @@ -42,13 +42,10 @@ final public function __construct(
/**
* Create an instance of this object from its XML representation.
*
* @param \DOMElement $xml
* @return static
*
* @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 @@ -65,11 +62,8 @@ public static function fromXML(DOMElement $xml): static

/**
* Add this CancelTargetType to an XML element.
*
* @param \DOMElement|null $parent The element we should append this username token to.
* @return \DOMElement
*/
public function toXML(?DOMElement $parent = null): DOMElement
public function toXML(?Dom\Element $parent = null): Dom\Element
{
$e = parent::instantiateParentElement($parent);

Expand Down
9 changes: 3 additions & 6 deletions src/XML/wst_200502/AbstractClaimsType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SimpleSAML\WebServices\Trust\XML\wst_200502;

use DOMElement;
use Dom;
use SimpleSAML\WebServices\Trust\Assert\Assert;
use SimpleSAML\XML\ExtendableAttributesTrait;
use SimpleSAML\XML\ExtendableElementTrait;
Expand Down Expand Up @@ -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);
Expand All @@ -88,11 +88,8 @@ public static function fromXML(DOMElement $xml): static

/**
* Add this ClaimsType to an XML element.
*
* @param \DOMElement|null $parent The element we should append this element to.
* @return \DOMElement
*/
public function toXML(?DOMElement $parent = null): DOMElement
public function toXML(?Dom\Element $parent = null): Dom\Element
{
$e = parent::instantiateParentElement($parent);

Expand Down
6 changes: 3 additions & 3 deletions src/XML/wst_200502/AbstractDelegateToType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SimpleSAML\WebServices\Trust\XML\wst_200502;

use DOMElement;
use Dom;
use SimpleSAML\WebServices\Trust\Assert\Assert;
use SimpleSAML\XML\ExtendableElementTrait;
use SimpleSAML\XML\SerializableElementInterface;
Expand Down Expand Up @@ -45,7 +45,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);
Expand All @@ -63,7 +63,7 @@ public static function fromXML(DOMElement $xml): static
/**
* Add this DelegateToType to an XML element.
*/
public function toXML(?DOMElement $parent = null): DOMElement
public function toXML(?Dom\Element $parent = null): Dom\Element
{
$e = parent::instantiateParentElement($parent);

Expand Down
12 changes: 3 additions & 9 deletions src/XML/wst_200502/AbstractEncryptionType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SimpleSAML\WebServices\Trust\XML\wst_200502;

use DOMElement;
use Dom;
use SimpleSAML\WebServices\Trust\Assert\Assert;
use SimpleSAML\XML\ExtendableElementTrait;
use SimpleSAML\XML\SerializableElementInterface;
Expand Down Expand Up @@ -42,13 +42,10 @@ final public function __construct(
/**
* Create an instance of this object from its XML representation.
*
* @param \DOMElement $xml
* @return static
*
* @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 @@ -65,11 +62,8 @@ public static function fromXML(DOMElement $xml): static

/**
* Add this EncryptionType to an XML element.
*
* @param \DOMElement|null $parent The element we should append this username token to.
* @return \DOMElement
*/
public function toXML(?DOMElement $parent = null): DOMElement
public function toXML(?Dom\Element $parent = null): Dom\Element
{
$e = parent::instantiateParentElement($parent);

Expand Down
6 changes: 3 additions & 3 deletions src/XML/wst_200502/AbstractEntropyType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SimpleSAML\WebServices\Trust\XML\wst_200502;

use DOMElement;
use Dom;
use SimpleSAML\WebServices\Trust\Assert\Assert;
use SimpleSAML\XML\ExtendableAttributesTrait;
use SimpleSAML\XML\ExtendableElementTrait;
Expand Down Expand Up @@ -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);
Expand All @@ -75,7 +75,7 @@ public static function fromXML(DOMElement $xml): static
/**
* Add this EntropyType to an XML element.
*/
public function toXML(?DOMElement $parent = null): DOMElement
public function toXML(?Dom\Element $parent = null): Dom\Element
{
$e = parent::instantiateParentElement($parent);

Expand Down
6 changes: 3 additions & 3 deletions src/XML/wst_200502/AbstractKeyExchangeTokenType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SimpleSAML\WebServices\Trust\XML\wst_200502;

use DOMElement;
use Dom;
use SimpleSAML\WebServices\Trust\Assert\Assert;
use SimpleSAML\XML\ExtendableElementTrait;
use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException;
Expand Down Expand Up @@ -53,7 +53,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);
Expand All @@ -67,7 +67,7 @@ public static function fromXML(DOMElement $xml): static
/**
* Add this KeyExchangeTokenType to an XML element.
*/
public function toXML(?DOMElement $parent = null): DOMElement
public function toXML(?Dom\Element $parent = null): Dom\Element
{
$e = parent::instantiateParentElement($parent);

Expand Down
6 changes: 3 additions & 3 deletions src/XML/wst_200502/AbstractLifetimeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SimpleSAML\WebServices\Trust\XML\wst_200502;

use DOMElement;
use Dom;
use SimpleSAML\WebServices\Security\XML\wsu\Created;
use SimpleSAML\WebServices\Security\XML\wsu\Expires;
use SimpleSAML\WebServices\Trust\Assert\Assert;
Expand Down Expand Up @@ -65,7 +65,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);
Expand All @@ -87,7 +87,7 @@ public static function fromXML(DOMElement $xml): static
/**
* Add this LifetimeType to an XML element.
*/
public function toXML(?DOMElement $parent = null): DOMElement
public function toXML(?Dom\Element $parent = null): Dom\Element
{
$e = parent::instantiateParentElement($parent);

Expand Down
6 changes: 3 additions & 3 deletions src/XML/wst_200502/AbstractOnBehalfOfType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SimpleSAML\WebServices\Trust\XML\wst_200502;

use DOMElement;
use Dom;
use SimpleSAML\WebServices\Trust\Assert\Assert;
use SimpleSAML\XML\ExtendableElementTrait;
use SimpleSAML\XML\SerializableElementInterface;
Expand Down Expand Up @@ -45,7 +45,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);
Expand All @@ -63,7 +63,7 @@ public static function fromXML(DOMElement $xml): static
/**
* Add this OnBehalfOfType to an XML element.
*/
public function toXML(?DOMElement $parent = null): DOMElement
public function toXML(?Dom\Element $parent = null): Dom\Element
{
$e = parent::instantiateParentElement($parent);

Expand Down
Loading
Loading