Latest Composer version not pulling Laravel

前端 未结 4 1817
执念已碎
执念已碎 2020-12-29 14:16

The Latest version of Composer is not pulling Laravel, I thought it could be because of Composer added new secure_http feature for downloading from Packagist and Laravel Pac

相关标签:
4条回答
  • 2020-12-29 14:45

    I suggest to enable openssl using:

    composer config -g -- disable-tls false

    And then you also need to active it in php.in

    Open php.ini and search for php_openssl and you end up like this extension=php_openssl.dll

    The php_openssl.dll file is in ext directory of your php so if you changed php directory and have an error like

    PHP Warning:  PHP Startup: Unable to load dynamic library 
    'C:\php\ext\php_openssl.dll' - The specified module could not be found. 
    in Unknown on line 0
    

    You need to set extension=php_openssl.dll to extension="your php direcroty"\ext\php_openssl.dll

    0 讨论(0)
  • 2020-12-29 14:46

    When running (downgrade composer by running)

    composer config -g secure-http false
    

    i still got an exeption

    Fatal error: Uncaught Error: Call to undefined method Composer\Package\RootPackage::getConfig() ...
    

    I got a success finaly using additional --no-plugins

    composer config -g secure-http false --no-plugins
    composer self-update --no-plugins
    

    Hope this helps anyone :)

    0 讨论(0)
  • 2020-12-29 14:50

    I had the same problem. Found the solution here:Reddit Discussion of the issue

    Basically, you have two options:

    • Revert to previous version, by running

      self-update --rollback

    • Or, downgrade composer by running

      composer config -g secure-http false

    0 讨论(0)
  • 2020-12-29 14:53

    at last this one saved me ,

    sudo composer self-update
    
    sudo composer clear-cache
    
    sudo composer config -g secure-http false
    
    sudo composer update --no-scripts
    

    finally done !

    0 讨论(0)
提交回复
热议问题