From 14cb886caa412f25af3cc3bf61c23e09258e13a6 Mon Sep 17 00:00:00 2001 From: Bec White Date: Fri, 27 Jul 2018 17:47:38 -0500 Subject: [PATCH 1/2] Require a version of Vagrant that has the core triggers functionality (see https://github.com/hashicorp/vagrant/blob/master/CHANGELOG.md#210-may-3-2018) --- conf/vagrant/Vagrantfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conf/vagrant/Vagrantfile b/conf/vagrant/Vagrantfile index d42863b..17a79d4 100644 --- a/conf/vagrant/Vagrantfile +++ b/conf/vagrant/Vagrantfile @@ -1,6 +1,8 @@ # -*- mode: ruby -*- # vi: set ft=ruby : +Vagrant.require_version ">= 2.1.0" + %w{ vagrant-hostmanager vagrant-auto_network vagrant-triggers }.each do |plugin| unless Vagrant.has_plugin?(plugin) raise "#{plugin} plugin is not installed. Please install with: vagrant plugin install #{plugin}" From defee506d84660bc35f0c70badb4b028a1c95777 Mon Sep 17 00:00:00 2001 From: Bec White Date: Fri, 27 Jul 2018 17:51:04 -0500 Subject: [PATCH 2/2] Update trigger to use new core syntax (https://www.vagrantup.com/docs/triggers/) --- conf/vagrant/Vagrantfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/conf/vagrant/Vagrantfile b/conf/vagrant/Vagrantfile index 17a79d4..b3a43fa 100644 --- a/conf/vagrant/Vagrantfile +++ b/conf/vagrant/Vagrantfile @@ -3,7 +3,7 @@ Vagrant.require_version ">= 2.1.0" -%w{ vagrant-hostmanager vagrant-auto_network vagrant-triggers }.each do |plugin| +%w{ vagrant-hostmanager vagrant-auto_network }.each do |plugin| unless Vagrant.has_plugin?(plugin) raise "#{plugin} plugin is not installed. Please install with: vagrant plugin install #{plugin}" end @@ -72,8 +72,11 @@ Vagrant.configure(2) do |config| end end - config.trigger.before [:up, :reload] do - run "composer install --ignore-platform-reqs" + config.trigger.before [:up, :reload] do |trigger| + trigger.name = "Composer Install" + trigger.run = { + inline: "composer install --ignore-platform-reqs" + } end end