Skip to content

[Serializer] v6.4.23 AbstractObjectNormalizer::getAllowedAttribute signature change #61226

@nicolascrequer

Description

@nicolascrequer

Symfony version(s) affected

6.4.23

Description

Using Symfony version 6.4.23 while updating the symfony/serializer package from version 6.4.22 to 6.4.23

Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
  - Upgrading symfony/serializer (v6.4.22 => v6.4.23)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
  - Upgrading symfony/serializer (v6.4.22 => v6.4.23): Extracting archive
Generating optimized autoload files
148 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.

We end up with the following error on the web interface:

Fatal error: Declaration of ApiPlatform\Serializer\AbstractItemNormalizer::getAllowedAttributes($classOrObject, array $context, $attributesAsString = false) must be compatible with Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::getAllowedAttributes(object|string $classOrObject, array $context, bool $attributesAsString = false): array|bool in /var/www/WEBAI2/vendor/api-platform/core/src/Serializer/AbstractItemNormalizer.php on line 493

This issue does not resolve the problem:

#61035

How to reproduce

Install both APIP 2.7.18 and Symfony 6.4.23 last versions.
Clear the cache and you may get the same error on the web interface.

Possible Solution

Revert to version 6.4.22 of symfony/serializer

Additional Context

PHP 8.2.29
Symfony 6.4.23
ApiPlatform 2.7.18

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy