---
title: "firebase/php-jwt v7.0.0 Breaking Changes on Packagist"
description: "What each firebase/php-jwt release removed, renamed or changed: 17 breaking changes in 2 versions on Packagist, each with its source."
canonical_url: https://since.dev/packages/packagist/firebase/php-jwt
last_updated: 2026-12-04
---

# firebase/php-jwt breaking changes

firebase/php-jwt v7.0.0 (December 15, 2025) is its newest release with breaking changes, 7 of them. The first: Rejects keys smaller than the minimum allowed size in firebase/php-jwt 7.0.0. Every breaking API change we have recorded in firebase/php-jwt on Packagist: 17 breaking changes in 2 versions. Below, its 2 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `v7.2.2`, released November 17, 2026. BSD-3-Clause license. [Source repository](https://github.com/googleapis/php-jwt)

Packages on Packagist run on PHP. [PHP end of life dates](https://since.dev/calendar/php.md).

- From [v6.0.0](#v-v6-0-0) to [v7.0.0](#v-v7-0-0): 7 breaking changes in 1 version.

## firebase/php-jwt v7.0.0 breaking changes

firebase/php-jwt v7.0.0, released December 15, 2025: 7 breaking changes.

- **Behavior changed**  

Keys below the minimally allowed size now fail validation, so code using such keys will break. Use keys that meet the minimum size. [github.com](https://github.com/googleapis/php-jwt/releases/tag/v7.0.0)
- **Signature changed** `Firebase\JWT\JWK::parseKey`  

Was public static function parseKey(array $jwk, ?string $defaultAlg = null): ?Key; now public static function parseKey(#\[\\SensitiveParameter\] array $jwk, ?string $defaultAlg = null): ?Key. [packagist.org](https://packagist.org/packages/firebase/php-jwt#v7.0.0)
- **Signature changed** `Firebase\JWT\JWK::parseKeySet`  

Was public static function parseKeySet(array $jwks, ?string $defaultAlg = null): array; now public static function parseKeySet(#\[\\SensitiveParameter\] array $jwks, ?string $defaultAlg = null): array. [packagist.org](https://packagist.org/packages/firebase/php-jwt#v7.0.0)
- **Signature changed** `Firebase\JWT\JWT::decode`  

Was public static function decode(string $jwt, $keyOrKeyArray, ?stdClass &$headers = null): stdClass; now public static function decode(string $jwt, #\[\\SensitiveParameter\] $keyOrKeyArray, ?stdClass &$headers = null): stdClass. [packagist.org](https://packagist.org/packages/firebase/php-jwt#v7.0.0)
- **Signature changed** `Firebase\JWT\JWT::encode`  

Was public static function encode(array $payload, $key, string $alg, ?string $keyId = null, ?array $head = null): string; now public static function encode(array $payload, #\[\\SensitiveParameter\] $key, string $alg, ?string $keyId = null... [packagist.org](https://packagist.org/packages/firebase/php-jwt#v7.0.0)
- **Signature changed** `Firebase\JWT\JWT::sign`  

Was public static function sign(string $msg, $key, string $alg): string; now public static function sign(string $msg, #\[\\SensitiveParameter\] $key, string $alg): string. [packagist.org](https://packagist.org/packages/firebase/php-jwt#v7.0.0)
- **Signature changed** `Firebase\JWT\Key::__construct`  

Was public function \_\_construct(private $keyMaterial, private string $algorithm); now public function \_\_construct(#\[\\SensitiveParameter\] private $keyMaterial, private string $algorithm). [packagist.org](https://packagist.org/packages/firebase/php-jwt#v7.0.0)

## firebase/php-jwt v6.0.0 breaking changes

firebase/php-jwt v6.0.0, released January 24, 2022: 10 breaking changes.

- **Removed** `Firebase\JWT\JWT::ASN1_BIT_STRING`  

The ASN1_BIT_STRING constant no longer exists. Remove any code that references it. [packagist.org](https://packagist.org/packages/firebase/php-jwt#v6.0.0)
- **Removed** `Firebase\JWT\JWT::ASN1_INTEGER`  

The ASN1_INTEGER constant no longer exists. Remove any code that references it. [packagist.org](https://packagist.org/packages/firebase/php-jwt#v6.0.0)
- **Removed** `Firebase\JWT\JWT::ASN1_SEQUENCE`  

The ASN1_SEQUENCE constant no longer exists. Remove any code that references it. [packagist.org](https://packagist.org/packages/firebase/php-jwt#v6.0.0)
- **Behavior changed**  

JSON decoding in the package now applies the JSON_UNESCAPED_SLASHES flag, which can change decoded output for inputs containing escaped slashes. [github.com](https://github.com/googleapis/php-jwt/releases/tag/v6.0.0)
- **Behavior changed** `JWK.parseKeySet`  

Every key in a JWKS parsed with JWK::parseKeySet must now include an alg parameter. Set it manually on keys that lack one. [github.com](https://github.com/googleapis/php-jwt/releases/tag/v6.0.0)
- **Signature changed** `Firebase\JWT\JWT::decode`  

The second argument of JWT::decode must be a Firebase\\JWT\\Key or an array of Key objects. Wrap each raw key in new Key($key, $alg) and pass the algorithm there. [packagist.org](https://packagist.org/packages/firebase/php-jwt#v6.0.0)
- **Signature changed** `Firebase\JWT\JWT::encode`  

JWT::encode requires a third $alg argument. Pass the signing algorithm explicitly in every call. [packagist.org](https://packagist.org/packages/firebase/php-jwt#v6.0.0)
- **Signature changed** `Firebase\JWT\JWT::sign`  

JWT::sign requires a third $alg argument. Pass the signing algorithm explicitly in every call. [packagist.org](https://packagist.org/packages/firebase/php-jwt#v6.0.0)
- **Signature changed** `JWK.parseKey`  

JWK::parseKey returns a Firebase\\JWT\\Key object. Code that treated the result as a resource must be updated. [github.com](https://github.com/googleapis/php-jwt/releases/tag/v6.0.0)
- **Signature changed** `JWK.parseKeySet`  

JWK::parseKeySet returns an associative array mapping key IDs to Key objects instead of resources. Update code that reads these values. [github.com](https://github.com/googleapis/php-jwt/releases/tag/v6.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.
