Skip to content

Make "ext-gmp" an optional dependency when not necessary #185

@thomasvargiu

Description

@thomasvargiu

ext-gmp is only used for few and not standard features, and in some packages is required even if not necessary.
For example, jwt-key-mgmt requires the gmp extension, but it's only used for some key analyzers.

It would be better to:

  • remove ext-gmp as a hard dependency when not necessary, introducing some check like:
    public function analyze(JWK $jwk, MessageBag $bag): void
    {
      if (! \extension_loaded('gmp')) {
          throw new \LogicException(static::class . ' requires gmp extension');
      }
    // ...
    }
    • jwt-core
    • jwt-key-mgmt
  • add ext-gmp as a hard dependecy when necessary:
    • jwt-encryption-algorithm-ecdh-es
    • jwt-util-ecc

Metadata

Metadata

Assignees

Labels

DXDependenciesPull requests that update a dependency fileUX

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions