Change record status: 
Project: 
Introduced in branch: 
9.1.x
Introduced in version: 
9.1.0
Description: 

Prior versions of the JSON:API module incorrectly returned ResourceResponse objects that implemented CacheableResponseInterface for all of its responses, even uncacheable ones. This caused avoidable fatal errors under specific conditions.

In order for JSON:API to be more nuanced about cacheable vs. uncacheable responses, a new class has been introduced: CacheableResourceResponse. This class implements CacheableResponseInterface. Accordingly, Drupal\jsonapi\ResourceResponse no longer implements CacheableResponseInterface.

JSON:API's ResourceResponse class has this documentation:

@internal JSON:API maintains no PHP API since its API is the HTTP API. This class may change at any time and this will break any dependencies on it.

If your site relies on this internal class's implementation of CacheableResponseInterface, please refactor your code to use the new CacheableResourceResponse class wherever a cacheable response is appropriate (e.g. for all HEAD, OPTIONS, and GET requests). CacheableResourceResponse is a drop-in replacement.

Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done