Skip to content

Instantly share code, notes, and snippets.

@shashankmehta
Last active November 18, 2024 18:33
Show Gist options
  • Save shashankmehta/6ff13acd60f449eea6311cba4aae900a to your computer and use it in GitHub Desktop.
Save shashankmehta/6ff13acd60f449eea6311cba4aae900a to your computer and use it in GitHub Desktop.

Revisions

  1. shashankmehta revised this gist Feb 9, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion setup.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    Firstly install Brew on your MAC
    First install Brew on your MAC

    - Setup Brew: `ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"`
    - `brew update`
  2. shashankmehta revised this gist Feb 9, 2017. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions setup.md
    Original file line number Diff line number Diff line change
    @@ -16,4 +16,6 @@ You just need to edit your path to ensure that `PHP 7.0` is picked up.

    To debug any issue with any package, you can run `brew info php70` etc.

    Also, if you are getting seemingly unrelated errors, make sure to update bash/zsh: `brew upgrade bash` and `brew upgrade zsh`.

    If everything is setup correctly, running `$ php -v` should give you 7.0.+.
  3. shashankmehta created this gist Feb 9, 2017.
    19 changes: 19 additions & 0 deletions setup.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    Firstly install Brew on your MAC

    - Setup Brew: `ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"`
    - `brew update`
    - `brew tap homebrew/dupes`
    - `brew tap homebrew/php`
    - Install PHP 7.0.+ `brew install php70`
    - Install `mcrypt`: `brew install mcrypt php70-mcrypt`
    - Finally, install composer: `brew install composer`

    Now if you run `$ php -v`, you will get `PHP 5.5` or something.
    This is the default PHP version that is shipped with OSX and cannot be removed.
    You just need to edit your path to ensure that `PHP 7.0` is picked up.

    `export PATH="$(brew --prefix homebrew/php/php70)/bin:$PATH"`

    To debug any issue with any package, you can run `brew info php70` etc.

    If everything is setup correctly, running `$ php -v` should give you 7.0.+.