Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2365,7 +2365,7 @@ parameters:
path: src/Bundle/DependencyInjection/Source/NestedToken/NestedToken.php

-
message: '#^Parameter \#1 \$configs of method Jose\\Bundle\\JoseFramework\\DependencyInjection\\Source\\NestedToken\\NestedTokenBuilder\:\:load\(\) expects array, mixed given\.$#'
message: '#^Parameter \#1 \$configs of method Jose\\Bundle\\JoseFramework\\DependencyInjection\\Source\\NestedToken\\NestedTokenLoader\:\:load\(\) expects array, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Bundle/DependencyInjection/Source/NestedToken/NestedToken.php
Expand Down Expand Up @@ -3798,6 +3798,12 @@ parameters:
count: 1
path: src/Bundle/Resources/config/Algorithms/signature_experimental.php

-
message: '#^Access to constant on internal class Jose\\Component\\Core\\Util\\Ecc\\NistCurve\.$#'
identifier: classConstant.internalClass
count: 1
path: src/Bundle/Resources/config/analyzers.php

-
message: '#^Method Jose\\Bundle\\JoseFramework\\Serializer\\JWEEncoder\:\:getRecipientIndex\(\) has parameter \$context with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
Expand Down Expand Up @@ -5598,6 +5604,12 @@ parameters:
count: 1
path: src/Library/Signature/Algorithm/ECDSA.php

-
message: '#^Call to internal static method ParagonIE_Sodium_Core_Ed25519\:\:publickey_from_secretkey\(\)\.$#'
identifier: staticMethod.internal
count: 1
path: src/Library/Signature/Algorithm/EdDSA.php

-
message: '#^Method Jose\\Component\\Signature\\Algorithm\\RSAPKCS1\:\:sign\(\) should return string but returns mixed\.$#'
identifier: return.type
Expand Down
2 changes: 1 addition & 1 deletion src/Bundle/DependencyInjection/JoseFrameworkExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
use Override;
use Symfony\Component\Config\Definition\Processor;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use function count;

final class JoseFrameworkExtension extends Extension implements PrependExtensionInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ protected function calculateAgreementKey(JWK $private_key, JWK $public_key): str
$publicPem = ECKey::convertPublicKeyToPEM($public_key);
$privatePem = ECKey::convertPrivateKeyToPEM($private_key);

$res = openssl_pkey_derive($publicPem, $privatePem, $curve->getSize());
$res = openssl_pkey_derive($publicPem, $privatePem);
if ($res === false) {
throw new RuntimeException('Unable to derive the key');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,8 @@ public function a256CBCHS512EncryptAndDecrypt(): void
protected static function getMethod(string $class, string $name): ReflectionMethod
{
$class = new ReflectionClass($class);
$method = $class->getMethod($name);
$method->setAccessible(true);

return $method;
return $class->getMethod($name);
}

private function convertArrayToBinString(array $data): string
Expand Down