lcobucci/jwt breaking changes
lcobucci/jwt 5.0.0 (February 25, 2023) is its newest release with breaking changes, 50 of them. The first: lcobucci/jwt 5.0.0 requires PHP 8.1 or later. Every breaking API change we have recorded in lcobucci/jwt on Packagist: 50 breaking changes in 1 version. Below, its one version with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 5.7.0, released November 19, 2026. BSD-3-Clause license. Source repository
Its 5.0.0 release requires PHP 8.1 or later. PHP end of life dates.
lcobucci/jwt 5.0.0 breaking changes
- Removed
The package now requires PHP 8.1 or later, so older PHP runtimes can no longer run it. github.com - Removed
Components that were deprecated in the 4.x line have been removed and code using them must be updated. github.com - Removed
\Lcobucci\JWT\Signer\None
The None signer is gone, so code that referenced it must use another signer or stop using it. github.com - Removed
Lcobucci\JWT\Configuration::forUnsecuredSigner
Lcobucci\JWT\Configuration::forUnsecuredSigner was removed in lcobucci/jwt 5.0.0 packagist.org - Removed
Lcobucci\JWT\Signer\Ecdsa::create
Lcobucci\JWT\Signer\Ecdsa::create was removed in lcobucci/jwt 5.0.0 packagist.org - Removed
Lcobucci\JWT\Signer\Ecdsa\UnsafeSha256
Lcobucci\JWT\Signer\Ecdsa\UnsafeSha256 was removed in lcobucci/jwt 5.0.0 packagist.org - Removed
Lcobucci\JWT\Signer\Ecdsa\UnsafeSha384
Lcobucci\JWT\Signer\Ecdsa\UnsafeSha384 was removed in lcobucci/jwt 5.0.0 packagist.org - Removed
Lcobucci\JWT\Signer\Ecdsa\UnsafeSha512
Lcobucci\JWT\Signer\Ecdsa\UnsafeSha512 was removed in lcobucci/jwt 5.0.0 packagist.org - Removed
Lcobucci\JWT\Signer\Hmac::algorithm
Lcobucci\JWT\Signer\Hmac::algorithm was removed in lcobucci/jwt 5.0.0 packagist.org - Removed
Lcobucci\JWT\Signer\Hmac::minimumBitsLengthForKey
Lcobucci\JWT\Signer\Hmac::minimumBitsLengthForKey was removed in lcobucci/jwt 5.0.0 packagist.org - Removed
Lcobucci\JWT\Signer\Hmac\UnsafeSha256
Lcobucci\JWT\Signer\Hmac\UnsafeSha256 was removed in lcobucci/jwt 5.0.0 packagist.org - Removed
Lcobucci\JWT\Signer\Hmac\UnsafeSha384
Lcobucci\JWT\Signer\Hmac\UnsafeSha384 was removed in lcobucci/jwt 5.0.0 packagist.org - Removed
Lcobucci\JWT\Signer\Hmac\UnsafeSha512
Lcobucci\JWT\Signer\Hmac\UnsafeSha512 was removed in lcobucci/jwt 5.0.0 packagist.org - Removed
Lcobucci\JWT\Signer\Key\InMemory::empty
Lcobucci\JWT\Signer\Key\InMemory::empty was removed in lcobucci/jwt 5.0.0 packagist.org - Removed
Lcobucci\JWT\Signer\Key\LocalFileReference
Lcobucci\JWT\Signer\Key\LocalFileReference was removed in lcobucci/jwt 5.0.0 packagist.org - Removed
Lcobucci\JWT\Signer\None
Lcobucci\JWT\Signer\None was removed in lcobucci/jwt 5.0.0 packagist.org - Removed
Lcobucci\JWT\Signer\Rsa\UnsafeSha256
Lcobucci\JWT\Signer\Rsa\UnsafeSha256 was removed in lcobucci/jwt 5.0.0 packagist.org - Removed
Lcobucci\JWT\Signer\Rsa\UnsafeSha384
Lcobucci\JWT\Signer\Rsa\UnsafeSha384 was removed in lcobucci/jwt 5.0.0 packagist.org - Removed
Lcobucci\JWT\Signer\Rsa\UnsafeSha512
Lcobucci\JWT\Signer\Rsa\UnsafeSha512 was removed in lcobucci/jwt 5.0.0 packagist.org - Removed
Lcobucci\JWT\Signer\UnsafeEcdsa
Lcobucci\JWT\Signer\UnsafeEcdsa was removed in lcobucci/jwt 5.0.0 packagist.org - Removed
Lcobucci\JWT\Signer\UnsafeRsa
Lcobucci\JWT\Signer\UnsafeRsa was removed in lcobucci/jwt 5.0.0 packagist.org - Removed
Lcobucci\JWT\Token\Signature::fromEmptyData
Lcobucci\JWT\Token\Signature::fromEmptyData was removed in lcobucci/jwt 5.0.0 packagist.org - Removed
Lcobucci\JWT\Validation\Constraint\ValidAt
Use \Lcobucci\JWT\Validation\Constraint\LooseValidAt instead. packagist.org - Removed
Lcobucci\JWT\Validation\ConstraintViolation::$constraint
Lcobucci\JWT\Validation\ConstraintViolation::$constraint was removed in lcobucci/jwt 5.0.0 packagist.org - Behavior changed
Builder
Builder methods no longer modify the existing builder, so code that relied on mutating a builder in place must use the returned instance. github.com - Signature changed
Some parameters and types now use abstractions instead of concrete classes, so custom implementations or typed code may need updating. github.com - Signature changed
Lcobucci\JWT\Builder::getToken
Was public function getToken(Signer $signer, Key $key): Plain; now public function getToken(Signer $signer, Key $key): UnencryptedToken. packagist.org - Signature changed
Lcobucci\JWT\Builder::withClaim
Was public function withClaim(string $name, $value): Builder; now public function withClaim(string $name, mixed $value): Builder. packagist.org - Signature changed
Lcobucci\JWT\Builder::withHeader
Was public function withHeader(string $name, $value): Builder; now public function withHeader(string $name, mixed $value): Builder. packagist.org - Signature changed
Lcobucci\JWT\Configuration::forAsymmetricSigner
Was public static function forAsymmetricSigner(Signer $signer, Key $signingKey, Key $verificationKey, ?Encoder $encoder = null, ?Decoder $decoder = null): self; now public static function forAsymmetricSigner(Signer $signer, Key... packagist.org - Signature changed
Lcobucci\JWT\Configuration::forSymmetricSigner
Was public static function forSymmetricSigner(Signer $signer, Key $key, ?Encoder $encoder = null, ?Decoder $decoder = null): self; now public static function forSymmetricSigner(Signer $signer, Key $key, Encoder $encoder = new... packagist.org - Signature changed
Lcobucci\JWT\Decoder::jsonDecode
Was public function jsonDecode(string $json); now public function jsonDecode(string $json): mixed. packagist.org - Signature changed
Lcobucci\JWT\Encoder::jsonEncode
Was public function jsonEncode($data): string; now public function jsonEncode(mixed $data): string. packagist.org - Signature changed
Lcobucci\JWT\JwtFacade::__construct
Was public function __construct(?Parser $parser = null, ?Clock $clock = null); now public function __construct(private readonly Parser $parser = new Token\Parser(new JoseEncoder()), ?Clock $clock = null). packagist.org - Signature changed
Lcobucci\JWT\Signer\Ecdsa::__construct
Was public function __construct(?SignatureConverter $converter = null); now public function __construct(private readonly SignatureConverter $converter = new MultibyteStringConverter()). packagist.org - Signature changed
Lcobucci\JWT\Token\Builder::__construct
Was public function __construct(Encoder $encoder, ClaimsFormatter $claimFormatter); now public function __construct(private readonly Encoder $encoder, private readonly ClaimsFormatter $claimFormatter). packagist.org - Signature changed
Lcobucci\JWT\Token\Builder::withClaim
Was public function withClaim(string $name, $value): BuilderInterface; now public function withClaim(string $name, mixed $value): BuilderInterface. packagist.org - Signature changed
Lcobucci\JWT\Token\Builder::withHeader
Was public function withHeader(string $name, $value): BuilderInterface; now public function withHeader(string $name, mixed $value): BuilderInterface. packagist.org - Signature changed
Lcobucci\JWT\Token\DataSet::__construct
Was public function __construct(array $data, string $encoded); now public function __construct(private readonly array $data, private readonly string $encoded). packagist.org - Signature changed
Lcobucci\JWT\Token\DataSet::get
Was public function get(string $name, $default = null); now public function get(string $name, mixed $default = null): mixed. packagist.org - Signature changed
Lcobucci\JWT\Token\Parser::__construct
Was public function __construct(Decoder $decoder); now public function __construct(private readonly Decoder $decoder). packagist.org - Signature changed
Lcobucci\JWT\Token\Plain::__construct
Was public function __construct(DataSet $headers, DataSet $claims, Signature $signature); now public function __construct(private readonly DataSet $headers, private readonly DataSet $claims, private readonly Signature $signature). packagist.org - Signature changed
Lcobucci\JWT\Token\Signature::__construct
Was public function __construct(string $hash, string $encoded); now public function __construct(private readonly string $hash, private readonly string $encoded). packagist.org - Signature changed
Lcobucci\JWT\Validation\Constraint\HasClaimWithValue::__construct
Was public function __construct(string $claim, $expectedValue); now public function __construct(private readonly string $claim, private readonly mixed $expectedValue). packagist.org - Signature changed
Lcobucci\JWT\Validation\Constraint\IdentifiedBy::__construct
Was public function __construct(string $id); now public function __construct(private readonly string $id). packagist.org - Signature changed
Lcobucci\JWT\Validation\Constraint\LooseValidAt::__construct
Was public function __construct(Clock $clock, ?DateInterval $leeway = null); now public function __construct(private readonly Clock $clock, ?DateInterval $leeway = null). packagist.org - Signature changed
Lcobucci\JWT\Validation\Constraint\PermittedFor::__construct
Was public function __construct(string $audience); now public function __construct(private readonly string $audience). packagist.org - Signature changed
Lcobucci\JWT\Validation\Constraint\RelatedTo::__construct
Was public function __construct(string $subject); now public function __construct(private readonly string $subject). packagist.org - Signature changed
Lcobucci\JWT\Validation\Constraint\SignedWith::__construct
Was public function __construct(Signer $signer, Signer\Key $key); now public function __construct(private readonly Signer $signer, private readonly Signer\Key $key). packagist.org - Signature changed
Lcobucci\JWT\Validation\Constraint\StrictValidAt::__construct
Was public function __construct(Clock $clock, ?DateInterval $leeway = null); now public function __construct(private readonly Clock $clock, ?DateInterval $leeway = null). packagist.org
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.