Skip to content

Commit 7761778

Browse files
authored
Merge pull request #438 from web-token/3.1.x-merge-up-into-3.2.x_y5PglacC
Merge release 3.1.7 into 3.2.x
2 parents f01e77f + 77e7502 commit 7761778

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed

rector.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@
1313
use Rector\Symfony\Set\SymfonySetList;
1414

1515
return static function (RectorConfig $config): void {
16-
$config->sets([
17-
SetList::DEAD_CODE,
18-
LevelSetList::UP_TO_PHP_81,
19-
SymfonyLevelSetList::UP_TO_SYMFONY_54,
20-
SymfonySetList::SYMFONY_CODE_QUALITY,
21-
SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION,
22-
DoctrineSetList::DOCTRINE_CODE_QUALITY,
23-
DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES,
24-
PHPUnitSetList::PHPUNIT_SPECIFIC_METHOD,
25-
PHPUnitLevelSetList::UP_TO_PHPUNIT_90,
26-
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
27-
PHPUnitSetList::PHPUNIT_EXCEPTION,
28-
PHPUnitSetList::REMOVE_MOCKS,
29-
PHPUnitSetList::PHPUNIT_YIELD_DATA_PROVIDER,
30-
]);
16+
$config->import(SetList::DEAD_CODE);
17+
$config->import(LevelSetList::UP_TO_PHP_81);
18+
$config->import(SymfonyLevelSetList::UP_TO_SYMFONY_54);
19+
$config->import(SymfonySetList::SYMFONY_CODE_QUALITY);
20+
$config->import(SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION);
21+
$config->import(SymfonySetList::SYMFONY_STRICT);
22+
$config->import(SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES);
23+
$config->import(DoctrineSetList::DOCTRINE_CODE_QUALITY);
24+
$config->import(DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES);
25+
$config->import(PHPUnitSetList::PHPUNIT_SPECIFIC_METHOD);
26+
$config->import(PHPUnitLevelSetList::UP_TO_PHPUNIT_90);
27+
$config->import(PHPUnitSetList::PHPUNIT_CODE_QUALITY);
28+
$config->import(PHPUnitSetList::PHPUNIT_EXCEPTION);
29+
$config->import(PHPUnitSetList::REMOVE_MOCKS);
30+
$config->import(PHPUnitSetList::PHPUNIT_YIELD_DATA_PROVIDER);
3131
$config->parallel();
3232
$config->paths([__DIR__ . '/src', __DIR__ . '/performance', __DIR__ . '/tests']);
3333
$config->skip([

src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource/JWKSet.php

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

55
namespace Jose\Bundle\JoseFramework\DependencyInjection\Source\KeyManagement\JWKSource;
66

7+
use function is_int;
8+
use function is_string;
79
use Jose\Bundle\JoseFramework\DependencyInjection\Source\AbstractSource;
810
use Jose\Component\Core\JWK;
911
use Jose\Component\KeyManagement\JWKFactory;
@@ -41,7 +43,11 @@ public function addConfiguration(NodeDefinition $node): void
4143
->info('The key set service.')
4244
->isRequired()
4345
->end()
44-
->integerNode('index')
46+
->variableNode('index')
47+
->validate()
48+
->ifTrue(fn (mixed $v): bool => ! is_int($v) && ! is_string($v))
49+
->thenInvalid('Invalid keyset index.')
50+
->end()
4551
->info('The index of the key in the key set.')
4652
->isRequired()
4753
->end()

0 commit comments

Comments
 (0)