Требования к SonataUserBundle с Symfony 3.3
Я пытаюсь потребовать "sonata-project/user-bundle" с composer, но получаю следующую ошибку:
- sonata-project/user-bundle 3.2.4 requires friendsofsymfony/user-bundle ^1.3 -> satisfiable by friendsofsymfony/user-bundle[1.3.x-dev, v1.3.0, v1.3.1, v1.3.2, v1.3.3, v1.3.4, v1.3.5, v1.3.6, v1.3.7] but these conflict with your requirements or minimum-stability.
- sonata-project/user-bundle 3.2.3 requires friendsofsymfony/user-bundle ^1.3 -> satisfiable by friendsofsymfony/user-bundle[1.3.x-dev, v1.3.0, v1.3.1, v1.3.2, v1.3.3, v1.3.4, v1.3.5, v1.3.6, v1.3.7] but these conflict with your requirements or minimum-stability.
- sonata-project/user-bundle 3.2.2 requires friendsofsymfony/user-bundle ^1.3 -> satisfiable by friendsofsymfony/user-bundle[1.3.x-dev, v1.3.0, v1.3.1, v1.3.2, v1.3.3, v1.3.4, v1.3.5, v1.3.6, v1.3.7] but these conflict with your requirements or minimum-stability.
- sonata-project/user-bundle 3.2.1 requires friendsofsymfony/user-bundle ^1.3 -> satisfiable by friendsofsymfony/user-bundle[1.3.x-dev, v1.3.0, v1.3.1, v1.3.2, v1.3.3, v1.3.4, v1.3.5, v1.3.6, v1.3.7] but these conflict with your requirements or minimum-stability.
- sonata-project/user-bundle 3.2.0 requires friendsofsymfony/user-bundle ^1.3 -> satisfiable by friendsofsymfony/user-bundle[1.3.x-dev, v1.3.0, v1.3.1, v1.3.2, v1.3.3, v1.3.4, v1.3.5, v1.3.6, v1.3.7] but these conflict with your requirements or minimum-stability.
- Installation request for sonata-project/user-bundle ^3.2 -> satisfiable by sonata-project/user-bundle[3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4].
Мой composer.json требует раздел:
"require": {
"php": ">=7.0",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-migrations-bundle": "^1.0",
"doctrine/orm": "^2.5",
"friendsofsymfony/user-bundle": "~2.0",
"gedmo/doctrine-extensions": "^2.4",
"incenteev/composer-parameter-handler": "^2.0",
"pixassociates/sortable-behavior-bundle": "^1.3",
"sensio/distribution-bundle": "^5.0.19",
"sensio/framework-extra-bundle": "^3.0.2",
"sonata-project/admin-bundle": "^3.23",
"sonata-project/doctrine-orm-admin-bundle": "^3.1",
"sonata-project/easy-extends-bundle": "^2.2",
"sonata-project/formatter-bundle": "^3.2",
"stof/doctrine-extensions-bundle": "^1.2",
"symfony/monolog-bundle": "^3.1.0",
"symfony/polyfill-apcu": "^1.0",
"symfony/security-bundle": "^3.3",
"symfony/swiftmailer-bundle": "^2.3.10",
"symfony/symfony": "3.3.*",
"twig/twig": "^1.0||^2.0"
},
На самом деле я не понимаю, почему "sonata-project/user-bundle" требует "friendsofsymfony/user-bundle ^1.3", если Symfony 2.8+ поддерживается только "friendsofsymfony/user-bundle ~2.0" .
Так можно ли использовать Symfony 3.3 с "sonata-project/user-bundle"?
2 ответа
Вы можете, но вы должны использовать ветку 4.x SonataUserBundle, которая все еще находится в стадии разработки (однако уже достаточно стабильной):
"sonata-project/user-bundle": "dev-master",
Более подробная информация о зависимостях от packagist: https://packagist.org/packages/sonata-project/user-bundle
Да, вы должны использовать
"sonata-project/user-bundle": "dev-master",
и вы также должны изменить
"config": {
"platform": {
"php": "7.0"
},
"sort-packages": true
},
в файле composer.json это обязательно сработает