---
title: "lcobucci/jwt 5.0.0 Breaking Changes on Packagist | Since.dev"
description: "What each lcobucci/jwt release removed, renamed or changed: 50 breaking changes in 1 version on Packagist, each with its source."
canonical_url: https://since.dev/packages/packagist/lcobucci/jwt
last_updated: 2026-12-04
---

# 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

Latest version `5.7.0`, released November 19, 2026. BSD-3-Clause license. [Source repository](https://github.com/lcobucci/jwt)

Its 5.0.0 release requires [PHP 8.1](https://since.dev/calendar/php/8.1.md) or later. [PHP end of life dates](https://since.dev/calendar/php.md).

## lcobucci/jwt 5.0.0 breaking changes

lcobucci/jwt 5.0.0, released February 25, 2023: 50 breaking changes.

- **Removed**  

The package now requires PHP 8.1 or later, so older PHP runtimes can no longer run it. [github.com](https://github.com/lcobucci/jwt/releases/tag/5.0.0)
- **Removed**  

Components that were deprecated in the 4.x line have been removed and code using them must be updated. [github.com](https://github.com/lcobucci/jwt/releases/tag/5.0.0)
- **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](https://github.com/lcobucci/jwt/releases/tag/5.0.0)
- **Removed** `Lcobucci\JWT\Configuration::forUnsecuredSigner`  

Lcobucci\\JWT\\Configuration::forUnsecuredSigner was removed in lcobucci/jwt 5.0.0 [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Removed** `Lcobucci\JWT\Signer\Ecdsa::create`  

Lcobucci\\JWT\\Signer\\Ecdsa::create was removed in lcobucci/jwt 5.0.0 [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Removed** `Lcobucci\JWT\Signer\Ecdsa\UnsafeSha256`  

Lcobucci\\JWT\\Signer\\Ecdsa\\UnsafeSha256 was removed in lcobucci/jwt 5.0.0 [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Removed** `Lcobucci\JWT\Signer\Ecdsa\UnsafeSha384`  

Lcobucci\\JWT\\Signer\\Ecdsa\\UnsafeSha384 was removed in lcobucci/jwt 5.0.0 [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Removed** `Lcobucci\JWT\Signer\Ecdsa\UnsafeSha512`  

Lcobucci\\JWT\\Signer\\Ecdsa\\UnsafeSha512 was removed in lcobucci/jwt 5.0.0 [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Removed** `Lcobucci\JWT\Signer\Hmac::algorithm`  

Lcobucci\\JWT\\Signer\\Hmac::algorithm was removed in lcobucci/jwt 5.0.0 [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Removed** `Lcobucci\JWT\Signer\Hmac::minimumBitsLengthForKey`  

Lcobucci\\JWT\\Signer\\Hmac::minimumBitsLengthForKey was removed in lcobucci/jwt 5.0.0 [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Removed** `Lcobucci\JWT\Signer\Hmac\UnsafeSha256`  

Lcobucci\\JWT\\Signer\\Hmac\\UnsafeSha256 was removed in lcobucci/jwt 5.0.0 [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Removed** `Lcobucci\JWT\Signer\Hmac\UnsafeSha384`  

Lcobucci\\JWT\\Signer\\Hmac\\UnsafeSha384 was removed in lcobucci/jwt 5.0.0 [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Removed** `Lcobucci\JWT\Signer\Hmac\UnsafeSha512`  

Lcobucci\\JWT\\Signer\\Hmac\\UnsafeSha512 was removed in lcobucci/jwt 5.0.0 [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Removed** `Lcobucci\JWT\Signer\Key\InMemory::empty`  

Lcobucci\\JWT\\Signer\\Key\\InMemory::empty was removed in lcobucci/jwt 5.0.0 [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Removed** `Lcobucci\JWT\Signer\Key\LocalFileReference`  

Lcobucci\\JWT\\Signer\\Key\\LocalFileReference was removed in lcobucci/jwt 5.0.0 [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Removed** `Lcobucci\JWT\Signer\None`  

Lcobucci\\JWT\\Signer\\None was removed in lcobucci/jwt 5.0.0 [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Removed** `Lcobucci\JWT\Signer\Rsa\UnsafeSha256`  

Lcobucci\\JWT\\Signer\\Rsa\\UnsafeSha256 was removed in lcobucci/jwt 5.0.0 [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Removed** `Lcobucci\JWT\Signer\Rsa\UnsafeSha384`  

Lcobucci\\JWT\\Signer\\Rsa\\UnsafeSha384 was removed in lcobucci/jwt 5.0.0 [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Removed** `Lcobucci\JWT\Signer\Rsa\UnsafeSha512`  

Lcobucci\\JWT\\Signer\\Rsa\\UnsafeSha512 was removed in lcobucci/jwt 5.0.0 [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Removed** `Lcobucci\JWT\Signer\UnsafeEcdsa`  

Lcobucci\\JWT\\Signer\\UnsafeEcdsa was removed in lcobucci/jwt 5.0.0 [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Removed** `Lcobucci\JWT\Signer\UnsafeRsa`  

Lcobucci\\JWT\\Signer\\UnsafeRsa was removed in lcobucci/jwt 5.0.0 [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Removed** `Lcobucci\JWT\Token\Signature::fromEmptyData`  

Lcobucci\\JWT\\Token\\Signature::fromEmptyData was removed in lcobucci/jwt 5.0.0 [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Removed** `Lcobucci\JWT\Validation\Constraint\ValidAt`  

Use \\Lcobucci\\JWT\\Validation\\Constraint\\LooseValidAt instead. [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Removed** `Lcobucci\JWT\Validation\ConstraintViolation::$constraint`  

Lcobucci\\JWT\\Validation\\ConstraintViolation::$constraint was removed in lcobucci/jwt 5.0.0 [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **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](https://github.com/lcobucci/jwt/releases/tag/5.0.0)
- **Signature changed**  

Some parameters and types now use abstractions instead of concrete classes, so custom implementations or typed code may need updating. [github.com](https://github.com/lcobucci/jwt/releases/tag/5.0.0)
- **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](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **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](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **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](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **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](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **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](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Signature changed** `Lcobucci\JWT\Decoder::jsonDecode`  

Was public function jsonDecode(string $json); now public function jsonDecode(string $json): mixed. [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Signature changed** `Lcobucci\JWT\Encoder::jsonEncode`  

Was public function jsonEncode($data): string; now public function jsonEncode(mixed $data): string. [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **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](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **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](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **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](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **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](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **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](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **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](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **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](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Signature changed** `Lcobucci\JWT\Token\Parser::__construct`  

Was public function \_\_construct(Decoder $decoder); now public function \_\_construct(private readonly Decoder $decoder). [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **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](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **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](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **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](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Signature changed** `Lcobucci\JWT\Validation\Constraint\IdentifiedBy::__construct`  

Was public function \_\_construct(string $id); now public function \_\_construct(private readonly string $id). [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **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](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Signature changed** `Lcobucci\JWT\Validation\Constraint\PermittedFor::__construct`  

Was public function \_\_construct(string $audience); now public function \_\_construct(private readonly string $audience). [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **Signature changed** `Lcobucci\JWT\Validation\Constraint\RelatedTo::__construct`  

Was public function \_\_construct(string $subject); now public function \_\_construct(private readonly string $subject). [packagist.org](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **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](https://packagist.org/packages/lcobucci/jwt#5.0.0)
- **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](https://packagist.org/packages/lcobucci/jwt#5.0.0)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#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.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
