sonata-project / SonataUserBundle

Symfony SonataUserBundle
https://docs.sonata-project.org/projects/SonataUserBundle
MIT License
339 stars 488 forks source link

Not compatible with doctrine ^2.8 #1317

Closed marhub closed 3 years ago

marhub commented 3 years ago

Environment

Sonata packages

show

``` $ composer show --latest 'sonata-project/*' root@server:/application# composer show --latest 'sonata-project/*' sonata-project/admin-bundle 3.88.0 3.88.0 The missing Symfony Admin Generator sonata-project/block-bundle 4.5.0 4.5.0 Symfony SonataBlockBundle sonata-project/cache 2.1.0 2.1.0 Cache library sonata-project/doctrine-extensions 1.11.0 1.11.0 Doctrine2 behavioral extensions sonata-project/doctrine-orm-admin-bundle 3.27.0 3.27.0 Integrate Doctrine ORM into the SonataAdminBundle sonata-project/exporter 2.5.0 2.5.0 Lightweight Exporter library sonata-project/form-extensions 1.8.1 1.8.1 Symfony form extensions sonata-project/twig-extensions 1.5.0 1.5.0 Sonata twig extensions ```

Symfony packages

show

``` $ composer show --latest 'symfony/*' root@server:/application# composer show --latest 'symfony/*' symfony/asset v4.4.18 v5.2.1 Symfony Asset Component symfony/browser-kit v4.4.18 v5.2.1 Symfony BrowserKit Component symfony/cache v4.4.18 v5.2.1 Symfony Cache component with PSR-6, PSR-16, and tags symfony/cache-contracts v2.2.0 v2.2.0 Generic abstractions related to caching symfony/config v4.4.18 v5.2.1 Symfony Config Component symfony/console v4.4.18 v5.2.1 Symfony Console Component symfony/css-selector v4.4.18 v5.2.1 Symfony CssSelector Component symfony/debug v4.4.18 v4.4.18 Symfony Debug Component symfony/debug-bundle v4.4.18 v5.2.1 Symfony DebugBundle symfony/dependency-injection v4.4.18 v5.2.1 Symfony DependencyInjection Component symfony/deprecation-contracts v2.2.0 v2.2.0 A generic function and convention to trigger deprecation notices symfony/doctrine-bridge v4.4.18 v5.2.1 Symfony Doctrine Bridge symfony/dom-crawler v4.4.18 v5.2.1 Symfony DomCrawler Component symfony/dotenv v4.4.18 v5.2.1 Registers environment variables from a .env file symfony/error-handler v4.4.18 v5.2.1 Symfony ErrorHandler Component symfony/event-dispatcher v4.4.18 v5.2.1 Symfony EventDispatcher Component symfony/event-dispatcher-contracts v1.1.9 v2.2.0 Generic abstractions related to dispatching event symfony/expression-language v4.4.18 v5.2.1 Symfony ExpressionLanguage Component symfony/filesystem v4.4.18 v5.2.1 Symfony Filesystem Component symfony/finder v4.4.18 v5.2.1 Symfony Finder Component symfony/flex v1.11.0 v1.11.0 Composer plugin for Symfony symfony/form v4.4.18 v5.2.1 Symfony Form Component symfony/framework-bundle v4.4.18 v5.2.1 Symfony FrameworkBundle symfony/http-client v4.4.18 v5.2.1 Symfony HttpClient component symfony/http-client-contracts v2.3.1 v2.3.1 Generic abstractions related to HTTP clients symfony/http-foundation v4.4.18 v5.2.1 Symfony HttpFoundation Component symfony/http-kernel v4.4.18 v5.2.1 Symfony HttpKernel Component symfony/inflector v4.4.18 v5.2.1 Symfony Inflector Component symfony/intl v4.4.18 v5.2.1 A PHP replacement layer for the C intl extension that includes additional data from the ICU library. symfony/mailer v4.4.18 v5.2.1 Symfony Mailer Component symfony/maker-bundle v1.28.0 v1.28.0 Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code. symfony/mime v4.4.18 v5.2.1 A library to manipulate MIME messages symfony/monolog-bridge v4.4.18 v5.2.1 Symfony Monolog Bridge symfony/monolog-bundle v3.6.0 v3.6.0 Symfony MonologBundle symfony/options-resolver v4.4.18 v5.2.1 Symfony OptionsResolver Component symfony/phpunit-bridge v5.2.1 v5.2.1 Symfony PHPUnit Bridge symfony/polyfill-intl-grapheme v1.22.0 v1.22.0 Symfony polyfill for intl's grapheme_* functions symfony/polyfill-intl-icu v1.22.0 v1.22.0 Symfony polyfill for intl's ICU-related data and classes symfony/polyfill-intl-idn v1.22.0 v1.22.0 Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions symfony/polyfill-intl-normalizer v1.22.0 v1.22.0 Symfony polyfill for intl's Normalizer class and related functions symfony/polyfill-mbstring v1.22.0 v1.22.0 Symfony polyfill for the Mbstring extension symfony/polyfill-php72 v1.22.0 v1.22.0 Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions symfony/polyfill-php73 v1.22.0 v1.22.0 Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions symfony/polyfill-php80 v1.22.0 v1.22.0 Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions symfony/process v4.4.18 v5.2.1 Symfony Process Component symfony/property-access v4.4.18 v5.2.1 Symfony PropertyAccess Component symfony/property-info v4.4.18 v5.2.1 Symfony Property Info Component symfony/proxy-manager-bridge v4.4.18 v5.2.1 Symfony ProxyManager Bridge symfony/routing v4.4.18 v5.2.1 Symfony Routing Component symfony/security-acl v3.1.1 v3.1.1 Symfony Security Component - ACL (Access Control List) symfony/security-bundle v4.4.18 v5.2.1 Symfony SecurityBundle symfony/security-core v4.4.18 v5.2.1 Symfony Security Component - Core Library symfony/security-csrf v4.4.18 v5.2.1 Symfony Security Component - CSRF Library symfony/security-guard v4.4.18 v5.2.1 Symfony Security Component - Guard symfony/security-http v4.4.18 v5.2.1 Symfony Security Component - HTTP Integration symfony/serializer v4.4.18 v5.2.1 Symfony Serializer Component symfony/service-contracts v2.2.0 v2.2.0 Generic abstractions related to writing services symfony/stopwatch v4.4.18 v5.2.1 Symfony Stopwatch Component symfony/string v5.2.1 v5.2.1 Symfony String component symfony/translation v4.4.18 v5.2.1 Symfony Translation Component symfony/translation-contracts v2.3.0 v2.3.0 Generic abstractions related to translation symfony/twig-bridge v4.4.18 v5.2.1 Symfony Twig Bridge symfony/twig-bundle v4.4.18 v5.2.1 Symfony TwigBundle symfony/validator v4.4.18 v5.2.1 Symfony Validator Component symfony/var-dumper v4.4.18 v5.2.1 Symfony mechanism for exploring and dumping PHP variables symfony/var-exporter v4.4.18 v5.2.1 A blend of var_export() + serialize() to turn any serializable data structure to plain PHP code symfony/web-link v4.4.18 v5.2.1 Symfony WebLink Component symfony/web-profiler-bundle v4.4.18 v5.2.1 Symfony WebProfilerBundle symfony/yaml v4.4.18 v5.2.1 Symfony Yaml Component ```

PHP version

$ php -v
7.4.11

Subject

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

Steps to reproduce

install latest symfony 4.4 install sonata admin and doctrine-orm-admin-bundle, then: composer require sonata-project/user-bundle

Expected results

should install

Actual results

root@server:/application# composer require sonata-project/user-bundle      
Using version ^4.10 for sonata-project/user-bundle
./composer.json has been updated
Running composer update sonata-project/user-bundle
Loading composer repositories with package information
Restricting packages listed in "symfony/symfony" to "4.4.*"
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - sonata-project/user-bundle[4.10.0, ..., 4.10.1] require doctrine/common ^2.0 -> found doctrine/common[2.1.3, ..., 2.13.3] but the package is fixed to 3.1.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - Root composer.json requires sonata-project/user-bundle ^4.10 -> satisfiable by sonata-project/user-bundle[4.10.0, 4.10.1].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

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

here is my full composer.json:

{
    "type": "project",
    "license": "proprietary",
    "require": {
        "php": ">=7.1.3",
        "ext-ctype": "*",
        "ext-iconv": "*",
        "composer/package-versions-deprecated": "1.11.99.1",
        "doctrine/annotations": "^1.0",
        "doctrine/doctrine-bundle": "^2.2",
        "doctrine/doctrine-migrations-bundle": "^3.0",
        "doctrine/orm": "^2.8",
        "phpdocumentor/reflection-docblock": "^5.2",
        "ramsey/uuid": "^4.1",
        "sensio/framework-extra-bundle": "^5.1",
        "sonata-project/admin-bundle": "^3.88",
        "sonata-project/doctrine-orm-admin-bundle": "^3.27",
        "symfony/asset": "4.4.*",
        "symfony/console": "4.4.*",
        "symfony/dotenv": "4.4.*",
        "symfony/expression-language": "4.4.*",
        "symfony/flex": "^1.3.1",
        "symfony/form": "4.4.*",
        "symfony/framework-bundle": "4.4.*",
        "symfony/http-client": "4.4.*",
        "symfony/intl": "4.4.*",
        "symfony/mailer": "4.4.*",
        "symfony/monolog-bundle": "^3.1",
        "symfony/process": "4.4.*",
        "symfony/property-access": "4.4.*",
        "symfony/property-info": "4.4.*",
        "symfony/proxy-manager-bridge": "4.4.*",
        "symfony/security-bundle": "4.4.*",
        "symfony/serializer": "4.4.*",
        "symfony/translation": "4.4.*",
        "symfony/twig-bundle": "^4.4",
        "symfony/validator": "4.4.*",
        "symfony/web-link": "4.4.*",
        "symfony/yaml": "4.4.*",
        "twig/extra-bundle": "^2.12|^3.0",
        "twig/twig": "^2.12|^3.0"
    },
    "require-dev": {
        "doctrine/doctrine-fixtures-bundle": "^3.4",
        "symfony/browser-kit": "^4.4",
        "symfony/css-selector": "^4.4",
        "symfony/debug-bundle": "^4.4",
        "symfony/maker-bundle": "^1.0",
        "symfony/phpunit-bridge": "^5.2",
        "symfony/stopwatch": "^4.4",
        "symfony/var-dumper": "^4.4",
        "symfony/web-profiler-bundle": "^4.4"
    },
    "config": {
        "preferred-install": {
            "*": "dist"
        },
        "sort-packages": true
    },
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Tests\\": "tests/"
        }
    },
    "replace": {
        "paragonie/random_compat": "2.*",
        "symfony/polyfill-ctype": "*",
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php71": "*",
        "symfony/polyfill-php70": "*",
        "symfony/polyfill-php56": "*"
    },
    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install %PUBLIC_DIR%": "symfony-cmd"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    },
    "conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "allow-contrib": false,
            "require": "4.4.*"
        }
    }
}
ivanhubar commented 3 years ago

Please, fix

VincentLanglet commented 3 years ago

You're free to provide a PR to allow doctrine/common: ^3.0 in the composer json and fix what is needed to be fixed.

ivanhubar commented 3 years ago

doctrine/common: ^3.0

composer require sonata-project/user-bundle        
Using version ^4.10 for sonata-project/user-bundle
./composer.json has been updated
Running composer update sonata-project/user-bundle
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - sonata-project/user-bundle[4.10.0, ..., 4.10.1] require doctrine/common ^2.0 -> found doctrine/common[2.1.3, ..., 2.13.3] but it conflicts with your root composer.json require (^3.0).
    - Root composer.json requires sonata-project/user-bundle ^4.10 -> satisfiable by sonata-project/user-bundle[4.10.0, 4.10.1].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
VincentLanglet commented 3 years ago

Not in your project, in the sonata-project/user-bundle one.

erparom commented 3 years ago

Same here. Php 7.4 Symfony LTS (4.4)

        "doctrine/annotations": "^1.0",
        "doctrine/doctrine-bundle": "^2.2",
        "doctrine/doctrine-migrations-bundle": "^3.0",
        "doctrine/orm": "^2.8",
symfony composer require sonata-project/user-bundle
Using version ^4.10 for sonata-project/user-bundle
./composer.json has been updated
Running composer update sonata-project/user-bundle
Loading composer repositories with package information
Restricting packages listed in "symfony/symfony" to "4.4.*"
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - sonata-project/user-bundle[4.10.0, ..., 4.10.1] require doctrine/common ^2.0 -> found doctrine/common[2.1.3, ..., 2.13.3] but the package is fixed to 3.1.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - Root composer.json requires sonata-project/user-bundle ^4.10 -> satisfiable by sonata-project/user-bundle[4.10.0, 4.10.1].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
unable to run /usr/local/bin/composer require sonata-project/user-bundle: exit status 2