不更新特定的程序包 [英] Do not update a specific package
问题描述
是否有一种方法可以告诉作曲家,每次我执行作曲家更新
时,我都希望他忽略特定的软件包吗?
Is there a way to tell composer that each time I do a composer update
I want him to ignore a specific package?
推荐答案
实际上,我不知道是否有任何办法告诉 composer
从更新中排除一个特定程序包,但您可以将哪些软件包更新为
Actually I don't know if there is any way to tell composer
to exclude one specific package from updating but you can tell which packages to update as
composer update <package> <package2>; // or
php composer.phar update <package> <package2>;
例如,
composer update foo/package1 bar/package2; // or
php composer.phar update foo/package1 bar/package2;
此外,我想,如果您未在撰写者中列出它们。 json
(安装后删除),除非在列表中也指定,否则它们不会被更新。
Also, I think, if you don't list them in composer.json
(remove after installation) by yourself, then they will not be updated unless also specified in the list.
来自Composer:
如果您只想安装或更新一个依赖项,则可以将它们列入白名单。
From Composer: If you only want to install or update one dependency, you can whitelist them:
$ php composer.phar update monolog/monolog [...]
更新:(可在互联网上找到,但未经测试)
Update : (found on internet but not tested)
要这样做,只需从 composer.lock
这篇关于不更新特定的程序包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!