Skip to content

docs(jwt): what else changes from 4.2 to 4.3, after a backward compatibility audit - #37

Merged
Spomky merged 1 commit into
mainfrom
docs/jwt-4-3-bc-audit
Nov 10, 2026
Merged

Spomky merged 1 commit into
mainfrom
docs/jwt-4-3-bc-audit

Conversation

@Spomky

@Spomky Spomky commented Nov 10, 2026

Copy link
Copy Markdown
Member

The backward compatibility audit of web-token/jwt-framework 4.3.x against 4.2.7 found changes that the migration guide (projects/jwt/4.3/docs/migration/from-v4.2-to-v4.3.md) did not mention, and one row that was wrong. This PR only touches that page.

Behaviour changes added

  • Builders. Some errors are now reported by build(): the header, algorithm and key checks of JWEBuilder, and the b64 consistency of JWSBuilder. The messages are unchanged, and the classes are the ones thrown before or subclasses of them, so a try block around the whole sequence still catches them. A try block around the single call that used to throw no longer does.
  • create(). It returns a new, empty builder and no longer empties the builder it is called on. $builder->create(); with the result ignored now keeps the earlier signatures or recipients.
  • Loaders. The loaders of the library and of the bundle return the interfaces from getJwsVerifier(), getJweDecrypter() and getHeaderCheckerManager(). Nothing changes at runtime, but static analysers report calls to the deprecated methods.
  • Key analyzer. AlgorithmAnalyzer adds a medium message to a key with alg: EdDSA.

Corrections

Changes that depend on open PRs

These parts of the page only become true once the matching PR is merged into 4.3.x:

Verification

  • The builder and create() behaviours were checked with a probe on 4.2.7 and on 4.3.x (e39db7ef), and the analyzer message against the 4.3.x code.
  • tools/build.py --strict --only jwt passes (342 pages), and the anchors used by the new links exist in the built page.

…ibility audit

An audit of 4.3.x against 4.2.7, with the Symfony backward compatibility
promise as the reference, found changes that the migration guide did not
mention, or described wrongly.

Behaviour changes:
- the builders report some errors in build(): the checks of JWEBuilder
  and the b64 consistency of JWSBuilder, with the same messages and
  classes, or subclasses of them;
- create() returns a new, empty builder and no longer empties the one
  it is called on;
- the loaders of the library and of the bundle return the interfaces of
  their verifier, decrypter and header checker manager, which static
  analysers notice;
- AlgorithmAnalyzer reports a key whose "alg" is "EdDSA" with a medium
  message.

Corrections:
- the deprecated Services classes of the bundle are still the services
  in 4.3: the EventDispatching decorators replace them in 5.0, under the
  same ids. The guide said they already did;
- JKUFactory and X5UFactory extend UrlKeySetFactory again
  (web-token/jwt-framework#821), and stop extending it in 5.0;
- the bundle keeps the services of the library "none" and "RSA1_5"
  classes, deprecated (web-token/jwt-framework#822);
- the split packages are updated together, since the bundle and the
  experimental package require the library 4.3
  (web-token/jwt-framework#820).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant