If I have a vagrant box provisioned using puPHPet on OSX, is it possible to upgrade the PHP version from 5.5 to 5.6 with a simple config file change or do I need to re-provision from scratch?
Alternatively is it simpler to upgrade the PHP via the guest OS package manager, in this case Ubuntu 14.04. The use case here is a single development environment (not a large team) but I may later want to provision the same environment for a second developer and/or on a cloud service and would then need the latest stable PHP.
UPDATE
I tried editing puphpet/config.yml as suggested:
php:
install: '1'
version: '56'
composer: '1'
composer_home: ''
modules:
php:
- cli
- intl
- mcrypt
pear: { }
pecl:
- pecl_http
ini:
display_errors: On
error_reporting: '-1'
session.save_path: /var/lib/php/session
timezone: Europe/London
mod_php: 0
And then did vagrant reload
but php -v
still shows 5.5.14. I also tried vagrant reload --provision
and this seemed to do a lot more than just restart the VM (ran through provisioning scripts) but the PHP version has not changed.
Near as I know, this should be easy enough to do.
Adjust the puphpet/config.yml
to reflect your changes and run vagrant provision
.
To clarify, in order to upgrade the php version I adjusted:
php:
install: '1'
version: '54'
to
php:
install: '1'
version: '56'
the exact location of this information in the config.yml for me right now is on line 109 through 111. But the file may vary depending on features that may or may not get added so don't rely on that too much.