如何从Laravel使用composer删除一个包? [英] How to remove a package from Laravel using composer?

查看:6758
本文介绍了如何从Laravel使用composer删除一个包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从Laravel 4中删除软件包的正确方法是什么?
所以我试过了:

What is the right way to remove a package from Laravel 4? So long I've tried:


  1. composer.json中删除声明
  2. app.php li>从我的代码中删除对程序包的任何引用: - )
  3. 运行 composer update

  4. 运行 composer dump-autoload

  1. Remove declaration from composer.json (in "require" section)
  2. Remove any Class Aliases from app.php
  3. Remove any references to the package from my code :-)
  4. Run composer update
  5. Run composer dump-autoload

我缺少某些东西?

一些软件包通过artisan config:publish ...发布配置。

Some packages publish their configuration via "artisan config:publish ...". Is there a way to "unpublish" them?

推荐答案

运行以下命令将从供应商包),composer.json和composer.lock。适当更改供应商/包。

Running the following command will remove the package from vendor (or wherever you install packages), composer.json and composer.lock. Change vendor/package appropriately.

composer remove vendor/package

很明显,您需要在应用程序中删除对该包的引用。

Obviously you'll need to remove references to that package within your app.

我目前正在运行以下版本的作曲家:

I'm currently running the following version of composer:

Composer version 1.0-dev (7b13507dd4d3b93578af7d83fbf8be0ca686f4b5) 2014-12-11 21:52:29

这篇关于如何从Laravel使用composer删除一个包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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