如何从Laravel使用composer删除一个包? [英] How to remove a package from Laravel using composer?
本文介绍了如何从Laravel使用composer删除一个包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
从Laravel 4中删除软件包的正确方法是什么?
所以我试过了:
What is the right way to remove a package from Laravel 4? So long I've tried:
- 从
composer.json中删除声明$ c $
- 运行
composer update
- 运行
composer dump-autoload
从
app.php
li>从我的代码中删除对程序包的任何引用: - ) - Remove declaration from
composer.json
(in "require" section) - Remove any Class Aliases from
app.php
- Remove any references to the package from my code :-)
- Run
composer update
- 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屋!
查看全文