Composer throws [ReflectionException] Fxp \Composer\ AssetPlugin\Repository\NpmRepository不存在 [英] Composer throws [ReflectionException] Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist

查看:432
本文介绍了Composer throws [ReflectionException] Fxp \Composer\ AssetPlugin\Repository\NpmRepository不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了最新的版本(1.0.0。稳定)的作曲家,在我的Yii2项目中,我键入:

I installed the latest version (1.0.0. stable) of composer and in my Yii2 project I typed this:

php composer。 phar update

它给我这个错误:


[ReflectionException] Fxp \Composer\ AssetPlugin\Repository\NpmRepository类不存在

[ReflectionException] Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist




[ErrorException] Fxp \Composer\AssetPlugin\Repository\AbstractAssetsRepository :: whatProvides()的声明应该与Composer\Repository\ComposerRepository :: whatProvides (Composer\DependencyResolver\Pool $ pool,$ name,$ bypassFilters = false)

[ErrorException] Declaration of Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRepository::whatProvides() should be compatible with Composer\Repository\ComposerRepository::whatProvides(Composer\DependencyResolver\Pool $pool, $name, $bypassFilters = false)

有人可以帮我解决这个问题?

Can someone help me how to fix this?

以下是我的composer.json

Here's my composer.json

{
    "name": "yiisoft/yii2-app-advanced",
    "description": "Yii 2 Advanced Project Template",
    "keywords": ["yii2", "framework", "advanced", "project template"],
    "homepage": "http://www.yiiframework.com/",
    "type": "project",
    "license": "BSD-3-Clause",
    "support": {
        "issues": "https://github.com/yiisoft/yii2/issues?state=open",
        "forum": "http://www.yiiframework.com/forum/",
        "wiki": "http://www.yiiframework.com/wiki/",
        "irc": "irc://irc.freenode.net/yii",
        "source": "https://github.com/yiisoft/yii2"
    },
    "minimum-stability": "stable",
    "require": {
        "php": ">=5.4.0",
        "yiisoft/yii2": ">=2.0.6",
        "yiisoft/yii2-bootstrap": "*",
        "yiisoft/yii2-swiftmailer": "*",
        "kartik-v/yii2-widget-fileinput": "@dev",
        "golonka/bbcodeparser": "^2.2"
    },
    "require-dev": {
        "yiisoft/yii2-codeception": "*",
        "yiisoft/yii2-debug": "*",
        "yiisoft/yii2-gii": "*",
        "yiisoft/yii2-faker": "*"
    },
    "config": {
        "process-timeout": 1800
    },
    "extra": {
        "asset-installer-paths": {
            "npm-asset-library": "vendor/npm",
            "bower-asset-library": "vendor/bower"
        }
    }
}


推荐答案

大约九天前, Composer \\ Repository\ComposerRepository :: whatProvides api已更改。 (#2668
因此,如果您已安装 fxp / composer- asset-plugin ,您应该更新它。你可以这样做:

About nine days ago, Composer\Repository\ComposerRepository::whatProvides api changed. (#2668) So, if you have installed fxp/composer-asset-plugin globally, you should update it. You can do that with:

php composer.phar global update fxp/composer-asset-plugin --no-plugins

这篇关于Composer throws [ReflectionException] Fxp \Composer\ AssetPlugin\Repository\NpmRepository不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆