After the latest update of jsonapi and jsonapi_extras I get this error when using the EntityToJson service:

TypeError: Argument 1 passed to Drupal\jsonapi\JsonApiResource\ResourceObject::__construct() must implement interface Drupal\Core\Cache\CacheableDependencyInterface, instance of Drupal\jsonapi_extras\ResourceType\ConfigurableResourceType given, called in /app/web/modules/contrib/jsonapi_extras/src/EntityToJsonApi.php on line 99 in Drupal\jsonapi\JsonApiResource\ResourceObject->__construct() (line 79 of modules/contrib/jsonapi/src/JsonApiResource/ResourceObject.php).

jsonapi v2.4.0
jsonapi_extras v3.4.0

Comments

miiimooo created an issue. See original summary.

logickal’s picture

This should be resolved by #3035045: Make EntityToJsonApi use subrequests so that it never breaks again which has been merged to the dev branch, but hopefully 3.5 is dropping very soon, pending #3035134: Compatibility with upcoming JSON:API 2.4 release: JSON:API Extras 3.5.

wim leers’s picture

Issue tags: +API-First Initiative

@logickal: Great, thanks! 👍

e0ipso’s picture

Status: Active » Fixed

Marking as fixed as per #2. Thanks @logickal!

e0ipso’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

nicolas-san’s picture

Hi, any news on this in the stable branch ?