1、更新一下list
PS C:\php> pear list-upgrades;
Connection to `ssl://pear.php.net:443′ failed: Unable to find the socket transport “ssl” – did you forget to enable it when you configured PHP?
2、出现php未开启ssl,到php.ini中打开ssl;
3、重新更新一下list
PS C:\php> pear list-upgrades
WARNING: channel “pear.php.net” has updated its protocols, use “pear channel-update pear.php.net” to update
4、提示channel有更新,更新一下channel
PS C:\php> pear channel-update pear.php.net
Updating channel “pear.php.net”
Update of Channel “pear.php.net” succeeded
5、再尝试upgrade
PS C:\php> pear list-upgrades
Channel pear.php.net: No upgrades available
6、安装你需要的扩展,例如phpcs
PS C:\php> pear install PHP_CodeSniffer-3.4.2
downloading PHP_CodeSniffer-3.4.2.tgz …
Starting to download PHP_CodeSniffer-3.4.2.tgz (637,880 bytes)
………………………………………………………………………………………………………………..done: 637,880 bytes
install ok: channel://pear.php.net/PHP_CodeSniffer-3.4.2
看吧~成功了
发表回复