5.0.0: remove what 4.3 deprecated, seal what it announced
Maintainer thường phản hồi trong vòng 1 ngày
@Spomky đang làm issue này rồi.
Từ ngày 13/9/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
4.3 spends its whole cycle preparing 5.0: every removal the major makes is deprecated there, every class it seals is annotated, and every contract it changes carries a BC NOTE. This issue is the inventory of what 5.0 has to do with that preparation, so that the 5.0.x branch can start the day 4.3.0 is tagged.
It is an umbrella: #653 tracks the RSA1_5 CEK size on its own.
1. Remove the deprecated API
52 @deprecated annotations and 4 deprecated arguments (count of 2026-09-13, after #732–#736).
Output parameters, replaced by the result objects of 4.3
-
JWSLoader::loadAndVerifyWithKey()andloadAndVerifyWithKeySet()→loadAndVerify() -
JWSVerifier::verifyWithKeySet()→verify() -
JWEDecrypter::decryptUsingKey()anddecryptUsingKeySet()→decrypt() -
JWELoader::loadAndDecryptWithKey()andloadAndDecryptWithKeySet()→loadAndDecrypt() - the same seven methods on
EventDispatchingJWSLoader,EventDispatchingJWSVerifier,EventDispatchingJWEDecrypterandEventDispatchingJWELoader, which survive the removal of the deprecated subclasses below - the
$signatureargument ofNestedTokenLoader::load()and ofEventDispatchingNestedTokenLoader::load() - the
$nameargument ofJWSSerializerManager::unserialize()andJWESerializerManager::unserialize()
Immutability
-
JWSBuilder::create()andJWEBuilder::create() -
AlgorithmManager::add() -
JWSSerializerManagerFactory::names()andJWESerializerManagerFactory::names()→aliases()
Key management
- the 16 static methods of
JWKFactory→JWKFactoryInterface - the
UrlKeySetFactoryclass andUrlKeySetFactoryTrait::enabledCache()(deprecated since 4.1)
Core
-
JWKSet::sortKeys()
Bundle
- the 10 deprecated
Services\*subclasses:JWSBuilder,JWSVerifier,JWSLoader,JWEBuilder,JWEDecrypter,JWELoader,NestedTokenBuilder,NestedTokenLoader,ClaimCheckerManager,HeaderCheckerManager - the 10 matching factories still build those subclasses today, since returning the
EventDispatching*decorators would have changed their return type in a minor: rewire them, and widencreate()to the interfaces
Algorithms
-
Jose\Component\Signature\Algorithm\NoneandJose\Component\Encryption\Algorithm\KeyEncryption\RSA15, the two shims kept for the migration toweb-token/jwt-unsecuredandweb-token/jwt-rsa15 - drop the
requireon those two packages fromweb-token/jwt-library: it exists only so the shims can extend their replacement -
Jose\Experimental\Signature\ES256K, the shim kept since #736 moved the algorithm to the library, and its deprecated service in the bundle'ssignature_experimental.php - decide the fate of
EdDSA: RFC 9864 deprecates the polymorphic identifier and #734 deprecates signing with it, verification stays silent so the tokens in circulation keep working. Its docblock calls the removal "a candidate for 5.0.0" — either remove the class, or keep it verify-only and say so -
Jose\Experimental\Signature\ES256K, the alias kept once the algorithm moves toJose\Component\Signature\Algorithm\ES256K(RFC 8812) — #727 -
Jose\Component\Signature\Algorithm\EdDSA, deprecated by RFC 9864 in favour ofEd25519/Ed448— #724 adds the replacements in 4.3; decide here whether the polymorphic identifier is removed or merely kept deprecated (interop:EdDSAis still what most issuers emit)
Deprecation plumbing
-
Core\Util\InheritanceChecker(13 call sites) andCore\Util\InternalCallChecker(2 call sites)
2. Seal what 4.3 announced
-
finalon the 11 services carrying@final:JWSBuilder,JWSVerifier,JWSLoader,JWEBuilder,JWEDecrypter,JWELoader,NestedTokenBuilder,NestedTokenLoader,JWKFactory(alsoreadonly),Checker\ClaimCheckerManagerandChecker\HeaderCheckerManager -
final readonlyonJWK,JWKSet,JWS,JWEandSignature, with the state given to the constructor. This removesJWS::addSignature()andJWE::withPayload(), the two mutators sealed in 4.3, so the builders and the serializers have to assemble the object in one go -
Signature: throw instead of deprecating when a protected header is passed without its encoded form -
finalon the three classes left open only so their deprecated shim can extend them:Jose\Unsecured\Signature\None,Jose\Rsa15\KeyEncryption\RSA15andJose\Component\Signature\Algorithm\ES256K -
JWE::getIV()andgetTag(): narrow tostringand drop the tworeturn.unusedTypeentries added to the PHPStan baseline in #715
3. Change the contracts
-
WrappedKeyas the return type ofKeyEncryption::encryptKey(),KeyWrapping::wrapKey(),KeyAgreement::getAgreementKey()andKeyAgreementWithKeyWrapping::wrapAgreementKey()(announced for the fourth one in #715), dropping thearray &$additionalHeaderoutput parameter -
EncryptedContentas the return type ofContentEncryptionAlgorithm::encryptContent(), dropping?string &$tag -
TokenHeadersas the return type ofTokenTypeSupport::retrieveTokenHeaders()(#716), dropping its twoarray &$header - declare and require the expected CEK size on
KeyEncryption::decryptKey()andKeyWrapping::unwrapKey(), deleteCEK_LENGTHSfromJose\Rsa15\KeyEncryption\RSA15and drop the two@phpstan-ignore arguments.countofJWEDecrypter— #653 -
EncryptionAlgorithmManagers: reject the algorithms that are neither key encryption nor content encryption instead of ignoring them, and give the builder and the decrypter the two managers - merge
MissingPayloadRuntimeExceptionandMissingPayloadLogicExceptioninto a single class
4. Housekeeping
- open the
5.0.xbranch - raise the PHP floor (
>=8.2today) and the Symfony one (^7.0|^8.0), prunebrick/math: ^0.12|…|^0.19 - keep
symfony/deprecation-contracts: 5.x will deprecate again - tests: the 3 assertions on deprecation messages (
AlgorithmManagerTest,JWSBuilderImmutabilityTest,JWEBuilderImmutabilityTest), the 2 tests documenting the algorithm shims (NoneSignatureTest,RSAKeyEncryptionTest), and the inheritance cases ofServiceInterfacesTestandSealedValueObjectsTest; since #734/#736, alsoDeprecatedES256KConsumer, the shim cases ofExperimentalAlgorithmsTestandES256KSignatureTest, and theEdDSAcases ofEdDSAAlgorithmsTestandOKPKeyAnalyzerTest - write
migration/from-v4.3-to-v5.0.mdin the documentation
Done when
On 5.0.x, each of these greps returns nothing in src/:
@deprecated
trigger_deprecation
func_num_args|func_get_arg
@final
BC NOTE
5\.0
The func_num_args() one is the useful cross-check: every remaining crutch belongs either to a deprecated method removed in section 1, or to the CEK size argument declared in section 3.
2026-09-13 — #715 and #716 merged: the WrappedKey and TokenHeaders announcements of section 3 are in place. #732–#736 added two deprecations (the ES256K shim, EdDSA) and three classes left open for a shim: folded into sections 1, 2 and 4 above.
- Ngôn ngữ chính
- PHP
- Star
- 954
- Fork
- 119
- Merge trung bình
- 48 phút
- Pull request đã merge (30 ngày)
- 17
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của web-token/jwt-framework
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
web-token/jwt-framework#757 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
web-token/jwt-framework#773 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 57/100
web-token/jwt-framework#772 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
web-token/jwt-framework#771 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
web-token/jwt-framework#770 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của web-token/jwt-framework
Issue tương tự
-
enhancement priority Sales
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
novalo-dev/Prestashop-MCP-Server#201 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Include flows spanning the full report time windowCó thể đã có người làm @somethingwithproof đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Cacti/plugin_flowview#306 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug origin: upstream priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
mattytap/Mattytap-Sermons#105 ·
-
priority:low type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
crazy-goat/workerman-bundle#1189 ·
Maintainer thường phản hồi trong vòng 1 ngày