composer安装自动加载失败



在第一个composer安装命令上(就在克隆项目之后(,我得到了以下错误:

Generating autoload files
[ErrorException]
Undefined index: vulnerabilities

再加上一些细节,我得到了这个:

Generating autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
Downloading https://flex.symfony.com/p/symfony,polyfill-php80,iv1.22.1,1610038173;jean85,pretty-package-versions,i1.6.0,1612455616;symfony,lock,iv4.2.12,1561965886

[ErrorException]                  
Undefined index: vulnerabilities  

Exception trace:
() at /var/www/bridge-landwehr/vendor/symfony/flex/src/Downloader.php:144
ComposerUtilErrorHandler::handle() at /var/www/bridge-landwehr/vendor/symfony/flex/src/Downloader.php:144
SymfonyFlexDownloader->getRecipes() at /var/www/bridge-landwehr/vendor/symfony/flex/src/Flex.php:589
SymfonyFlexFlex->fetchRecipes() at /var/www/bridge-landwehr/vendor/symfony/flex/src/Flex.php:313
SymfonyFlexFlex->update() at /var/www/bridge-landwehr/vendor/symfony/flex/src/Flex.php:299
SymfonyFlexFlex->install() at n/a:n/a
call_user_func() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:176
ComposerEventDispatcherEventDispatcher->doDispatch() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:96
ComposerEventDispatcherEventDispatcher->dispatchScript() at phar:///usr/local/bin/composer/src/Composer/Installer.php:324
ComposerInstaller->run() at phar:///usr/local/bin/composer/src/Composer/Command/InstallCommand.php:121
ComposerCommandInstallCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:245
SymfonyComponentConsoleCommandCommand->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:835
SymfonyComponentConsoleApplication->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:185
SymfonyComponentConsoleApplication->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:258
ComposerConsoleApplication->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:117
SymfonyComponentConsoleApplication->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:104
ComposerConsoleApplication->run() at phar:///usr/local/bin/composer/bin/composer:56
require() at /usr/local/bin/composer:24

这似乎是symfony/flex的问题。因为当我检查文件下载时:https://flex.symfony.com/p/symfony,polyfill-hp80,iv1.22.11610038173;jean85,漂亮的套装版本,i1.6.01612455616;symfony,lock,iv4.2.121561965886,其中没有密钥";漏洞";

如果我再次运行composer安装程序,就没有问题。有人知道为什么吗?

1.8.0 中的composer版本

我突然出现了同样的错误,没有明显的原因。我试着找到罪魁祸首,但时间太长了。

我通过升级软件包修复了它。

1-尝试将composer从版本1升级到版本2(2.0.13适用于我(。

//Check your composer version 
composer -v

2-确保完全升级到Symfony 4.4.*(在我的情况下,某些组件的版本是4.2-4.3(请执行以下步骤:https://symfony.com/doc/current/setup/upgrade_minor.html

Symfony flex 1.12.2版本适用于我的Symfony 4.4

我之前以为4.4会让我崩溃,但事实并非如此。我的错误是之前尝试升级到4.3。跳过那个!

4.4也支持到2022年11月,与V4中的其他次要版本不同。

相关内容

  • 没有找到相关文章

最新更新