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 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思