Skip to content

Commit 458f359

Browse files
committed
WIP: Migrate to xsd-types
1 parent 7f2d386 commit 458f359

File tree

232 files changed

+803
-808
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

232 files changed

+803
-808
lines changed

phpstan-baseline.neon

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,6 @@ parameters:
9090
count: 2
9191
path: src/Certificate/PrivateKeyLoader.php
9292

93-
-
94-
message: "#^PHPDoc tag @param for parameter \\$qName with type SimpleSAML\\\\XML\\\\Type\\\\QNameValue\\|null is not subtype of native type SimpleSAML\\\\XML\\\\Type\\\\QNameValue\\.$#"
95-
count: 1
96-
path: src/Compat/AbstractContainer.php
97-
9893
-
9994
message: "#^Call to method getArray\\(\\) on an unknown class SimpleSAML\\\\Configuration\\.$#"
10095
count: 1
@@ -261,7 +256,7 @@ parameters:
261256
path: src/XML/mdui/Keywords.php
262257

263258
-
264-
message: "#^Call to an undefined method SimpleSAML\\\\XML\\\\Type\\\\ValueTypeInterface\\:\\:toArray\\(\\)\\.$#"
259+
message: "#^Call to an undefined method SimpleSAML\\\\XMLSchema\\\\Type\\\\Interface\\\\ValueTypeInterface\\:\\:toArray\\(\\)\\.$#"
265260
count: 1
266261
path: src/XML/mdui/Keywords.php
267262

src/Assert/SAMLStringTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
use SimpleSAML\Assert\AssertionFailedException;
88
use SimpleSAML\SAML2\Exception\ProtocolViolationException;
9-
use SimpleSAML\XML\Exception\SchemaViolationException;
9+
use SimpleSAML\XMLSchema\Exception\SchemaViolationException;
1010

1111
/**
1212
* @package simplesamlphp/saml2

src/Binding/SOAP.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
use SimpleSAML\SAML2\XML\samlp\AbstractMessage;
1616
use SimpleSAML\SAML2\XML\samlp\MessageFactory;
1717
use SimpleSAML\SAML2\XML\samlp\Response as SAML2_Response;
18-
use SimpleSAML\SOAP\Utils\XPath;
19-
use SimpleSAML\SOAP\XML\env_200106\{Body, Envelope, Header};
18+
use SimpleSAML\SOAP11\Type\MustUnderstandValue;
19+
use SimpleSAML\SOAP11\Utils\XPath;
20+
use SimpleSAML\SOAP11\XML\{Body, Envelope, Header};
2021
use SimpleSAML\XML\DOMDocumentFactory;
21-
use SimpleSAML\XML\Type\BooleanValue;
2222

2323
use function file_get_contents;
2424

@@ -43,7 +43,7 @@ public function getOutputToSend(AbstractMessage $message)
4343
// profile, this is the Response itself.
4444
if ($message instanceof SAML2_Response) {
4545
$requestAuthenticated = new RequestAuthenticated(
46-
BooleanValue::fromBoolean(true),
46+
MustUnderstandValue::fromBoolean(true),
4747
);
4848

4949
$destination = $this->destination ?: $message->getDestination()?->getValue();

src/Compat/AbstractContainer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use SimpleSAML\SAML2\Assert\Assert;
1010
use SimpleSAML\SAML2\XML\ExtensionPointInterface;
1111
use SimpleSAML\XML\{AbstractElement, ElementInterface};
12-
use SimpleSAML\XML\Type\QNameValue;
12+
use SimpleSAML\XMLSchema\Type\QNameValue;
1313
use SimpleSAML\XMLSecurity\Alg\Encryption\EncryptionAlgorithmFactory;
1414
use SimpleSAML\XMLSecurity\Alg\KeyTransport\KeyTransportAlgorithmFactory;
1515
use SimpleSAML\XMLSecurity\Alg\Signature\SignatureAlgorithmFactory;
@@ -79,7 +79,7 @@ public function registerExtensionHandler(string $class): void
7979
* Such classes must have been registered previously by calling registerExtensionHandler(), and they must
8080
* extend \SimpleSAML\XML\AbstractElement.
8181
*
82-
* @param \SimpleSAML\XML\Type\QNameValue|null $qName The qualified name of the element.
82+
* @param \SimpleSAML\XMLSchema\Type\QNameValue $qName The qualified name of the element.
8383
*
8484
* @return string|null The fully-qualified name of a class extending \SimpleSAML\XML\AbstractElement and
8585
* implementing support for the given element, or null if no such class has been registered before.
@@ -103,7 +103,7 @@ public function getElementHandler(QNameValue $qName): ?string
103103
* Such classes must have been registered previously by calling registerExtensionHandler(), and they must
104104
* implement \SimpleSAML\SAML11\XML\saml\ExtensionPointInterface.
105105
*
106-
* @param \SimpleSAML\XML\Type\QNameValue $qName The qualified name of the extension.
106+
* @param \SimpleSAML\XMLSchema\Type\QNameValue $qName The qualified name of the extension.
107107
* @return string|null The fully-qualified name of a class implementing
108108
* \SimpleSAML\SAML11\XML\saml\ExtensionPointInterface or null if no such class has been registered before.
109109
* @psalm-return class-string|null

src/SOAPClient.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@
1010
use SimpleSAML\SAML2\Compat\ContainerSingleton;
1111
use SimpleSAML\SAML2\XML\samlp\AbstractMessage;
1212
use SimpleSAML\SAML2\XML\samlp\MessageFactory;
13-
use SimpleSAML\SOAP\Utils\XPath;
14-
use SimpleSAML\SOAP\XML\env_200106\Body;
15-
use SimpleSAML\SOAP\XML\env_200106\Envelope;
16-
use SimpleSAML\SOAP\XML\env_200106\Fault;
13+
use SimpleSAML\SOAP11\Utils\XPath;
14+
use SimpleSAML\SOAP11\XML\{Body, Envelope, Fault};
1715
use SimpleSAML\Utils\Config;
1816
use SimpleSAML\Utils\Crypto;
1917
use SimpleSAML\XML\Chunk;
@@ -255,7 +253,7 @@ public static function validateSSL(string $data, XMLSecurityKey $key): void
255253
* Extracts the SOAP Fault from SOAP message
256254
*
257255
* @param \DOMDocument $soapMessage Soap response needs to be type DOMDocument
258-
* @return \SimpleSAML\SOAP\XML\env_200106\Fault|null
256+
* @return \SimpleSAML\SOAP11\XML\Fault|null
259257
*/
260258
private function getSOAPFault(DOMDocument $soapMessage): ?Fault
261259
{

src/Type/AnyURIListValue.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
use SimpleSAML\SAML2\Assert\Assert;
88
use SimpleSAML\SAML2\Constants as C;
99
use SimpleSAML\SAML2\Type\SAMLAnyURIValue;
10-
use SimpleSAML\XML\Exception\SchemaViolationException;
11-
use SimpleSAML\XML\Type\ListTypeInterface;
10+
use SimpleSAML\XMLSchema\Exception\SchemaViolationException;
11+
use SimpleSAML\XMLSchema\Type\Interface\ListTypeInterface;
1212

1313
use function array_map;
1414
use function preg_split;
@@ -28,7 +28,7 @@ class AnyURIListValue extends SAMLAnyURIValue implements ListTypeInterface
2828
* Validate the value.
2929
*
3030
* @param string $value
31-
* @throws \SimpleSAML\XML\Exception\SchemaViolationException on failure
31+
* @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure
3232
* @return void
3333
*/
3434
protected function validateValue(string $value): void

src/Type/AuthnContextComparisonTypeValue.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
use SimpleSAML\Assert\Assert;
88
use SimpleSAML\SAML2\XML\samlp\AuthnContextComparisonTypeEnum;
9-
use SimpleSAML\XML\Exception\SchemaViolationException;
10-
use SimpleSAML\XML\Type\StringValue;
9+
use SimpleSAML\XMLSchema\Exception\SchemaViolationException;
10+
use SimpleSAML\XMLSchema\Type\StringValue;
1111

1212
use function array_column;
1313

src/Type/DecisionTypeValue.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
use SimpleSAML\Assert\Assert;
88
use SimpleSAML\SAML2\XML\saml\DecisionTypeEnum;
9-
use SimpleSAML\XML\Exception\SchemaViolationException;
10-
use SimpleSAML\XML\Type\StringValue;
9+
use SimpleSAML\XMLSchema\Exception\SchemaViolationException;
10+
use SimpleSAML\XMLSchema\Type\StringValue;
1111

1212
use function array_column;
1313

src/Type/KeyTypesValue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
use SimpleSAML\SAML2\Assert\Assert;
88
use SimpleSAML\SAML2\XML\md\KeyTypesEnum;
9-
use SimpleSAML\XML\Exception\SchemaViolationException;
9+
use SimpleSAML\XMLSchema\Exception\SchemaViolationException;
1010

1111
use function array_column;
1212

src/Type/ListOfStringsValue.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
use SimpleSAML\SAML2\Assert\Assert;
88
use SimpleSAML\SAML2\Constants as C;
99
use SimpleSAML\SAML2\Exception\ProtocolViolationException;
10-
use SimpleSAML\XML\Exception\SchemaViolationException;
11-
use SimpleSAML\XML\Type\ListTypeInterface;
10+
use SimpleSAML\XMLSchema\Exception\SchemaViolationException;
11+
use SimpleSAML\XMLSchema\Type\Interface\ListTypeInterface;
1212

1313
use function array_map;
1414
use function preg_split;
@@ -34,7 +34,7 @@ class ListOfStringsValue extends SAMLStringValue implements ListTypeInterface
3434
* Validate the value.
3535
*
3636
* @param string $value
37-
* @throws \SimpleSAML\XML\Exception\SchemaViolationException on failure
37+
* @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure
3838
* @return void
3939
*/
4040
protected function validateValue(string $value): void

0 commit comments

Comments
 (0)