沃梦达 / 编程问答 / php问题 / 正文

无法在 YII2 中通过 Composer 安装任何软件包

Unable to install any package by composer in YII2(无法在 YII2 中通过 Composer 安装任何软件包)

本文介绍了无法在 YII2 中通过 Composer 安装任何软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 YII2 中通过 composer 安装包库.但是从我的命令提示符运行命令后,我收到以下错误

我的作曲家命令是

composer.phar 需要 kartik-v/yii2-widget-datetimepicker *";

<块引用>

yiisoft/yii2-codeception 包已废弃,请避免使用.改用 codeception/codeception.

通过此命令安装时

php composer.phar 需要 kartik-v/yii2-social @dev"

然后我收到以下错误

<块引用>

facebook/php-sdk-v4 包已弃用,请避免使用.改用 facebook/graph-sdk.

生成自动加载文件

请建议我如何解决此错误

解决方案

这不是错误.这只是 Composer 为您提供的信息,其中一个必需的软件包已被放弃,您不应期望获得更新.

如果您想删除此信息,只需从项目的 composer.json 文件中删除提到的包.如果该软件包未在此处列出,则意味着列出的必需软件包之一需要它作为依赖项,因此您无法直接将其删除.

至于 Yii 2 - 这里是 当前高级项目模板的 composer.json 以便您可以更新项目中的那个 - 包 yiisoft/yii2-codeception 不再使用.

I am trying to install package library by composer in YII2. But after running the command from my command prompt I am getting following error

My composer command is

composer.phar require kartik-v/yii2-widget-datetimepicker "*"

Package yiisoft/yii2-codeception is abandoned, you should avoid using it. Use codeception/codeception instead.

When installing by this command

php composer.phar require kartik-v/yii2-social "@dev"

Then I am getting following error

Package facebook/php-sdk-v4 is abandoned, you should avoid using it. Use facebook/graph-sdk instead.

Generating autoload files

Please suggest me how can I resolve this error

解决方案

This is not an error. This is just an information for you from composer that one of the required packages has been abandoned and you should not expect to get updates for it.

If you want to get rid of this information simply remove the mentioned packages from the composer.json file of your project. If the package is not listed there it means that one of the required packages listed needs it as dependency so you can not remove it directly.

As for the Yii 2 - here is the current advanced project template's composer.json so you can update the one in your project - package yiisoft/yii2-codeception is no longer used.

这篇关于无法在 YII2 中通过 Composer 安装任何软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:无法在 YII2 中通过 Composer 安装任何软件包

基础教程推荐