Setup library #1
Annotations
1 error and 16 warnings
Analysis
Process completed with exit code 2.
|
PHP 8.1
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, szenius/set-timezone@v1.0. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
PHP 7.1
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, szenius/set-timezone@v1.0. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
PHP 7.3
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, szenius/set-timezone@v1.0. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
PHP 7.4
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, szenius/set-timezone@v1.0. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
PHP 8.2
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, szenius/set-timezone@v1.0. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
PHP 7.2
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, szenius/set-timezone@v1.0. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
PHP 8.0
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, szenius/set-timezone@v1.0. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Analysis
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, szenius/set-timezone@v1.0. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Analysis:
src/JwtDecoder.php#L90
Escaped Mutant:
--- Original
+++ New
@@ @@
*/
public function decode(string $jwt, JWKSet $keySet) : JWT
{
- $loader = new JWSLoader($this->serializerManager, new JWSVerifier($this->jwa->manager()), new HeaderCheckerManager([new AlgorithmChecker($this->jwa->manager()->list())], [new JWSTokenSupport()]));
+ $loader = new JWSLoader($this->serializerManager, new JWSVerifier($this->jwa->manager()), new HeaderCheckerManager([], [new JWSTokenSupport()]));
try {
$decoded = $loader->loadAndVerifyWithKeySet($jwt, $keySet, $signatureOffset);
} catch (Exception $e) {
|
Analysis:
src/JwtDecoder.php#L96
Escaped Mutant:
--- Original
+++ New
@@ @@
try {
$decoded = $loader->loadAndVerifyWithKeySet($jwt, $keySet, $signatureOffset);
} catch (Exception $e) {
- throw new InvalidArgumentException('Invalid JWT or signature', 0, $e);
+ throw new InvalidArgumentException('Invalid JWT or signature', -1, $e);
}
/** @psalm-suppress PossiblyNullArrayOffset */
$signature = $decoded->getSignatures()[$signatureOffset];
|
Analysis:
src/JwtDecoder.php#L96
Escaped Mutant:
--- Original
+++ New
@@ @@
try {
$decoded = $loader->loadAndVerifyWithKeySet($jwt, $keySet, $signatureOffset);
} catch (Exception $e) {
- throw new InvalidArgumentException('Invalid JWT or signature', 0, $e);
+ throw new InvalidArgumentException('Invalid JWT or signature', 1, $e);
}
/** @psalm-suppress PossiblyNullArrayOffset */
$signature = $decoded->getSignatures()[$signatureOffset];
|
Analysis:
src/JwtDecoder.php#L102
Escaped Mutant:
--- Original
+++ New
@@ @@
}
/** @psalm-suppress PossiblyNullArrayOffset */
$signature = $decoded->getSignatures()[$signatureOffset];
- $payload = json_decode((string) $decoded->getPayload(), true);
+ $payload = json_decode($decoded->getPayload(), true);
if (!is_array($payload)) {
throw new InvalidArgumentException('Invalid JWT payload');
}
|
Analysis:
src/JwtEncoder.php#L38
Escaped Mutant:
--- Original
+++ New
@@ @@
*/
public function __construct(?JWA $jwa = null, ?JWSSerializer $serializer = null)
{
- $this->jwa = $jwa ?? new JWA();
+ $this->jwa = new JWA() ?? $jwa;
$this->serializer = $serializer ?? new CompactSerializer();
}
/**
|
Analysis:
src/JwtEncoder.php#L39
Escaped Mutant:
--- Original
+++ New
@@ @@
public function __construct(?JWA $jwa = null, ?JWSSerializer $serializer = null)
{
$this->jwa = $jwa ?? new JWA();
- $this->serializer = $serializer ?? new CompactSerializer();
+ $this->serializer = new CompactSerializer() ?? $serializer;
}
/**
* Get the supported algorithms
|
Analysis:
src/JwtEncoder.php#L88
Escaped Mutant:
--- Original
+++ New
@@ @@
public function encode($payload, JWKSet $keySet, string $algorithm = 'RS256', ?string $kid = null) : string
{
static $isLegacyJwsBuilder = null;
- if ($isLegacyJwsBuilder === null) {
+ if ($isLegacyJwsBuilder !== null) {
$ctor = (new \ReflectionClass(JWSBuilder::class))->getConstructor();
/** @psalm-suppress PossiblyNullReference */
$isLegacyJwsBuilder = $ctor->getNumberOfParameters() === 2;
|
Analysis:
src/JwtEncoder.php#L91
Escaped Mutant:
--- Original
+++ New
@@ @@
if ($isLegacyJwsBuilder === null) {
$ctor = (new \ReflectionClass(JWSBuilder::class))->getConstructor();
/** @psalm-suppress PossiblyNullReference */
- $isLegacyJwsBuilder = $ctor->getNumberOfParameters() === 2;
+ $isLegacyJwsBuilder = $ctor->getNumberOfParameters() === 3;
}
$manager = $this->jwa->manager();
$jwsBuilder = $isLegacyJwsBuilder ? new JWSBuilder(null, $manager) : new JWSBuilder($manager);
|