### Problem/Motivation
Upgrading to Drupal Core 11.4+ results in a fatal error when serialization operations are triggered on Bibcite entities.
This happens because Drupal 11.4 narrowed the return types of standard normalizers across its core serialization components to a strict `: array`. Since `Drupal\bibcite_entity\Normalizer\ReferenceNormalizerBase` extends `Drupal\serialization\Normalizer\ComplexDataNormalizer`, its broader union return type signature (`: ArrayObject|array|string|int|float|bool|null`) now triggers a strict PHP fatal error due to a Liskov Substitution Principle (LSP) violation.
**Error message:**
> Fatal error: Declaration of Drupal\bibcite_entity\Normalizer\ReferenceNormalizerBase::normalize($object, $format = null, array $context = []): ArrayObject|array|string|int|float|bool|null must be compatible with Drupal\serialization\Normalizer\ComplexDataNormalizer::normalize($object, $format = null, array $context = []): array in /var/www/html/web/modules/contrib/bibcite/modules/bibcite_entity/src/Normalizer/ReferenceNormalizerBase.php on line 342
### Steps to reproduce
1. Install Drupal Core 11.4.2 (or any version 11.4+)
2. Install Bibliography & Citation (bibcite) version 3.1.0
3. Trigger normalizer execution (e.g., attempt to export a reference via REST/JSON or trigger bibcite entity operations that leverage core serialization).
4. Witness WSOD / PHP Fatal Error.
### Proposed resolution
Update `ReferenceNormalizerBase::normalize()` to strictly hint a return type of `: array` instead of the broader Symfony 6 mixed types union to match Drupal Core's modern serialization API updates.
Issue fork bibcite-3609991
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mgwisni commentedComment #4
mark_fullmerThanks for the issue report. However, I don't follow how you came to the conclusion that Bibcite's ReferenceNormalizerBase extends Drupal\serialization\Normalizer\ComplexDataNormalizer , nor under what circumstances you would "attempt to export a reference via REST/JSON"
Can you elaborate on the methodology you used to do this writeup? Thanks!
Comment #6
mark_fullmer