今天,当我使用作曲家更新来更新项目时,遇到了此错误
问题1
不要安装symfony / symfony v3.4.0 |删除symfony / twig-bundle v4.1.0
symfony / symfony 3.4。*的安装请求可由symfony / symfony满足[v3.4.0,v3.4.1,v3.4.10,v3.4.11,v3.4.12,v3.4.13,v3.4.14 ,v3.4.15,v3.4.16,v3.4.17,v3.4.18,v3.4.19,v3.4.2,v3.4.20,v3.4.21,v3.4.22,v3.4.23,v3.4.3,v3.4.4,v3 .4.5,v3.4.6,v3.4.7,v3.4.8,v3.4.9]。
symfony / twig-bundle的安装请求^ 4.0-> symfony / twig-bundle [v4.0.0,v4.0.1,v4.0.10,v4.0.11,v4.0.12,v4.0.13, v4.0.14,v4.0.15,v4.0.2,v4.0.3,v4.0.4,v4.0.5,v4.0.6,v4.0.7,v4.0.8,v4.0.9,v4.1.0,v4.1.1,v4。 1.10,v4.1.11,v4.1.2,v4.1.3,v4.1.4,v4.1.5,v4.1.6,v4.1.7,v4.1.8,v4.1.9,v4.2.0,v4.2.1,v4.2.2, v4.2.3,v4.2.4]。
composer.json
{
"name": "eolic",
"license": "proprietary",
"type": "project",
"autoload": {
"psr-4": {
"AppBundle\\": "src/AppBundle"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
},
"files": [
"vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php"
]
},
"require": {
"php": ">=5.5.9",
"beberlei/doctrineextensions": "^1.0",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/orm": "^2.5",
"friendsofsymfony/jsrouting-bundle": "^2.2",
"friendsofsymfony/oauth-server-bundle": "dev-master",
"friendsofsymfony/user-bundle": "~2.0",
"incenteev/composer-parameter-handler": "^2.0",
"sensio/distribution-bundle": "^5.0.19",
"sensio/framework-extra-bundle": "^5.0.0",
"symfony/apache-pack": "^1.0",
"symfony/monolog-bundle": "^3.1.0",
"symfony/polyfill-apcu": "^1.0",
"symfony/swiftmailer-bundle": "^2.6.4",
"symfony/symfony": "3.4.*",
"symfony/templating": "^4.0",
"symfony/twig-bundle": "^4.0",
"twig/twig": "~1.34|~2.4"
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0"
},
"scripts": {
"symfony-scripts": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"post-install-cmd": [
"@symfony-scripts"
],
"post-update-cmd": [
"@symfony-scripts"
]
},
"config": {
"sort-packages": true
},
"extra": {
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": null
}
非常感谢
答案 0 :(得分:0)
您指定的版本彼此不兼容。在这种情况下,它是symfony / symfony 3.4版,以及symfony / twig和symfony / templated with 4.0。那可能行不通。您的项目symfony 4准备好了吗?然后使用symfony / symfony ^ 4.0或symfony / flex ^ 1.2(如果您的项目结构已准备好symfony-flex)。如果您的项目在Symfony 3中不推荐使用,请对树枝和模板使用^ 3.4版本约束。
编辑:我还认为Symfony 4需要php> = 7,因此,如果要使用Symfony 4,则可能也必须更新它。