Drush/PHP различни версии

Използване на различни версии на drush и различни версии на PHP.
Инсталиране на drush:
git clone в /opt/drush-9.x (https://github.com/drush-ops/drush),
cd /opt/drush-9.x
composer install

Инсталиране на PHP-7.1 - с phpfarm (https://github.com/fpoirotte/phpfarm)

.bashrc

alias drush7="/opt/phpfarm/inst/php-5.5.9/bin/php /opt/drush-7.x/vendor/drush/drush/drush.php"
alias drush9="/opt/phpfarm/inst/php-7.1.0/bin/php /opt/drush-9.x/drush"

Drush9 alias вече е yml, примерно project_root/drush/sites/local.site.yml

dev:
  options:
    command-specific:
      sql-sync:
        no-cache: true
        skip-tables-key: common
      sql-dump:
        no-cache: true
        skip-tables-key: common
    databases:
      default:
        default:
          database: d8_itp_dev
          username: root
          password: 'secret'
          host: 127.0.0.1
          driver: mysql
  paths:
    site: sites/default/
    files: sites/default/files
    files-private: sites/default/files-private
    dump-dir: '%files-private/tmp'
  root: /var/www/vhosts/itp-dev.local/web
  uri: '<a href="http://itp-dev.local'

">http://itp-dev.local'
[/geshifilter-code]

Category: