stof / StofDoctrineExtensionsBundle

Integration bundle for DoctrineExtensions by l3pp4rd in Symfony
https://symfony.com/bundles/StofDoctrineExtensionsBundle/current/index.html
MIT License
1.89k stars 380 forks source link

Incompatible with symfony v7.0.3 #477

Closed lakshmana closed 2 months ago

lakshmana commented 7 months ago

The problem arises when attempting to install version 1.11.0 of the bundle or the latest version without specifying a version explicitly on Symfony v7.03 and PHP v8.3.2. The error message indicates that the requirements cannot be resolved to an installable set of packages due to conflicts in dependencies.

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - doctrine/orm is locked to version 3.0.0 and an update of this package was not requested.
    - stof/doctrine-extensions-bundle v1.11.0 requires gedmo/doctrine-extensions ^3.15.0 -> satisfiable by gedmo/doctrine-extensions[v3.15.0].
    - gedmo/doctrine-extensions v3.15.0 conflicts with doctrine/orm <2.14.0 || 2.16.0 || 2.16.1 || >=3.0.
    - Root composer.json requires stof/doctrine-extensions-bundle 1.11.0 -> satisfiable by stof/doctrine-extensions-bundle[v1.11.0].

The issue likely stems from the incompatibility between the version constraints specified by gedmo/doctrine-extensions and those required by doctrine/orm.

Can anyone take a look into this ?

ph-il commented 7 months ago

Is your composer.json have this line :

"doctrine/orm": "^3.0", If yes, you need to change it to:

"doctrine/orm": "^2.18|^3.0",

lakshmana commented 7 months ago

@ph-il, thank you for the response. Unfortunately, the alteration didn't resolve the issue either. The problem stems from DoctrineExtensions, which is one of the dependencies. It appears that DoctrineExtensions is not compatible with doctrine/orm 3.0. This incompatibility has been acknowledged as conflicts on the following page: https://github.com/doctrine-extensions/DoctrineExtensions/blob/f5b6385b3c0131c022f91a74ca15214fe3007be8/composer.json#L76. It appears so.

"conflict": {
        "doctrine/annotations": "<1.13 || >=3.0",
        "doctrine/dbal": "<3.2 || >=4.0",
        "doctrine/mongodb-odm": "<2.3 || >=3.0",
        "doctrine/orm": "<2.14.0 || 2.16.0 || 2.16.1 || >=3.0"
    },
ReSpawN commented 6 months ago

Unfortunately I have to confirm this as well. Whilst setting up a brand new Symfony 7 installation I came across the same troubles with ORM 3.0 in conjunction with nesbot/carbon, illuminate/support, stof/doctrine-extensions-bundle and gedmo/doctrine-extensions.

Hopefully these will be resolved soon as my platform heavily depends on this functionality.

Chris53897 commented 6 months ago

You can solve it with this line in userland code. Maybe restrict dbal to v3 as well. "doctrine/orm": "^2.18",

stof commented 6 months ago

the Gedmo extensions that are configured by this bundle are not yet compatible with doctrine/orm 3.0 (the maintainers are working on it, but they are doing that on their free time). So you would need to downgrade the ORM to 2.x for now.

As Symfony 7.0 supports the ORM 3.0, composer probably selected that version during your dependency resolution done without the bundle.

ReSpawN commented 6 months ago

I chose to skip @stof's bundle and gedmo's all together. When the packages are up to spec (mainly gedmo) I will upgrade. gedmo/doctrine-extensions is already up to spec with nesbot/carbon:3 but gedmo's still denotes doctrine/orm:2.14.0.

Patiently we wait. :D

lakshmana commented 6 months ago

yup, patiently we wait. The only option for now is to downgrade to the latest 2.x.x version.

Chris53897 commented 6 months ago

You can help with testing, contributing or sponsor the maintainers, instead of just patiently waiting.

stof commented 6 months ago

@ReSpawN it says doctrine/orm:^2.14.0, not doctrine/orm:2.14.0 (which would not allow using the 2.18.1 release which is the latest 2.x version).

And regarding the support for doctrine/orm 3.0, as I said above, the maintainer is working on it (and it seems to be almost there based on the discussion in https://github.com/doctrine-extensions/DoctrineExtensions/issues/2708). But he's doing that work on his free time, with nobody in the community helping that effort AFAICT. See the answer of @Chris53897 (btw, the maintainer to sponsor in priority for that topic is not me but the maintainer of the extensions)

lakshmana commented 6 months ago

@stof It seems to work fine with doctrine/orm v2.28.1 atleast for me.

bettinz commented 4 months ago

@stof Since the is a PR compatible with ORM 3, can you add a beta version with that PR in composer.json?

sjonkeesse commented 3 months ago

Update: https://github.com/doctrine-extensions/DoctrineExtensions/commit/5a16042353fa068a8069281da6b57fc9a6d79f87

stof commented 2 months ago

gedmo/doctrine-extensions 3.16.0 has been released, with support for doctrine/orm 3.0