Skip to content

Commit aa576cb

Browse files
authored
chore: update dependency version constraints (#82)
* chore: update dependency version constraints * fix: compatibility with brick/math 0.15+, PHPUnit 13 and ECS 13 - Replace testBit() with shiftedRight()->isOdd() for brick/math 0.15+ compat - Add non-empty-string assertions for BigInteger::fromBytes() - Fix implode() array type for PHPStan strict checks - Replace assertContainsOnly() with assertIsString() for PHPUnit 13 - Apply ECS coding standards fixes * fix: use fixed reference dates for certificate validation tests Test certificates expired on 2026-01-02. Use a fixed reference date (2025-01-01) within their validity period instead of current time. * feat: integrate PSR-20 ClockInterface for time abstraction - Add psr/clock as a required dependency - Accept optional ClockInterface in PathValidationConfig::defaultConfig() - Accept optional ClockInterface in ACValidationConfig::create() - Add FrozenClock test helper for deterministic time in tests - Use FrozenClock in tests instead of withDateTime()/withEvaluationTime()
1 parent f0e9a54 commit aa576cb

112 files changed

Lines changed: 269 additions & 204 deletions

File tree

Some content is hidden

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

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,14 @@
5151
"require": {
5252
"php": ">=8.1",
5353
"ext-mbstring": "*",
54-
"brick/math": "^0.10|^0.11|^0.12|^0.13|^0.14"
54+
"brick/math": "^0.10|^0.11|^0.12|^0.13|^0.14|^0.15|^0.16|^0.17",
55+
"psr/clock": "^1.0"
5556
},
5657
"require-dev": {
5758
"ext-gmp": "*",
5859
"ext-openssl": "*",
5960
"ekino/phpstan-banned-code": "^1.0|^2.0|^3.0",
60-
"infection/infection": "^0.28|^0.29|^0.31",
61+
"infection/infection": "^0.28|^0.29|^0.31|^0.32",
6162
"php-parallel-lint/php-parallel-lint": "^1.3",
6263
"phpstan/extension-installer": "^1.3|^2.0",
6364
"phpstan/phpstan": "^1.8|^2.0",
@@ -68,8 +69,8 @@
6869
"roave/security-advisories": "dev-latest",
6970
"symfony/string": "^6.4|^7.0|^8.0",
7071
"symfony/var-dumper": "^6.4|^7.0|^8.0",
71-
"symplify/easy-coding-standard": "^12.0",
72-
"phpunit/phpunit": "^10.1|^11.0|^12.0"
72+
"symplify/easy-coding-standard": "^12.0|^13.0",
73+
"phpunit/phpunit": "^10.1|^11.0|^12.0|^13.0"
7374
},
7475
"suggest": {
7576
"ext-openssl": "For OpenSSL based cyphering",
@@ -91,6 +92,5 @@
9192
"infection/extension-installer": true,
9293
"phpstan/extension-installer": true
9394
}
94-
},
95-
"minimum-stability": "dev"
95+
}
9696
}

src/ASN1/Component/Identifier.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
namespace SpomkyLabs\Pki\ASN1\Component;
66

7+
use function array_key_exists;
78
use Brick\Math\BigInteger;
9+
use function mb_strlen;
10+
use function ord;
811
use SpomkyLabs\Pki\ASN1\Exception\DecodeException;
912
use SpomkyLabs\Pki\ASN1\Feature\Encodable;
1013
use SpomkyLabs\Pki\ASN1\Util\BigInt;
11-
use function array_key_exists;
12-
use function mb_strlen;
13-
use function ord;
1414

1515
/**
1616
* Class to represent BER/DER identifier octets.

src/ASN1/Component/Length.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
namespace SpomkyLabs\Pki\ASN1\Component;
66

77
use Brick\Math\BigInteger;
8+
use function count;
89
use DomainException;
910
use LogicException;
11+
use function mb_strlen;
12+
use function ord;
1013
use SpomkyLabs\Pki\ASN1\Exception\DecodeException;
1114
use SpomkyLabs\Pki\ASN1\Feature\Encodable;
1215
use SpomkyLabs\Pki\ASN1\Util\BigInt;
13-
use function count;
14-
use function mb_strlen;
15-
use function ord;
1616
use function sprintf;
1717

1818
/**

src/ASN1/DERData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
namespace SpomkyLabs\Pki\ASN1;
66

77
use BadMethodCallException;
8+
use function mb_strlen;
89
use SpomkyLabs\Pki\ASN1\Component\Identifier;
910
use SpomkyLabs\Pki\ASN1\Component\Length;
1011
use SpomkyLabs\Pki\ASN1\Feature\ElementBase;
11-
use function mb_strlen;
1212

1313
/**
1414
* Container for raw DER encoded data.

src/ASN1/Element.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
namespace SpomkyLabs\Pki\ASN1;
66

7+
use function array_key_exists;
8+
use function mb_strlen;
79
use SpomkyLabs\Pki\ASN1\Component\Identifier;
810
use SpomkyLabs\Pki\ASN1\Component\Length;
911
use SpomkyLabs\Pki\ASN1\Feature\ElementBase;
@@ -43,10 +45,8 @@
4345
use SpomkyLabs\Pki\ASN1\Type\TaggedType;
4446
use SpomkyLabs\Pki\ASN1\Type\TimeType;
4547
use SpomkyLabs\Pki\ASN1\Type\UnspecifiedType;
46-
use UnexpectedValueException;
47-
use function array_key_exists;
48-
use function mb_strlen;
4948
use function sprintf;
49+
use UnexpectedValueException;
5050

5151
/**
5252
* Base class for all ASN.1 type elements.

src/ASN1/Type/BaseString.php

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

77
use InvalidArgumentException;
88
use SpomkyLabs\Pki\ASN1\Element;
9-
use Stringable;
109
use function sprintf;
10+
use Stringable;
1111

1212
/**
1313
* Base class for all string types.

src/ASN1/Type/Constructed/ConstructedString.php

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

55
namespace SpomkyLabs\Pki\ASN1\Type\Constructed;
66

7+
use function count;
78
use LogicException;
89
use SpomkyLabs\Pki\ASN1\Component\Identifier;
910
use SpomkyLabs\Pki\ASN1\Component\Length;
@@ -12,7 +13,6 @@
1213
use SpomkyLabs\Pki\ASN1\Type\StringType;
1314
use SpomkyLabs\Pki\ASN1\Type\Structure;
1415
use Stringable;
15-
use function count;
1616

1717
/**
1818
* Implements constructed type of simple strings.

src/ASN1/Type/Primitive/BMPString.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
namespace SpomkyLabs\Pki\ASN1\Type\Primitive;
66

7+
use function mb_strlen;
78
use SpomkyLabs\Pki\ASN1\Type\PrimitiveString;
89
use SpomkyLabs\Pki\ASN1\Type\UniversalClass;
9-
use function mb_strlen;
1010

1111
/**
1212
* Implements *BMPString* type.

src/ASN1/Type/Primitive/BitString.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
namespace SpomkyLabs\Pki\ASN1\Type\Primitive;
66

77
use Brick\Math\BigInteger;
8+
use function chr;
9+
use function mb_strlen;
10+
use function ord;
811
use OutOfBoundsException;
912
use SpomkyLabs\Pki\ASN1\Component\Identifier;
1013
use SpomkyLabs\Pki\ASN1\Component\Length;
@@ -13,9 +16,6 @@
1316
use SpomkyLabs\Pki\ASN1\Type\BaseString;
1417
use SpomkyLabs\Pki\ASN1\Type\PrimitiveType;
1518
use SpomkyLabs\Pki\ASN1\Type\UniversalClass;
16-
use function chr;
17-
use function mb_strlen;
18-
use function ord;
1919

2020
/**
2121
* Implements *BIT STRING* type.

src/ASN1/Type/Primitive/Boolean.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
namespace SpomkyLabs\Pki\ASN1\Type\Primitive;
66

7+
use function chr;
8+
use function ord;
79
use SpomkyLabs\Pki\ASN1\Component\Identifier;
810
use SpomkyLabs\Pki\ASN1\Component\Length;
911
use SpomkyLabs\Pki\ASN1\Element;
1012
use SpomkyLabs\Pki\ASN1\Exception\DecodeException;
1113
use SpomkyLabs\Pki\ASN1\Feature\ElementBase;
1214
use SpomkyLabs\Pki\ASN1\Type\PrimitiveType;
1315
use SpomkyLabs\Pki\ASN1\Type\UniversalClass;
14-
use function chr;
15-
use function ord;
1616

1717
/**
1818
* Implements *BOOLEAN* type.

0 commit comments

Comments
 (0)