Is there a way to do a Composer build with a php version different from what is installed locally?
My use case is that I have a development container using php56 which lives on a host that has php54. The two environments have a shared folder where the project files live, and I do my builds from an IDE living on the host machine (which uses 5.4).
In a perfect world, I would just upgrade my host to 5.6, but I work on some projects with the lower version.
I don't think you can change that because composer uses the php version that composer is run with, so there are only a few options
The last option is the most promising in my opinion because linux has very nice support for hosting multiple versions of php with phpenv
Sorry I couldn't give you a real solution
我一直在使用Docker完成此操作:
docker run -v $(pwd):/app composer/composer update
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.