Skip to content

Commit f6ab890

Browse files
committed
Revert unjust const>enum convertion
1 parent 5be0f8a commit f6ab890

32 files changed

+58
-46
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
"ext-pcre": "*",
4444
"ext-spl": "*",
4545

46-
"simplesamlphp/assert": "~1.8.1",
47-
"simplesamlphp/xml-common": "~2.0.1"
46+
"simplesamlphp/assert": "~1.9.0",
47+
"simplesamlphp/xml-common": "~2.0.2"
4848
},
4949
"require-dev": {
50-
"simplesamlphp/simplesamlphp-test-framework": "~1.9.2"
50+
"simplesamlphp/simplesamlphp-test-framework": "~1.10.2"
5151
},
5252
"config": {
5353
"allow-plugins": {

src/TestUtils/SignedElementTestTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* you are testing to the $testedClass property.
3030
*
3131
* @package simplesamlphp/xml-security
32+
* @phpstan-ignore trait.unused
3233
*/
3334
trait SignedElementTestTrait
3435
{

src/XML/EncryptableElementTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* Trait aggregating functionality for elements that can be encrypted.
1818
*
1919
* @package simplesamlphp/xml-security
20+
* @phpstan-ignore trait.unused
2021
*/
2122
trait EncryptableElementTrait
2223
{

src/XML/EncryptedElementTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* Trait aggregating functionality for encrypted elements.
2727
*
2828
* @package simplesamlphp/xml-security
29+
* @phpstan-ignore trait.unused
2930
*/
3031
trait EncryptedElementTrait
3132
{

src/XML/SignableElementTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
* Trait SignableElementTrait
3636
*
3737
* @package simplesamlphp/xml-security
38+
* @phpstan-ignore trait.unused
3839
*/
3940
trait SignableElementTrait
4041
{

src/XML/SignedElementTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
* Helper trait for processing signed elements.
4141
*
4242
* @package simplesamlphp/xml-security
43+
* @phpstan-ignore trait.unused
4344
*/
4445
trait SignedElementTrait
4546
{

src/XML/ds/AbstractKeyInfoType.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use SimpleSAML\XML\SerializableElementInterface;
1010
use SimpleSAML\XMLSchema\Exception\SchemaViolationException;
1111
use SimpleSAML\XMLSchema\Type\IDValue;
12-
use SimpleSAML\XMLSchema\XML\Enumeration\NamespaceEnum;
12+
use SimpleSAML\XMLSchema\XML\Constants\NS;
1313
use SimpleSAML\XMLSecurity\Assert\Assert;
1414
use SimpleSAML\XMLSecurity\Constants as C;
1515
use SimpleSAML\XMLSecurity\Exception\InvalidArgumentException;
@@ -27,8 +27,8 @@ abstract class AbstractKeyInfoType extends AbstractDsElement
2727
{
2828
use ExtendableElementTrait;
2929

30-
/** @var \SimpleSAML\XMLSchema\XML\Enumeration\NamespaceEnum */
31-
public const XS_ANY_ELT_NAMESPACE = NamespaceEnum::Other;
30+
/** @var string */
31+
public const XS_ANY_ELT_NAMESPACE = NS::OTHER;
3232

3333

3434
/**

src/XML/ds/AbstractPGPDataType.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use SimpleSAML\XML\ExtendableElementTrait;
1010
use SimpleSAML\XML\{SchemaValidatableElementInterface, SchemaValidatableElementTrait};
1111
use SimpleSAML\XMLSchema\Exception\{InvalidDOMElementException, SchemaViolationException, TooManyElementsException};
12-
use SimpleSAML\XMLSchema\XML\Enumeration\NamespaceEnum;
12+
use SimpleSAML\XMLSchema\XML\Constants\NS;
1313
use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement;
1414

1515
use function array_pop;
@@ -24,8 +24,8 @@ abstract class AbstractPGPDataType extends AbstractDsElement implements SchemaVa
2424
use ExtendableElementTrait;
2525
use SchemaValidatableElementTrait;
2626

27-
/** @var \SimpleSAML\XMLSchema\XML\Enumeration\NamespaceEnum */
28-
public const XS_ANY_ELT_NAMESPACE = NamespaceEnum::Other;
27+
/** @var string */
28+
public const XS_ANY_ELT_NAMESPACE = NS::OTHER;
2929

3030

3131
/**

src/XML/ds/DigestMethod.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use SimpleSAML\XML\{SchemaValidatableElementInterface, SchemaValidatableElementTrait};
1111
use SimpleSAML\XMLSchema\Exception\{InvalidDOMElementException, SchemaViolationException};
1212
use SimpleSAML\XMLSchema\Type\AnyURIValue;
13-
use SimpleSAML\XMLSchema\XML\Enumeration\NamespaceEnum;
13+
use SimpleSAML\XMLSchema\XML\Constants\NS;
1414
use SimpleSAML\XMLSecurity\Constants as C;
1515
use SimpleSAML\XMLSecurity\Exception\InvalidArgumentException;
1616

@@ -27,7 +27,7 @@ final class DigestMethod extends AbstractDsElement implements SchemaValidatableE
2727
use SchemaValidatableElementTrait;
2828

2929
/** The namespace-attribute for the xs:any element */
30-
public const XS_ANY_ELT_NAMESPACE = NamespaceEnum::Other;
30+
public const XS_ANY_ELT_NAMESPACE = NS::OTHER;
3131

3232
/**
3333
* Initialize a DigestMethod element.

src/XML/ds/DsObject.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use SimpleSAML\XML\{SchemaValidatableElementInterface, SchemaValidatableElementTrait};
1010
use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException;
1111
use SimpleSAML\XMLSchema\Type\{AnyURIValue, IDValue, StringValue};
12-
use SimpleSAML\XMLSchema\XML\Enumeration\NamespaceEnum;
12+
use SimpleSAML\XMLSchema\XML\Constants\NS;
1313
use SimpleSAML\XMLSecurity\Assert\Assert;
1414

1515
use function strval;
@@ -27,8 +27,8 @@ final class DsObject extends AbstractDsElement implements SchemaValidatableEleme
2727
/** @var string */
2828
public const LOCALNAME = 'Object';
2929

30-
/** @var \SimpleSAML\XMLSchema\XML\Enumeration\NamespaceEnum */
31-
public const XS_ANY_ELT_NAMESPACE = NamespaceEnum::Any;
30+
/** @var string */
31+
public const XS_ANY_ELT_NAMESPACE = NS::ANY;
3232

3333

3434
/**

0 commit comments

Comments
 (0)