Skip to content

Migration to 3.20 breaks our test suite #2942

Open
@gnutix

Description

@gnutix

Environment

Package

show

$ composer show --latest gedmo/doctrine-extensions
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 : * v3.19.0
released : 2025-02-24, 2 months ago
latest   : v3.20.0 released 2025-04-04, 1 month ago
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 5b0b8a442d19e6701ae64535dc08f7944e2895d2
dist     : [zip] https://api.github.com/repos/doctrine-extensions/DoctrineExtensions/zipball/5b0b8a442d19e6701ae64535dc08f7944e2895d2 5b0b8a442d19e6701ae64535dc08f7944e2895d2
path     : /app/vendor/gedmo/doctrine-extensions
names    : gedmo/doctrine-extensions

support
email : [email protected]
issues : https://github.com/doctrine-extensions/DoctrineExtensions/issues
source : https://github.com/doctrine-extensions/DoctrineExtensions/tree/v3.19.0
wiki : https://github.com/Atlantic18/DoctrineExtensions/tree/main/doc

autoload
psr-4
Gedmo\ => src/

requires
behat/transliterator ^1.2
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.0 || ^7.0

requires (dev)
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
doctrine/mongodb-odm ^2.3
doctrine/orm ^2.20 || ^3.3
friendsofphp/php-cs-fixer ^3.70
nesbot/carbon ^2.71 || ^3.0
phpstan/phpstan ^2.1.1
phpstan/phpstan-doctrine ^2.0.1
phpstan/phpstan-phpunit ^2.0.3
phpunit/phpunit ^9.6
rector/rector ^2.0.6
symfony/console ^5.4 || ^6.0 || ^7.0
symfony/doctrine-bridge ^5.4 || ^6.0 || ^7.0
symfony/phpunit-bridge ^6.0 || ^7.0
symfony/uid ^5.4 || ^6.0 || ^7.0
symfony/yaml ^5.4 || ^6.0 || ^7.0

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

conflicts
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

$ composer show --latest 'doctrine/*'
Direct dependencies required in composer.json:
doctrine/annotations                2.0.2  2.0.2  Docblock Annotations Parser
doctrine/collections                1.8.0  2.3.0  PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.
doctrine/data-fixtures              1.8.1  2.0.2  Data Fixtures for all Doctrine Object Managers
doctrine/doctrine-bundle            2.13.3 2.14.0 Symfony DoctrineBundle
doctrine/doctrine-fixtures-bundle   3.7.1  4.1.0  Symfony DoctrineFixturesBundle
doctrine/doctrine-migrations-bundle 3.4.1  3.4.1  Symfony DoctrineMigrationsBundle
doctrine/lexer                      2.1.1  3.0.1  PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.
doctrine/orm                        2.20.3 3.3.3  Object-Relational-Mapper for PHP
doctrine/persistence                2.5.7  4.0.0  The Doctrine Persistence project is a set of shared interfaces and functionality that th...

Transitive dependencies not required in composer.json:
doctrine/cache                      2.2.0  2.2.0  PHP Doctrine Cache library is a popular cache implementation that supports many differen...
doctrine/common                     3.5.0  3.5.0  PHP Doctrine Common project is a library that provides additional functionality that oth...
doctrine/dbal                       3.9.4  4.2.3  Powerful PHP database abstraction layer (DBAL) with many features for database schema in...
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 t...
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 t...
doctrine/inflector                  2.0.10 2.0.10 PHP Doctrine Inflector is a small library that can perform string manipulations with reg...
doctrine/instantiator               2.0.0  2.0.0  A small, lightweight utility to instantiate objects in PHP without invoking their constr...
doctrine/migrations                 3.9.0  3.9.0  PHP Doctrine Migrations project offer additional functionality on top of the database ab...
doctrine/sql-formatter              1.5.2  1.5.2  a PHP SQL highlighting library

PHP version

$ php -v
PHP 8.4.4 (cli) (built: Feb 14 2025 19:20:49) (NTS)
Copyright (c) The PHP Group
Built by https://github.com/docker-library/php
Zend Engine v4.4.4, Copyright (c) Zend Technologies
    with Zend OPcache v8.4.4, Copyright (c), by Zend Technologies
    with blackfire v1.92.32~linux-musl-x64-non_zts84, https://blackfire.io, by Blackfire

Subject

After upgrading from 3.19 to 3.20 (along with stof/doctrine-extensions-bundle from 1.13 to 1.14), our functional test suite reported errors.

I'm sorry I cannot give much more context ; it's a private project, and I have no time to make a reproducible repository. But knowing the only thing that changed in 3.20 is a fix regarding "soft delete", and our entity uses #[Gedmo\SoftDeleteable(fieldName: 'deletedAt', timeAware: true)], maybe you'll have an idea why that could happen.

Expected results

No errors.

Actual results

1) Functional\Controller\SomeModule\SomeEntityApiTest::testDelete
Doctrine\DBAL\Exception\SyntaxErrorException: An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' at line 1

vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:86
vendor/doctrine/dbal/src/Connection.php:1976
vendor/doctrine/dbal/src/Connection.php:1918
vendor/doctrine/dbal/src/Statement.php:194
vendor/doctrine/dbal/src/Statement.php:249
vendor/doctrine/orm/src/Persisters/Entity/BasicEntityPersister.php:288
vendor/doctrine/orm/src/UnitOfWork.php:1186
vendor/doctrine/orm/src/UnitOfWork.php:448
vendor/doctrine/orm/src/EntityManager.php:414
[...custom code...]
tests/Functional/ApiTestCase.php:181
tests/Functional/Controller/SomeModule/SomeEntityApiTest.php:69

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