composer require psr/container ^1.1.1 php-di/php-di ^6 doctrine/annotations ^1.14
后再安装其他依赖发生报错Fatal error: Uncaught TypeError: fclose(): Argument #1 ($stream) must be of type resource, bool given in phar://D:/Soft/Composer/composer.phar/vendor/symfony/process/Pipes/WindowsPipes.php:71
是否是在安装依赖后导致Composer的包出现错误?不知道大佬们有遇到这种情况没?
如果遇到相似的问题建议先升级Composer:
composer self-update
, 实在不行再进行卸载操作!
1、删除Composer
> where composer
C:\Users\Administrator\AppData\Local\ComposerSetup\bin\composer
C:\Users\Administrator\AppData\Local\ComposerSetup\bin\composer.bat
> del C:\Users\Administrator\AppData\Local\ComposerSetup\bin\composer
> del C:\Users\Administrator\AppData\Local\ComposerSetup\bin\composer.bat
2、重新安装Composer