Open a2nt opened 2 years ago
You can use something like below to achieve the same?
{{bin/php}} ./vendor/silverstripe/framework/cli-script.php dev/build "flush=1"
@lerni sure, but running "sake" might be an easier command e.g. in tutorials.
I think this could be really neat. I think a lot of people that are doing {{bin/php}} ./vendor/silverstripe/framework/cli-script.php dev/build "flush=1"
manually in development would appreciate this.
Adding onto what Lerni said another but maybe not as accessible option is update-alternatives(1)
or just manually changing what which
will resolve to.
If your environment doesn't have the correct version of PHP, I suspect composer will also give you problem. This seems like a very marginal use case. And there's a lot of other - and probably better ways - of achieving this:
cli-script.php
directlyMy instinct would be to not do this.
If your environment doesn't have the correct version of PHP, I suspect composer will also give you problem. This seems like a very marginal use case. And there's a lot of other - and probably better ways - of achieving this:
- aliasing the php command to point to your preferred version
- editing your path
- calling
cli-script.php
directlyMy instinct would be to not do this.
The issue often happens at cPanel hosting with multiply versions of PHP.
Composer utility works smarter for example:
ea-php74 /opt/cpanel/composer/bin/composer update
If sake will be able to work the same way it will be awesome
If sake was written in PHP instead of bash, then the same approach composer uses would be possible
If your environment doesn't have the correct version of PHP, I suspect composer will also give you problem. This seems like a very marginal use case. And there's a lot of other - and probably better ways - of achieving this:
- aliasing the php command to point to your preferred version
- editing your path
- calling
cli-script.php
directlyMy instinct would be to not do this.
The issue often happens at cPanel hosting with multiply versions of PHP.
Composer utility works smarter for example:
ea-php74 /opt/cpanel/composer/bin/composer update
If sake will be able to work the same way it will be awesome
Don’t use cPanel for SS but checkout the ‘—ea-reference-dir’ flag if you use ea and not suphp
Description
When you run sake it automatically search for php binary candidate, but it can be different than webserver running binary. I suggest to allow defining php binary using console variable.
For example:
export SAKE_PHP="/usr/bin/php74"