duanning9110 2015-11-23 22:46
浏览 184
已采纳

如何通过Composer从drush 7升级到drush 8

I am working in a website with drupal and Neato starter base theme. Here the Docs (http://www.velir.com/blog/index.php/2015/08/28/neato-in-drupal-8-fundamentals/)

But, when I try to run:

$ drush ngt subtheme 

appears this error:

Drush 7.0.0-rc1 does not support Drupal . 
PHP Fatal error:  Call to undefined function Drush\Boot\conf_path() in /Applications/DevDesktop/drush/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php on line 360

I´ve tryed this steps (http://whaaat.com/installing-drush-8-using-composer) but not working,

I searched a lot on google but I'm tired, maybe I'm not looking right or I'm not reading it right.

This is my drush:

$ drush status
    PHP executable         :  /Applications/DevDesktop/php5_5/bin/php
    PHP configuration      :  /Applications/DevDesktop/php5_5/bin/php.ini
    PHP OS                 :  Darwin
    Drush version          :  7.0.0-rc1
    Drush temp directory   :  /tmp
    Drush configuration    :  /Applications/DevDesktop/drush/vendor/drush/drush/drushrc.php
    Drush alias files      :  /Users/myuser/.drush/my.aliases.drushrc.php /Users/myuser/.acquia/DevDesktop/Drush/Aliases/aliases.drushrc.php

Can anyone help me please?

  • 写回答

1条回答 默认 最新

  • dongying6896 2015-11-24 10:09
    关注

    I use this way to upgrade or downgrade the drush version:

    composer global require drush/drush:dev-master
    

    or you can edit manually the composer.json file:

    "require": {
        "drush/drush": "dev-master"
    }
    

    After it, if is the first time you are working with composer you have to install:

    composer install
    

    if not, update:

    composer update
    

    Finally, remove the previous executable file and create a link to the composer drush executable file. In my case I have it installed in my /home:

    rm -f /usr/local/bin/drush
    ln -s /home/<user>/.composer/vendor/drush/drush/drush /usr/local/bin/drush
    

    I hope this way can help you to configure the correct version of drush to work with Drupal 8.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器