Fix JSON:API compatibility

Created on 7 February 2023, over 2 years ago
Updated 23 February 2023, over 2 years ago

Problem/Motivation

Fatal error: Declaration of Drupal\jsonapi\Normalizer\CommerceApiImposter\EnhancedResourceObjectNormalizer::normalize($object, $format = null, array $context = []) must be compatible with Drupal\jsonapi\Normalizer\ResourceObjectNormalizer::normalize($object, $format = null, array $context = []): ArrayObject|array|string|int|float|bool|null in /var/www/html/web/modules/contrib/commerce_api/src/Normalizer/CommerceApiImposter/EnhancedResourceObjectNormalizer.php on line 58

Fatal error: Declaration of Drupal\jsonapi\Normalizer\CommerceApiImposter\MetaRelationshipNormalizer::normalize($object, $format = null, array $context = []) must be compatible with Drupal\jsonapi\Normalizer\RelationshipNormalizer::normalize($object, $format = null, array $context = []): ArrayObject|array|string|int|float|bool|null in /var/www/html/web/modules/contrib/commerce_api/src/Normalizer/CommerceApiImposter/MetaRelationshipNormalizer.php on line 53

Steps to reproduce

Enable Commerce API in a Drupal (10.0.3) project with JSON:API enabled.

Proposed resolution

Make the method declarations compatible.

Remaining tasks

-
- Review MR
- Merge MR

User interface changes

N/A

API changes

N/A

Data model changes

N/A

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇳🇱Netherlands ricovandevin

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024