我尝试将新软件包安装到项目中,但出现此错误:
问题1 -symfony / var-dumper [v3.4.22]可以满足所请求的软件包symfony / var-dumper(锁定在v3.4.22,要求为^4.3@dev),但它们与您的要求或最低稳定性相冲突。 问题2 -symfony / symfony的安装请求未设置版本(解析为1.0.0)-> symfony / symfony可以满足[未设置版本(解析为1.0.0)]。 -cmen / google-charts-bundle dev-master需要symfony / framework-bundle ^ 2.7 || ^ 3.0 || ^ 4.0-> symfony / framework-bundle [v3.4.22,2.7.x-dev,2.8.x-dev,3.0.x-dev,3.1.x-dev,3.2.x-dev,3.3.x-开发人员,3.4.x开发人员,4.0.x开发人员,4.1.x开发人员,4.2.x开发人员,4.3.x开发人员
.....
不要安装symfony / framework-bundle 2.7.x-dev |删除 symfony / symfony未设置版本(解析为1.0.0)
然后我尝试更新,但收到相同的错误消息。我对作曲家所做的任何事情都会给我同样的错误。
这是我的composer.json文件:
{
"name": "symfony/symfony",
"type": "library",
"description": "The Symfony PHP framework",
"keywords": ["framework"],
"homepage": "https://symfony.com",
"license": "MIT",
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"require": {
"php": "^7.1.3",
"ext-xml": "*",
"doctrine/collections": "~1.0",
"doctrine/event-manager": "~1.0",
"doctrine/persistence": "~1.0",
"fig/link-util": "^1.0",
"twig/twig": "^1.35|^2.4.4",
"psr/cache": "~1.0",
"psr/container": "^1.0",
"psr/link": "^1.0",
"psr/log": "~1.0",
"psr/simple-cache": "^1.0",
"symfony/contracts": "^1.0.2",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-intl-icu": "~1.0",
"symfony/polyfill-intl-idn": "^1.10",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php72": "~1.5",
"sensio/framework-extra-bundle": "^5.2",
"symfony/flex": "^1.2",
"symfony/asset": "^4.2",
"symfony/form": "^4.2",
"symfony/validator": "^4.2",
"symfony/orm-pack": "^1.0",
"symfony/dotenv": "^4.2",
"symfony/polyfill-php73": "^1.8",
"mukadi/chartjs-builder": "dev-master",
"cmen/google-charts-bundle": "dev-master"
},
"replace": {
"symfony/asset": "self.version",
"symfony/browser-kit": "self.version",
"symfony/cache": "self.version",
"symfony/config": "self.version",
"symfony/console": "self.version",
"symfony/css-selector": "self.version",
"symfony/dependency-injection": "self.version",
"symfony/debug": "self.version",
"symfony/debug-bundle": "self.version",
"symfony/doctrine-bridge": "self.version",
"symfony/dom-crawler": "self.version",
"symfony/dotenv": "self.version",
"symfony/event-dispatcher": "self.version",
"symfony/expression-language": "self.version",
"symfony/filesystem": "self.version",
"symfony/finder": "self.version",
"symfony/form": "self.version",
"symfony/framework-bundle": "self.version",
"symfony/http-foundation": "self.version",
"symfony/http-kernel": "self.version",
"symfony/inflector": "self.version",
"symfony/intl": "self.version",
"symfony/ldap": "self.version",
"symfony/lock": "self.version",
"symfony/messenger": "self.version",
"symfony/mime": "self.version",
"symfony/monolog-bridge": "self.version",
"symfony/options-resolver": "self.version",
"symfony/process": "self.version",
"symfony/property-access": "self.version",
"symfony/property-info": "self.version",
"symfony/proxy-manager-bridge": "self.version",
"symfony/routing": "self.version",
"symfony/security": "self.version",
"symfony/security-core": "self.version",
"symfony/security-csrf": "self.version",
"symfony/security-guard": "self.version",
"symfony/security-http": "self.version",
"symfony/security-bundle": "self.version",
"symfony/serializer": "self.version",
"symfony/stopwatch": "self.version",
"symfony/templating": "self.version",
"symfony/translation": "self.version",
"symfony/twig-bridge": "self.version",
"symfony/twig-bundle": "self.version",
"symfony/validator": "self.version",
"symfony/var-dumper": "self.version",
"symfony/var-exporter": "self.version",
"symfony/web-link": "self.version",
"symfony/web-profiler-bundle": "self.version",
"symfony/web-server-bundle": "self.version",
"symfony/workflow": "self.version",
"symfony/yaml": "self.version"
},
"require-dev": {
"cache/integration-tests": "dev-master",
"doctrine/annotations": "~1.0",
"doctrine/cache": "~1.6",
"doctrine/data-fixtures": "1.0.*",
"doctrine/dbal": "~2.4",
"doctrine/orm": "~2.4,>=2.4.5",
"doctrine/reflection": "~1.0",
"doctrine/doctrine-bundle": "~1.4",
"monolog/monolog": "~1.11",
"ocramius/proxy-manager": "~0.4|~1.0|~2.0",
"predis/predis": "~1.1",
"egulias/email-validator": "~1.2,>=1.2.8|~2.0",
"symfony/phpunit-bridge": "~3.4|~4.0",
"symfony/security-acl": "~2.8|~3.0",
"symfony/profiler-pack": "^1.0",
"symfony/maker-bundle": "^1.11",
"phpdocumentor/reflection-docblock": "^3.0|^4.0",
"symfony/var-dumper": "^4.3@dev"
},
"conflict": {
"phpdocumentor/reflection-docblock": "<3.0||>=3.2.0,<3.2.2",
"phpdocumentor/type-resolver": "<0.3.0",
"phpunit/phpunit": "<5.4.3"
},
"autoload": {
"psr-4": {
"Symfony\\Bridge\\Doctrine\\": "src/Symfony/Bridge/Doctrine/",
"Symfony\\Bridge\\Monolog\\": "src/Symfony/Bridge/Monolog/",
"Symfony\\Bridge\\ProxyManager\\": "src/Symfony/Bridge/ProxyManager/",
"Symfony\\Bridge\\Twig\\": "src/Symfony/Bridge/Twig/",
"Symfony\\Bundle\\": "src/Symfony/Bundle/",
"Symfony\\Component\\": "src/Symfony/Component/"
},
"classmap": [
"src/Symfony/Component/Intl/Resources/stubs"
],
"exclude-from-classmap": [
"**/Tests/"
]
},
"autoload-dev": {
"files": [ "src/Symfony/Component/VarDumper/Resources/functions/dump.php" ]
},
"repositories": [
{
"type": "path",
"url": "src/Symfony/Contracts"
}
],
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "4.3-dev"
}
}
}
我可能在某个时候打破了它,但是我绝对不知道如何解决这个问题。你有什么线索吗?
=>编辑:它必须来自json文件。我删除了供应商文件夹和composer.lock,安装了新版本的composer,并且遇到了同样的问题。也许我搬了一些我不知道的东西
=> Edit2:取消所有“替换”行,现在我有了:
使用版本^1.5@dev作为树枝/扩展名./composer.json已经 使用软件包信息更新了Loading Composer存储库 更新依赖关系(包括require-dev)您的需求可以 不能解析为一组可安装的软件包。
问题1 -结论:请勿安装doctrine / event-manager 1.0.x-dev -结论:请勿安装doctrine / event-manager 1.0.x-dev -原则/事件管理器v1.0.0与原则/公共[v2.7.3]冲突。 -原则/事件管理器v1.0.0与原则/公共[v2.7.3]冲突。 -教义/事件管理器〜1.0的安装请求->教义/事件管理器[1.0.x-dev,v1.0.0]可满足。 -教义/通用的安装要求(安装在v2.7.3)->教义/通用的安装要求[v2.7.3]。
安装失败,将./composer.json恢复为原始状态 内容。