phpenv, drupalcs in fish shell

To add phpenv and other command to fish shell, run this command:
vim ~/.config/fish/config.fish


set PATH $HOME/.phpenv/bin $PATH
set cmd phpenv init -
eval $cmd

alias drupal8cs "$HOME/.composer/vendor/bin/phpcs --standard=$HOME/.composer/vendor/drupal/coder/coder_sniffer/Drupal --extensions='php,module,inc,install,test,profile,theme,js,css,info,txt'"

alias drupal8pr "$HOME/.composer/vendor/bin/phpcs --standard=$HOME/.composer/vendor/drupal/coder/coder_sniffer/DrupalPractice --extensions='php,module,inc,install,test,profile,theme,js,css,info,txt'"

To reload the configuration, run this command:
exec fish

Install phpdbg on ubuntu 14.04

  1. Install phpenv
  2. Download bison 2.7 and install it http://mirror.esc7.net/pub/Ubuntu/pool/main/b/bison/
  3. cd ~/.phpenv
    cd libexec
    vim phpenv-install
  4. Here is the most important part, we need to add more options to CONFIGURE_OPTIONS
    CONFIGURE_OPTIONS=”…….. –with-readline \ –enable-phpdbg\ ……………………..”
  5. phpenv install php-5.6.2
    At the time this post is published, the latest version of PHP is 5.6.2, you can change that.
  6. cd /path/to/your/index.php
    phpenv local 5.6.2
  7. Remember to restore configure options if you want to install other version of php via phpenv

How to install phing/phing in ubuntu 14.04

  1. Upgrade php5.5
    http://www.dev-metal.com/how-to-setup-latest-version-of-php-5-5-on-ubuntu-12-04-lts/
  2. sudo pear install channel://pear.php.net/VersionControl_SVN-0.5.1
  3. sudo pear install channel://pear.php.net/VersionControl_Git-0.4.4
  4. sudo pear install channel://pear.php.net/Services_Amazon_S3-0.4.0
  5. sudo pear install channel://pear.php.net/XML_Serializer-0.20.2
  6. sudo pear install pear/PHP_CodeSniffer
  7. sudo pear install --alldeps phing/phing

Test installing drupal on multiple version of php

  1. vim ~/.phpenv/versions/5.3.28/etc/php.ini
    pdo_mysql.default_socket=”/var/run/mysqld/mysqld.sock”
  2. mv ~/.drush/php.ini ~/.drush/php.ini_bak
  3. cp ~/.phpenv/versions/5.3.28/etc/php.ini ~/.drush/
  4. php -m | grep intl
    Download php5-intl_5.3.10-1ubuntu3_i386.deb
    extract
    Copy intl.so to ~/.phpenv/versions/5.3.28/lib/php/extensions/no-debug-non-zts-20090626/
    Add this line to the end of ~/.phpenv/versions/5.3.28/etc/php.ini
    extension=intl.so
  5. php -m | grep mcrypt
    Download php5-mcrypt_5.3.2-0ubuntu1_i386.deb
    extract
    Copy mcrypt.so to ~/.phpenv/versions/5.3.28/lib/php/extensions/no-debug-non-zts-20090626/
    Add these lines to the end of ~/.phpenv/versions/5.3.28/etc/php.ini
    [mcrypt]
    extension=mcrypt.so
  6. Download libicu48_4.8.1.1-3ubuntu0.1_i386.deb and install it