Laravel 5.5 安装 laravel-wechat 4.0 版本失败

文章目录

    开发环境 Laravel 5.5

    按照 github 的安装文档,安装最新的 4.0 版本

    composer require "overtrue/laravel-wechat:dev-master"  
    

    报错

    ./composer.json has been updated
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - Installation request for overtrue/laravel-wechat dev-master -> satisfiable by overtrue/laravel-wechat[dev-master].
        - overtrue/laravel-wechat dev-master requires overtrue/wechat dev-master -> satisfiable by overtrue/wechat[dev-master] but these conflict with your requirements or minimum-stability.
    
    Installation failed, reverting ./composer.json to its original content.
    

    解决方法是

    在 composer.json 的最外层添加

    "minimum-stability": "dev"
    

    再次执行

    composer require "overtrue/laravel-wechat:dev-master"  
    

    即可

    然而并没有什么乱用,4.0 的 bug 一大堆(微信小程序),降级到 3.0 终于可以使用了。