andres-montanez / Magallanes

The PHP Deployment Tool
https://magephp.com
MIT License
691 stars 169 forks source link

PHP bin location config #376

Closed robertosanval closed 6 years ago

robertosanval commented 7 years ago

I've different PHP versions in my local machine and deployment machine too.

How could I choose which bin/php command to use with Magallanes?

Thanks

andres-montanez commented 7 years ago

Hi, did you try something like this? /path/to/php7 bin/mage /path/to/php5.6 bin/mage etc… That could work.

Let me know! Regards!

robertosanval commented 7 years ago

Yes, I've tried that, it's OK but the problem is with the php commands executed in Builtin Tasks like symfony/cache-warmup I'd like to chose the PHP version to execute those commands.

andres-montanez commented 7 years ago

Well, those are executed "as it is", so currently there is no workaround for that. Do you have a proposal?

Regards!

robertosanval commented 7 years ago

How about to add a config parameter to magephp and each environment branch called php_bin?

andres-montanez commented 7 years ago

That could be a valid workaround. I will take it into account for the next release. Thanks!

robertosanval commented 7 years ago

Thanks to you and your support!

robertosanval commented 7 years ago

As a temporary solution I've tried to modify bin/mage file first line from:

#!/usr/bin/env php

to

#!/path/to/my/desired/php/bin/php

But stills showing me a wrong php version :(

Any ideas?

andres-montanez commented 6 years ago

Closing this for the moment.