我只是想用PHP 5.6的服務器上安裝我的Symfony 3.2的應用程序,並且composer install
告訴我twig/twig v2.0.0 requires php ^7.0 -> your PHP version (5.6.22) does not satisfy that requirement.
Symfony的3.2:樹枝/樹枝V2.0.0需要PHP^7.0
我怎樣才能改變樹枝版本在我的應用程序中使用?據我所知,Symfony使用樹枝束(https://packagist.org/packages/symfony/twig-bundle)。
我是否需要在較低版本(哪一個?)中添加symfony/twig-bundle,或者是否需要將我的composer.json require部分添加到twig/twig v1.31.0?
UPDATE:
我composer.json
:
{
"name": "...",
"license": "proprietary",
"type": "project",
"autoload": {
"psr-4": {
"": "src/"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"require": {
"php": ">=5.5.9",
"symfony/symfony": "3.2.*",
"twig/twig": "1.31.*",
"doctrine/orm": "^2.5",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"symfony/swiftmailer-bundle": "^2.3",
"symfony/monolog-bundle": "^3.0",
"symfony/polyfill-apcu": "^1.0",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "^2.0",
"javiereguiluz/easyadmin-bundle": "^1.16",
"doctrine/doctrine-fixtures-bundle": "^2.3",
"symfony/dom-crawler": "^3.2"
},
"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"
]
},
"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
}
}
我的命令:
你可以在這裏發佈你的'composer.json'文件嗎? –
@TomaszMadeyski我做了:) – meandeveloper111