icanhazstring/Composer Unused(全球安装)包含一个作曲家插头
当我尝试从phpstorm运行“作曲家> install”时,我会收到以下错误:
在pluginmanager.php行762中:
icanhazstring/Composer Unused(全球安装)包含作曲家 插件被您的允许 - 包式配置阻止。您可以添加 如果您认为安全的话,请列表。
您可以运行
作曲家全局config -no-plugins允许 - plugins.icanhazstring/composer-unused [true | false]
启用它 (true)或明确禁用其并抑制此异常(false)
参见 https://getcomposer.org/allow-plugins
上面此错误消息的原因是什么?
我尝试运行
/etc/php8/bin/php composer.phar global config --no-plugins allow-plugins.icanhazstrin true
,我还尝试将以下内容添加到composer.json
文件中,
"config": {
"allow-plugins": true,
但我仍然收到相同的错误消息。
我的composer.json
是:
{
"name": "test/version1",
"description":"Test Version 1",
"keywords":[],
"config": {
"allow-plugins": true,
"secure-http":false
},
"scripts": {
"test": "phpunit --config tests/phpunit.xml"
},
"require": {
"php": ">=7.3",
"monolog/monolog": "1.26.*",
...
"require-dev": {
"php": ">=8.1",
"phpunit/phpunit": "^9.5.0",
"friendsofphp/php-cs-fixer": "^2.16",
"icanhazstring/composer-unused": "^0.7.5"
}
}
When I try to run "Composer > Install" from PhpStorm I get the following error:
In PluginManager.php line 762:
icanhazstring/composer-unused (installed globally) contains a Composer
plug in which is blocked by your allow-plugins config. You may add it
to the list if you consider it safe.You can run
composer global config --no-plugins allow-plugins.icanhazstring/composer-unused [true|false]
to enable it
(true) or disable it explicitly and suppress this exception (false)
See https://getcomposer.org/allow-plugins
What might be the reason for this error message above?
I have tried to run
/etc/php8/bin/php composer.phar global config --no-plugins allow-plugins.icanhazstrin true
and I have also tried to add the following to the composer.json
file
"config": {
"allow-plugins": true,
but still I get the same error message.
My composer.json
is something like:
{
"name": "test/version1",
"description":"Test Version 1",
"keywords":[],
"config": {
"allow-plugins": true,
"secure-http":false
},
"scripts": {
"test": "phpunit --config tests/phpunit.xml"
},
"require": {
"php": ">=7.3",
"monolog/monolog": "1.26.*",
...
"require-dev": {
"php": ">=8.1",
"phpunit/phpunit": "^9.5.0",
"friendsofphp/php-cs-fixer": "^2.16",
"icanhazstring/composer-unused": "^0.7.5"
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
运行以下命令
,然后将询问您是否要信任
icanhazstring/composer-unused
。键入y
,然后按Enter按钮。就是这样。然后,如果您转到
/home/yourubuntuusername/.config/composer/
,您将看到另一个带有以下内容的composer.json.json
文件:显然有一种叫做Global Composer的东西软件包
Run the following command
Then it will ask if you want to trust
icanhazstring/composer-unused
. Typey
and press the enter button. That's it.Then if you go to
/home/yourUbuntuUsername/.config/composer/
there you will see anothercomposer.json
file with the following content:Apparently there is something called global Composer packages ????