Skip to content

[Loggable] Symfony 8 and Doctrine 3 does not support array mapping type #3017

@pyatnitsev

Description

@pyatnitsev

Environment

Package

show

name     : gedmo/doctrine-extensions
descrip. : Doctrine behavioral extensions
keywords : Blameable, behaviors, doctrine, extensions, gedmo, loggable, nestedset, odm, orm, sluggable, sortable, timestampable, translatable, tree, uploadable
versions : * 3.x-dev, * dev-main
released : 2025-12-01, this week
latest   : dev-main released 2025-12-01, this week
type     : library
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
homepage : http://gediminasm.org/
source   : [git] https://github.com/doctrine-extensions/DoctrineExtensions.git 5b9385d41f6134c6bd5a0f6773bf4bd013cf42df
dist     : [zip] https://api.github.com/repos/doctrine-extensions/DoctrineExtensions/zipball/5b9385d41f6134c6bd5a0f6773bf4bd013cf42df 5b9385d41f6134c6bd5a0f6773bf4bd013cf42df
path     : /app/vendor/gedmo/doctrine-extensions
names    : gedmo/doctrine-extensions

support
docs : https://github.com/doctrine-extensions/DoctrineExtensions/tree/main/doc
issues : https://github.com/doctrine-extensions/DoctrineExtensions/issues
source : https://github.com/doctrine-extensions/DoctrineExtensions/tree/main

autoload
psr-4
Gedmo\ => src/

requires
doctrine/collections ^1.2 || ^2.0
doctrine/deprecations ^1.0
doctrine/event-manager ^1.2 || ^2.0
doctrine/persistence ^2.2 || ^3.0 || ^4.0
php ^7.4 || ^8.0
psr/cache ^1 || ^2 || ^3
psr/clock ^1
symfony/cache ^5.4 || ^6.4 || ^7.3 || ^8.0
symfony/string ^5.4 || ^6.4 || ^7.3 || ^8.0

requires (dev)
behat/transliterator ^1.2
doctrine/annotations ^1.13 || ^2.0
doctrine/cache ^1.11 || ^2.0
doctrine/common ^2.13 || ^3.0
doctrine/dbal ^3.7 || ^4.0
doctrine/doctrine-bundle ^2.3 || ^3.0
doctrine/mongodb-odm ^2.3
doctrine/orm ^2.20 || ^3.3
friendsofphp/php-cs-fixer ^3.89
nesbot/carbon ^2.71 || ^3.0
phpstan/phpstan ^2.1.31
phpstan/phpstan-doctrine ^2.0.1
phpstan/phpstan-phpunit ^2.0.3
phpunit/phpunit ^9.6
rector/rector ^2.2.6
symfony/console ^5.4 || ^6.4 || ^7.3 || ^8.0
symfony/doctrine-bridge ^5.4 || ^6.4 || ^7.3 || ^8.0
symfony/phpunit-bridge ^6.4 || ^7.3 || ^8.0
symfony/uid ^5.4 || ^6.4 || ^7.3 || ^8.0
symfony/yaml ^5.4 || ^6.4 || ^7.3 || ^8.0

suggests
doctrine/mongodb-odm to use the extensions with the MongoDB ODM
doctrine/orm to use the extensions with the ORM

conflicts
behat/transliterator <1.2 || >=2.0
doctrine/annotations <1.13 || >=3.0
doctrine/common <2.13 || >=4.0
doctrine/dbal <3.7 || >=5.0
doctrine/mongodb-odm <2.3 || >=3.0
doctrine/orm <2.20 || >=3.0 <3.3 || >=4.0

Doctrine packages

show

Color legend:
- patch or minor release available - update recommended
- major release available - update possible
- up to date version

Direct dependencies required in composer.json:
doctrine/dbal                       4.4.1 4.4.1 Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.
doctrine/doctrine-bundle            3.1.0 3.1.0 Symfony DoctrineBundle
doctrine/doctrine-fixtures-bundle   4.3.1 4.3.1 Symfony DoctrineFixturesBundle
doctrine/doctrine-migrations-bundle 3.7.0 4.0.0 Symfony DoctrineMigrationsBundle
doctrine/orm                        3.5.8 3.5.8 Object-Relational-Mapper for PHP

Transitive dependencies not required in composer.json:
doctrine/collections                2.4.0 2.4.0 PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.
doctrine/data-fixtures              2.2.0 2.2.0 Data Fixtures for all Doctrine Object Managers
doctrine/deprecations               1.1.5 1.1.5 A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.
doctrine/event-manager              2.0.1 2.0.1 The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.
doctrine/inflector                  2.1.0 2.1.0 PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.
doctrine/instantiator               2.0.0 2.0.0 A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer                      3.0.1 3.0.1 PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.
doctrine/migrations                 3.9.5 3.9.5 PHP Doctrine Migrations project offer additional functionality on top of the database abstraction layer (DBAL) for versioning your database schema and eas...
doctrine/persistence                4.1.1 4.1.1 The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.
doctrine/sql-formatter              1.5.3 1.5.3 a PHP SQL highlighting library

PHP version

PHP 8.5.0 (cli) (built: Nov 20 2025 19:53:58) (ZTS)
Copyright (c) The PHP Group
Built by https://github.com/docker-library/php
Zend Engine v4.5.0, Copyright (c) Zend Technologies
    with Zend OPcache v8.5.0, Copyright (c), by Zend Technologies

Subject

Minimal repository with the bug

Could be reproduced with default config on a main branch.

Steps to reproduce

  1. Setup domain entity to be Loggable.
  2. Try to create or update it

Expected results

Domain entity should be saved correctly, but it does not.

Actual results

Image

Possible solution

\Gedmo\Loggable\Entity\MappedSuperclass\AbstractLogEntry uses a deprecated array annotation for data column. Recommended way is using JSON type instead of array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions