This version is mainly a cleanup without functional change. There is no change from the jsonapi specification.
The main changes are:
- Enums instead of constants. This will be the main change you'll need to adjust for, see the UPGRADE doc for details. In short:
Document::CONTENT_TYPE_*toContentTypeEnum::*Document::JSONAPI_VERSION_*toJsonapiVersionEnum::*Document::LEVEL_*toDocumentLevelEnum::*RequestParser::SORT_*toSortOrderEnum::*RelationshipObject::TO_*toRelationshipTypeEnum::*
- Requiring php 8.2 as minimum version. Already 90% of composer installs run this version. Also from 2026 on, php 8.1 and lower are not receiving regular or security updates anymore.
- Removing deprecated features. There were deprecated since v2.0 / 2019 (old v1-style classes) and v2.3 / 2021 (array links and profile alias, introduced in v2.1 and never that popular). A big chance you don't use them when already using v2.x.
- Adding type hints. All code now uses strict typing and is checked against a high standard in phpstan and rector. As before, the test coverage is 99%.
Apart from the constants to enums change, you probably won't notice the upgrade if:
- you run php 8.2+; otherwise you need to stay on v2
- you don't extend library classes; otherwise you might need to adjust typing in your extending classes
- you pass the right type of values; otherwise you need adjust for that
If you encounter issues, it shouldn't be too hard to upgrade either. You'll get clear explanations from php type errors. See the UPGRADE doc for the details.