【问题标题】:Issue with composer update作曲家更新问题
【发布时间】:2016-09-07 18:31:46
【问题描述】:

我尝试运行“php composer.phar update”,但出现此错误:

Key extra is a duplicate in ./composer.json at line 94
ComposerHookHandler::onPreUpdate
Deprecation Notice: The Composer\Package\LinkConstraint\VersionConstraint class is deprecated, use Composer\Semver\Constraint\Constraint instead. in phar:///home/budrysl2/domains/westeros.com.pl/public_html/composer.phar/src/Composer/Package/LinkConstraint/VersionConstraint.php:17

Deprecation Notice: The Composer\Package\LinkConstraint\LinkConstraintInterface interface is deprecated, use Composer\Semver\Constraint\ConstraintInterface instead. in phar:///home/budrysl2/domains/westeros.com.pl/public_html/composer.phar/src/Composer/Package/LinkConstraint/LinkConstraintInterface.php:17

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- The requested package mediawiki/mediawiki-codesniffer 0.5.0 is satisfiable by mediawiki/mediawiki-codesniffer[v0.5.0] but these conflict with your requirements or minimum-stability.
Problem 2
- The requested package mediawiki/mediawiki-codesniffer 0.5.0 is satisfiable by mediawiki/mediawiki-codesniffer[v0.5.0] but these conflict with your requirements or minimum-stability.
Problem 3
- The requested package mediawiki/mediawiki-codesniffer 0.4.0 is satisfiable by mediawiki/mediawiki-codesniffer[v0.4.0] but these conflict with your requirements or minimum-stability.
Problem 4
- The requested package mediawiki/mediawiki-codesniffer 0.4.0 is satisfiable by mediawiki/mediawiki-codesniffer[v0.4.0] but these conflict with your requirements or minimum-stability.

我在 westeros.com.pl 上的 MediaWiki 页面上使用它

有人可以帮我吗?

【问题讨论】:

  • 请发布您的 composer.json 文件。问题出在它里面
  • 你可以在这里找到我的 comoser.json 文件:westeros.com.pl/composer.txt
  • 您的 json 文件中有错误 - 您有重复的额外部分。 Composer 无法完全解码您的配置,因此失败并出现错误。
  • 那么我应该合并那些额外的部分吗?
  • 我认为是的。这必须解决您的问题

标签: php json symfony composer-php


【解决方案1】:

除了重复的"merge-plugin" 键之外,您的composer.json 是正确的,并且可以在我的设置中正常安装:

Generating optimized autoload files
Key merge-plugin is a duplicate in ./composer.json at line 92
Class ComposerHookHandler is not autoloadable, can not call pre-update-cmd script
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating optimized autoload files
$

也许之前的某个包依赖项有问题?

【讨论】:

  • 我之前不确定依赖项的问题?如何检查?如何更新它们?
  • 如果您现在在文件上运行composer update,它应该可以正常工作
猜你喜欢
  • 2016-08-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-04-19
  • 2015-12-01
  • 2015-09-11
  • 2014-12-22
相关资源
最近更新 更多