composer-sublime
composer-sublime copied to clipboard
Composer & PHP aliasing and Mcrypt errors
Hi,
This isn't an issue which is one of the package though, I did want to share it just the same.
I'm running MAMP Pro and have aliased PHP in my .profile to use a version which is included with MAMP Pro.
alias php='/Applications/MAMP/bin/php/php5.5.23/bin/php'
I've also setup Composer globally. I've moved and renamed the composer.phar per the instructions on getcomposer.org etc.
alias composer="php /usr/local/bin/composer"
(the php in the composer alias is chaining in the php alias above it for MAMP Pro)
I've updated your composer_command
config path to point to the new location for composer but, it's not taking into account the aliasing of global composer rather, php aliasing.
With that said, I keep getting errors within your package when I run the install command with Laravel because it can't find the mcrypt extension.
Note: I installed mcrypt via homebrew but, without setting up PHP in a normal MAC OS X MAMP type setup, it's not working and why I'm aliasing to MAMP Pro's version instead.
I'm able to run composer install
directly from terminal without errors so I know my setup is correct and it seems to make sense as to why it's not working from your package.
With that said, and as a nice to have within this package, having an option for setting a command to run with composer_command would be amazing!
For example:
{
"composer_command": "php ",
"composer_path": "/usr/local/bin/composer"
}
or maybe just allowing for:
{
"composer_command": "php /usr/local/bin/composer"
}
Thanks!
use this
"composer_command": "/usr/local/Cellar/composer/1.0.0-alpha9/libexec/composer.phar",
I'm taking it this assumes Composer is installed via Homebrew? (In my case it's currently not though, maybe I could adjust.)
its better to install composer globally with brew which make it much easier to execute it from anywhere.