DoctrineExtensions icon indicating copy to clipboard operation
DoctrineExtensions copied to clipboard

Compatibility Symfony 8 and gedmo/doctrine-extensions

Open artemvolt opened this issue 3 weeks ago • 6 comments

Hello!

I am trying to use this guide for symfony. But when i install gedmo/doctrine-extensions for symfony 8, i saw v2.3.0 instead of 3.21. Could help me with this question? Maybe I have to install symfony packages separately? I hope it isn't strange question :)

Environment

php 8.4.15

Package

show

$ composer show --latest gedmo/doctrine-extensions
name     : gedmo/doctrine-extensions
descrip. : Doctrine2 behavioral extensions
keywords : behaviors, doctrine2, extensions, gedmo, loggable, nestedset, sluggable, sortable, timestampable, translatable, tree
versions : * v2.3.0
released : 2012-02-26, 13 years ago
latest   : v3.21.0 released 2025-09-22, 2 months 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/Atlantic18/DoctrineExtensions.git 31e5e51f242c7cd03433d7c0c8d58c55b26cc095
dist     : [zip] https://api.github.com/repos/Atlantic18/DoctrineExtensions/zipball/31e5e51f242c7cd03433d7c0c8d58c55b26cc095 31e5e51f242c7cd03433d7c0c8d58c55b26cc095
path     : /var/www/vendor/gedmo/doctrine-extensions
names    : gedmo/doctrine-extensions

support
issues : https://github.com/Atlantic18/DoctrineExtensions/issues
source : https://github.com/Atlantic18/DoctrineExtensions/tree/v2.3.0

autoload
psr-0
Gedmo => lib/

requires
doctrine/common >=2.1
php >=5.3.2

suggests
doctrine/mongodb-odm *
doctrine/orm >=2.1

Doctrine packages

show

$ composer show --latest 'doctrine/*'
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 introspect...
doctrine/doctrine-bundle            3.1.0 3.1.0 Symfony DoctrineBundle
doctrine/doctrine-migrations-bundle 4.0.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/common                     3.5.0 3.5.0 PHP Doctrine Common project is a library that provides additional functionality that other Doctr...
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 disabl...
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 vario...
doctrine/inflector                  2.1.0 2.1.0 PHP Doctrine Inflector is a small library that can perform string manipulations with regard to u...
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 abstractio...
doctrine/persistence                4.1.1 4.1.1 The Doctrine Persistence project is a set of shared interfaces and functionality that the differ...
doctrine/sql-formatter              1.5.3 1.5.3 a PHP SQL highlighting library

PHP version

$ php -v
8.4.15

Subject

Minimal repository with the bug

symfony new my_project_directory --version="8.0.x" --webapp

Steps to reproduce

symfony new my_project_directory --version="8.0.x" --webapp
composer require doctrine/dbal doctrine/doctrine-bundle doctrine/orm gedmo/doctrine-extensions

Expected results

Version of gedmo/doctrine-extensions is 3.21.

Actual results

Version is v2.3.0

artemvolt avatar Dec 10 '25 08:12 artemvolt

Did you tried -W Please see https://github.com/doctrine-extensions/DoctrineExtensions/pull/3008#issuecomment-3625836650

Chris53897 avatar Dec 10 '25 14:12 Chris53897

Unfortunately, nothing changed:

root@4cd7c57d3f83:/var/www# composer require doctrine/dbal doctrine/doctrine-bundle doctrine/orm gedmo/doctrine-extensions:v3.12.0 -W
./composer.json has been updated
Running composer update doctrine/dbal doctrine/doctrine-bundle doctrine/orm gedmo/doctrine-extensions --with-all-dependencies
Loading composer repositories with package information
Restricting packages listed in "symfony/symfony" to "8.0.*"
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires gedmo/doctrine-extensions v3.12.0 -> satisfiable by gedmo/doctrine-extensions[v3.12.0].
    - gedmo/doctrine-extensions v3.12.0 requires symfony/cache ^4.4 || ^5.3 || ^6.0 -> found symfony/cache[v4.4.0, ..., v4.4.48, v5.3.0, ..., v5.4.46, v6.0.0, ..., v6.4.30] but these were not loaded, likely because it conflicts with another require.

You can also try re-running composer require with an explicit version constraint, e.g. "composer require doctrine/dbal:*" to figure out if any version is installable, or "composer require doctrine/dbal:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

I tried to add to composer.json and then update:

root@4cd7c57d3f83:/var/www# composer update gedmo/doctrine-extensions -W
Loading composer repositories with package information
Restricting packages listed in "symfony/symfony" to "8.0.*"
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires gedmo/doctrine-extensions v3.12.0 -> satisfiable by gedmo/doctrine-extensions[v3.12.0].
    - gedmo/doctrine-extensions v3.12.0 requires doctrine/persistence ^2.2 || ^3.0 -> found doctrine/persistence[2.2.0, ..., 2.5.7, 3.0.0, ..., 3.4.3] but these were not loaded, likely because it conflicts with another require.

root@4cd7c57d3f83:/var/www# 

And I updated all 'composer update' and tried install again, but error was the same.

artemvolt avatar Dec 10 '25 15:12 artemvolt

It's a bit strange, because in master i see "symfony/cache": "^5.4 || ^6.4 || ^7.3 || ^8.0", but he said gedmo/doctrine-extensions v3.21.0 requires symfony/cache ^5.4 || ^6.0 || ^7.0 without 8.0.

artemvolt avatar Dec 10 '25 16:12 artemvolt

omg, I think i need to use dev-main, right? :) This change isn't in latest release

artemvolt avatar Dec 10 '25 16:12 artemvolt

omg, I think i need to use dev-main, right? :) This change isn't in latest release

Right, it's not yet released.

mbabker avatar Dec 10 '25 17:12 mbabker

@phansys could you please tag a new release ?

stof avatar Dec 11 '25 21:12 stof

Version 3.22.0 was released: https://github.com/doctrine-extensions/DoctrineExtensions/releases/tag/v3.22.0.

Thanks for your patience.

phansys avatar Dec 13 '25 19:12 phansys

Thank everybody for help!

artemvolt avatar Dec 14 '25 08:12 artemvolt