Add web-token/jwt-framework ^4.0 support#219
Conversation
…ompatibility The jwt-framework 4.0 removed compression classes (CompressionMethodManager, Deflate) per RFC 8725 Section 3.6, and simplified JWEBuilder/JWEDecrypter constructors to accept a single AlgorithmManager. Changes: - Remove CompressionMethodManager and Deflate usage from MLEUtility and JWEUtility - Simplify JWEBuilder/JWEDecrypter constructors to single AlgorithmManager - Widen composer.json constraint to ^2.2.11|^3.3.5|^4.0 This unblocks Laravel 13 which requires Symfony 8 components.
|
Adding our voice in support of this PR — we maintain a Laravel-based e-commerce platform powering payment processing for several merchants, and cybersource/rest-client-php (with MLE) is a critical part of our stack. We've just been blocked from upgrading to Laravel 13 by the same dependency chain this PR addresses:
The changes in this PR are correct: dropping the compression manager (per RFC 8725 §3.6), simplifying the JWEBuilder/JWEDecrypter constructors to a single AlgorithmManager. We've confirmed those are the only breaking changes in web-token/jwt-framework v4 that affect the MLE code in this SDK. Could the maintainers please review and ship this in the next release? Until then, anyone running CyberSource MLE is stuck on Laravel 12 / Symfony 7. Happy to test against a release candidate if that helps. |
Summary
This PR adds support for
web-token/jwt-frameworkv4.x, which is required for compatibility with Symfony 8 and Laravel 13.Currently, the SDK constrains
web-token/jwt-frameworkto^2.2.11|^3.3.5. Since v3.x depends on Symfony <8 components, any project using Laravel 13 (which requires Symfony 8) cannot installcybersource/rest-client-phpdue to dependency conflicts.Changes
composer.json^2.2.11|^3.3.5→^2.2.11|^3.3.5|^4.0lib/Authentication/Util/MLEUtility.phpCompressionMethodManagerandDeflateimports and usage (removed in jwt-framework 4.0 per RFC 8725 Section 3.6)JWEBuilderconstructor to accept a singleAlgorithmManager(4.0 API)lib/Authentication/Util/JWE/JWEUtility.phpJWEDecrypterin bothdecryptJWEUsingPEM()anddecryptJWEUsingPrivateKey()AlgorithmManagerinstances into one (4.0 API)Why
web-token/jwt-framework4.0 removed compression support following RFC 8725 security recommendationsJWEBuilderandJWEDecrypterconstructors were simplified to accept a singleAlgorithmManagerinstead of separate managersTesting
web-token/jwt-framework4.1.4 + Symfony 8 + Laravel 13