Skip to content

Commit 2bb2956

Browse files
committed
max_age parameter marked as deprecated + CS fix
1 parent 4a439a1 commit 2bb2956

File tree

24 files changed

+5
-90
lines changed

24 files changed

+5
-90
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.phpunit.result.cache
12
.travis/phar-private.pem
23
jose.phar
34
jose.phar.pubkey

src/Bundle/JoseFramework/DependencyInjection/Configuration.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public function getConfigTreeBuilder()
4444
{
4545
$treeBuilder = new TreeBuilder();
4646
$rootNode = $treeBuilder->root($this->alias);
47+
$rootNode->setDeprecated('The child node "%node%" at path "%path%" is deprecated and will be removed on v2.x. It has no effect anymore. Please refer to https://github.com/symfony/symfony/pull/25699');
4748

4849
foreach ($this->sources as $source) {
4950
$source->getNodeDefinition($rootNode);

src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKUriSource.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public function getNodeDefinition(NodeDefinition $node)
6666
->integerNode('max_age')
6767
->info('When share, this value indicates how many seconds the HTTP client should keep the key in cache. Default is 21600 = 6 hours.')
6868
->defaultValue(21600)
69+
->setDeprecated()
6970
->end()
7071
->arrayNode('tags')
7172
->info('A list of tags to be associated to the service.')

src/Bundle/JoseFramework/Tests/TestBundle/DependencyInjection/TestExtension.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ public function prepend(ContainerBuilder $container)
4444
ConfigurationHelper::addKeyUri($container, 'jwkset2', [
4545
'id' => 'jose.key_set.jwkset2',
4646
'path' => '/2.jwkset',
47-
'max_age' => 3600,
4847
]);
4948
ConfigurationHelper::addClaimChecker($container, 'checker2', ['exp', 'iat', 'nbf', 'custom_checker'], true);
5049
ConfigurationHelper::addHeaderChecker($container, 'checker2', ['custom_checker'], true);

src/Bundle/JoseFramework/Tests/config/config_test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ jose:
161161
jwkset1:
162162
id: 'jose.key_set.jwkset1'
163163
path: '/1.jwkset'
164-
max_age: 100
165164

166165
httplug:
167166
profiling: false

src/Component/Checker/Tests/Stub/OtherToken.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ class OtherToken implements JWT
3434

3535
/**
3636
* Token constructor.
37-
*
38-
* @param null|string $payload
3937
*/
4038
private function __construct(?string $payload, array $protectedHeader, array $unprotectedHeader)
4139
{
@@ -44,9 +42,6 @@ private function __construct(?string $payload, array $protectedHeader, array $un
4442
$this->unprotectedHeader = $unprotectedHeader;
4543
}
4644

47-
/**
48-
* @param null|string $payload
49-
*/
5045
public static function create(?string $payload, array $protectedHeader = [], array $unprotectedHeader = []): self
5146
{
5247
return new self($payload, $protectedHeader, $unprotectedHeader);

src/Component/Checker/Tests/Stub/Token.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ class Token implements JWT
3434

3535
/**
3636
* Token constructor.
37-
*
38-
* @param null|string $payload
3937
*/
4038
private function __construct(?string $payload, array $protectedHeader, array $unprotectedHeader)
4139
{
@@ -45,8 +43,6 @@ private function __construct(?string $payload, array $protectedHeader, array $un
4543
}
4644

4745
/**
48-
* @param null|string $payload
49-
*
5046
* @return Token
5147
*/
5248
public static function create(?string $payload, array $protectedHeader = [], array $unprotectedHeader = []): self

src/Component/Console/JKULoaderCommand.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ final class JKULoaderCommand extends ObjectOutputCommand
2828

2929
/**
3030
* JKULoaderCommand constructor.
31-
*
32-
* @param null|string $name
3331
*/
3432
public function __construct(JKUFactory $jkuFactory, JsonConverter $jsonConverter, ?string $name = null)
3533
{

src/Component/Console/X5ULoaderCommand.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ final class X5ULoaderCommand extends ObjectOutputCommand
2828

2929
/**
3030
* X5ULoaderCommand constructor.
31-
*
32-
* @param null|string $name
3331
*/
3432
public function __construct(X5UFactory $x5uFactory, JsonConverter $jsonConverter, ?string $name = null)
3533
{

src/Component/Core/JWKSet.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,6 @@ private function canKeyBeUsedFor(string $type, JWK $key)
245245
}
246246

247247
/**
248-
* @param null|Algorithm $algorithm
249-
*
250248
* @return bool|int
251249
*/
252250
private function canKeyBeUsedWithAlgorithm(?Algorithm $algorithm, JWK $key)

0 commit comments

Comments
 (0)