Drush
Drush arbeitet sehr eng mit Git zusammen
Drush Befehle
| Befehl | Beispiel | Bemerkungen |
|---|---|---|
| drush dl | drush dl drupal | Core Herunterladen |
| drush dl Module --dev | drush dl admin_toolbar --dev | Module DEV Branch Herunterladen |
| drush dl Module --select | drush dl admin_toolbar --select | Module Version auswählen |
| drush up | drush up module | Modulee Updaten |
| drush watchdog-show | drush watchdog-show | Logs auslesen |
Wo ist Drush installiert?
<copylink>which drush</copylink>
Drush Upgrade
DAN <copylink>cd /usr/local/bin</copylink> <copylink>php -r "readfile('https://s3.amazonaws.com/files.drush.org/drush.phar');" > drush</copylink> <copylink>chmod +x drush</copylink>
<copylink>composer require "drush/drush:8.*"</copylink>
Anleitung unter:
<copylink>https://www.lullabot.com/articles/switching-drush-versions</copylink>
Drush Kommandos
Drush beispiele / Anwendungen
Drush Aliases
Installation
Ubuntu mit Sudo Rechte
<copylink>sudo apt-get install drush</copylink>
Installation ubuntu
https://www.drupal.org/node/1248790 <copylink>pear channel-discover pear.drush.org</copylink> <copylink>pear install drush/drush</copylink> <copylink>drush version</copylink>
Drush installation unter Cyon
Drush Upgrade
<copylink>export PATH="$HOME/.composer/vendor/bin:$PATH"</copylink>
<copylink>composer global require drush/drush:7.*</copylink>
Drush Fehlermeldung im Zusammenhang mit Commerce
Wenn unter Durpal 7 Drupal Commerce im Einsatz ist, kann unter Umständen drush nicht mehr gestartet werden.
Folgende Codeänderungen sind dann notwendig:
--- commerce/modules/cart/commerce_cart.module (revision )
+++ commerce/modules/cart/commerce_cart.module (revision )
@@ -1339,7 +1339,8 @@
// Allow other modules to specify what properties should be compared when
// determining whether or not to combine line items.
- drupal_alter('commerce_cart_product_comparison_properties', $comparison_properties, clone($line_item));
+ $line_item_clone = clone($line_item);
+ drupal_alter('commerce_cart_product_comparison_properties', $comparison_properties, $line_item_clone);
// Loop over each line item on the order.
foreach ($order_wrapper->commerce_line_items as $delta => $matching_line_item_wrapper) {
Patch:
https://www.drupal.org/files/issues/commerce-cart_product_add_php7-2762907-5.patch
Drush Install auf Hostpoint
<copylink>curl -sS https://getcomposer.org/installer | php</copylink>
Bash Profile anpassen <copylink>vim .bash_profile</copylink>
Pfad von Composer einfügen: <copylink>alias composer="php ~/composer.phar"</copylink>
Jetzt die Bash Profile neu laden: <copylink>source .bash_profile</copylink>
Danach mit composer drush installieren <copylink>composer global require drush/drush:8.*</copylink> Oder: <copylink>composer global require drush/drush:dev-master</copylink>
Pfad von drush einfügen: <copylink>vim .bash_profile</copylink>
<copylink>alias drush="~/.composer/vendor/drush/drush/drush"</copylink>
BUGS
PHP Version ändern: auf PHP CLI 7.1 count(): Parameter must be an array or an object that implements Countable Table.php:789 [warning]
<copylink>sudo update-alternatives --set php /usr/bin/php7.1</copylink>