使用 composer 安装时出错 phpoffice/phpspreadsheet
Error installation phpoffice/phpspreadsheet with composer
我尝试使用此命令安装特定的电子表格库:
composer require phpoffice/phpspreadsheet:1.8.2(因为我有Php5版本)
我有这个错误:
无法将您的要求解析为一组可安装的软件包。
问题 1
- symfony/symfony is locked to version v3.4.10 and an update of this package was not requested.
- Only one of these can be installed: symfony/twig-bundle[v3.4.26], symfony/symfony[v3.4.10]. symfony/symfony replaces symfony/twig-bundle and thus cannot coexist with it.
- symfony/twig-bundle is locked to version v3.4.26 and an update of this package was not requested.
我的composer.json:
{
"姓名": "symfony/framework-standard-edition",
“许可证”:“麻省理工学院”,
“类型”:“项目”,
"description": ""Symfony Standard Edition" 发行版,
“自动加载”:{
“psr-4”:{
“”:“源/”
},
“类图”:[“app/AppKernel。php”,“app/AppCache。php”]
},
“自动加载开发”:{
“psr-4”:{“AppBundle\Tests\”:“测试/”},
“文件”:[“vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump。php”]
},
“要求”: {
"php": ">=5.5.9",
"beberlei/doctrineextensions": "1.1.9",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-migrations-bundle": "^1.3",
"doctrine/orm": "^2.5",
"incenteev/composer-parameter-handler": "^2.0",
"paragonie/random_compat": "~1.3",
"phpseclib/phpseclib": "^2.0",
"ramsey/uuid": "^3.8",
"sensio/distribution-bundle": "^5.0.19",
"sensio/framework-extra-bundle": "^5.0.0",
"symfony/assetic-bundle": "^2.8",
"symfony/monolog-bundle": "^3.1.0",
"symfony/polyfill-apcu": "^1.0",
"symfony/symfony": "3.4.10",
"symfony/translation": "^3.4",
"symfony/twig-bundle": "3.4.26",
"symfony/validator": "^3.4",
"theodo-evolution/legacy-wrapper-bundle": "^1.2",
"theodo-evolution/session-bundle": "^1.0",
"twig/twig": "^1.0||^2.0"
},
“需要开发”:{
"phpunit/phpunit": "^5.7.27",
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0"
},
“脚本”:{
“symfony 脚本”:[
“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-安装命令”:[
“@symfony-脚本”
],
“post-更新命令”:[
“@symfony-脚本”
]
},
“配置”:{
“平台”: {
"php": "5.6"
},
“排序包”:是的
},
“额外的”: {
"symfony-app-dir": "应用程序",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "网络",
"symfony-tests-dir": "测试",
"symfony-assets-install": "相对",
“激励参数”:{
“文件”:“app/config/parameters.yml”
},
“分支别名”:{
“开发大师”:“3.4-开发”
}
}
}
有人有想法吗?
symfony/symfony
是一个包含 Symfony 框架的 所有 组件的包。这也包含 symfony/twig-bundle
。无需安装这两个软件包,因此您可以安全地删除 symfony/twig-bundle
。之后,应该可以添加任何你想添加的包
我尝试使用此命令安装特定的电子表格库:
composer require phpoffice/phpspreadsheet:1.8.2(因为我有Php5版本)
我有这个错误:
无法将您的要求解析为一组可安装的软件包。
问题 1
- symfony/symfony is locked to version v3.4.10 and an update of this package was not requested.
- Only one of these can be installed: symfony/twig-bundle[v3.4.26], symfony/symfony[v3.4.10]. symfony/symfony replaces symfony/twig-bundle and thus cannot coexist with it.
- symfony/twig-bundle is locked to version v3.4.26 and an update of this package was not requested.
我的composer.json:
{ "姓名": "symfony/framework-standard-edition", “许可证”:“麻省理工学院”, “类型”:“项目”, "description": ""Symfony Standard Edition" 发行版, “自动加载”:{ “psr-4”:{ “”:“源/” }, “类图”:[“app/AppKernel。php”,“app/AppCache。php”] }, “自动加载开发”:{ “psr-4”:{“AppBundle\Tests\”:“测试/”}, “文件”:[“vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump。php”] }, “要求”: { "php": ">=5.5.9", "beberlei/doctrineextensions": "1.1.9", "doctrine/doctrine-bundle": "^1.6", "doctrine/doctrine-migrations-bundle": "^1.3", "doctrine/orm": "^2.5", "incenteev/composer-parameter-handler": "^2.0", "paragonie/random_compat": "~1.3", "phpseclib/phpseclib": "^2.0", "ramsey/uuid": "^3.8", "sensio/distribution-bundle": "^5.0.19", "sensio/framework-extra-bundle": "^5.0.0", "symfony/assetic-bundle": "^2.8", "symfony/monolog-bundle": "^3.1.0", "symfony/polyfill-apcu": "^1.0", "symfony/symfony": "3.4.10", "symfony/translation": "^3.4", "symfony/twig-bundle": "3.4.26", "symfony/validator": "^3.4", "theodo-evolution/legacy-wrapper-bundle": "^1.2", "theodo-evolution/session-bundle": "^1.0", "twig/twig": "^1.0||^2.0" }, “需要开发”:{ "phpunit/phpunit": "^5.7.27", "sensio/generator-bundle": "^3.0", "symfony/phpunit-bridge": "^3.0" }, “脚本”:{ “symfony 脚本”:[ “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-安装命令”:[ “@symfony-脚本” ], “post-更新命令”:[ “@symfony-脚本” ] }, “配置”:{ “平台”: { "php": "5.6" }, “排序包”:是的 }, “额外的”: { "symfony-app-dir": "应用程序", "symfony-bin-dir": "bin", "symfony-var-dir": "var", "symfony-web-dir": "网络", "symfony-tests-dir": "测试", "symfony-assets-install": "相对", “激励参数”:{ “文件”:“app/config/parameters.yml” }, “分支别名”:{ “开发大师”:“3.4-开发” } } }
有人有想法吗?
symfony/symfony
是一个包含 Symfony 框架的 所有 组件的包。这也包含 symfony/twig-bundle
。无需安装这两个软件包,因此您可以安全地删除 symfony/twig-bundle
。之后,应该可以添加任何你想添加的包