Composer 2.2 在使用 7.3 以下的 PHP 时会出现错误,但无论如何都不需要它

问题描述 投票:0回答:1

在 CentOS 7 上(公司框,因此无法更改)。 Laravel 构建上周停止与 Composer 1 一起工作。 升级到Composer 2.3并升级到PHP 7.3。 开始得到以下信息:

“7.3.0 以下的 PHP 版本不支持使用curl 连接到安全代理。”

这令人困惑,因为 7.3 已安装并确认作曲家正在使用它。

假设问题实际上是CURL版本(有7.29、7.5支持安全curl),所以安装了支持PHP的Composer 2.2 < 7.3.

但现在遇到同样的错误: “低于 7.3.0 的 PHP 版本不支持使用curl 连接到安全代理。”

这令人困惑,因为 Composer 2.2 不需要 PHP 7.3

作曲家诊断的输出:

$ composer diagnose
Checking composer.json: WARNING
require.tymon/jwt-auth : exact version constraints (1.0.0-rc.5) should be avoided if the package follows semantic versioning
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: FAIL
[Composer\Downloader\TransportException] Connecting to a secure proxy using curl is not supported on PHP versions below 7.3.0.
Checking https connectivity to packagist: FAIL                                                                                                                                                 
[Composer\Downloader\TransportException] Connecting to a secure proxy using curl is not supported on PHP versions below 7.3.0.                                                                 
Checking HTTP proxy: FAIL                                                                                                                                                                      
[Composer\Downloader\TransportException] Connecting to a secure proxy using curl is not supported on PHP versions below 7.3.0.                                                                 
Checking github.com rate limit: FAIL                                                                                                                                                           
[Composer\Downloader\TransportException] Connecting to a secure proxy using curl is not supported on PHP versions below 7.3.0.                                                                 
Checking disk free space: OK                                                                                                                                                                   
Checking pubkeys:                                                                                                                                                                              
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642                                                                                          
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952                                                                                           
OK                                                                                                                                                                                             
Checking composer version: FAIL
[Composer\Downloader\TransportException] Connecting to a secure proxy using curl is not supported on PHP versions below 7.3.0.
Composer version: 2.2.2
PHP version: 7.3.33
PHP binary path: /usr/bin/php
OpenSSL version: OpenSSL 1.0.2k  26 Jan 2017
cURL version: 7.29.0 libz 1.2.7 ssl NSS/3.53.1
zip: extension present, unzip present, 7-Zip not available

有人能解释一下吗?我已经死在构建的水里了。

谢谢

CentOS 7,企业代理背后

php composer-php centos7 laravel-6
1个回答
0
投票

虽然 Composer 2.2 支持 PHP 7.2,但需要 cURL 7.52。 CentOS 7 使用 cURL 7.29。 放弃尝试使用 Composer 2.2 来避免 CentOS 7 上的 cURL 更新

© www.soinside.com 2019 - 2024. All rights reserved.