SonataUserBundle是否与Symfony 3.3兼容。*?

时间:2018-01-09 05:54:13

标签: symfony sonata-user-bundle

我正在使用Symfony 3.3,我不确定Sonata User Bundle是否与symfony 3.3兼容,请告诉我任何一个。

我看到有人在讨论与Symfony 3.3的兼容性问题,但我不记得看到明确的回应。有没有更新?

提前致谢

编辑:

我在安装奏鸣曲用户包后使用的是php 5.6和symfony 3.3我收到了这些错误:

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

Problem 1
- sonata-project/user-bundle 3.6.0 requires php ^5.6 || ^7.0 -> your PHP version (5.6.21) overridden by "config.platform.php" version (5.5.9) does not satisfy that requirement.
- sonata-project/user-bundle 3.5.0 requires php ^5.6 || ^7.0 -> your PHP version (5.6.21) overridden by "config.platform.php" version (5.5.9) does not satisfy that requirement.
- sonata-project/user-bundle 3.4.0 requires php ^7.1 -> your PHP version (5.6.21) overridden by "config.platform.php" version (5.5.9) does not satisfy that requirement.
- Conclusion: remove symfony/symfony v3.3.15
- Conclusion: don't install symfony/symfony v3.3.15

我的composer.json文件:

"require": {
    "php": ">=5.5.9",
    "doctrine/doctrine-bundle": "^1.6",
    "doctrine/orm": "^2.5",
    "friendsofsymfony/rest-bundle": "^2.3",
    "incenteev/composer-parameter-handler": "^2.0",
    "nelmio/api-doc-bundle": "^2.13",
    "sensio/distribution-bundle": "^5.0.19",
    "sensio/framework-extra-bundle": "^3.0.2",
    "sonata-project/doctrine-orm-admin-bundle": "^3.1",
    "sonata-project/user-bundle": "^3.3",
    "symfony/monolog-bundle": "^3.1.0",
    "symfony/polyfill-apcu": "^1.0",
    "symfony/swiftmailer-bundle": "^2.3.10",
    "symfony/symfony": "3.3.*",
    "twig/twig": "^1.0||^2.0"
},

我不会移动php 7.1或symfony 2.8。在奏鸣曲用户包中有没有任何关于php 5.6和symfony3.3的方法

2 个答案:

答案 0 :(得分:2)

只需查看composer.json file in SonataUserBundle

即可

正如您在链接中看到的那样,这些是要求

"symfony/console": "^2.8 || ^3.2 || ^4.0",
"symfony/form": "^2.8 || ^3.2 || ^4.0",
"symfony/http-foundation": "^2.8 || ^3.2 || ^4.0",
"symfony/security-acl": "^2.8 || ^3.0",
"symfony/security-core": "^2.8 || ^3.2 || ^4.0",
"symfony/translation": "^2.8 || ^3.2 || ^4.0"

因此,分支4.x适用于symfony 3.3 whereas branch 3.x isn't

为了将SonataUserBundle与sf3.3一起使用,您应该更新到此捆绑包的4.x(如果您尚未使用它)

答案 1 :(得分:0)

“ config”:{“ bin-dir”:“ bin”,“ platform”:{“ php”:“ 7.1.3”}    }

您只需要在composer.json文件中更改此内容