Skip to content

Commit

Permalink
✨ ❄️ πŸ’Ž πŸ”– Add support for PHP 7.2, Tag release 6.4.0 (#691)
Browse files Browse the repository at this point in the history
  • Loading branch information
svpernova09 authored Oct 16, 2017
1 parent 4aaa032 commit f8ccc21
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bin/homestead
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

require __DIR__.'/../../../autoload.php';

$app = new Symfony\Component\Console\Application('Laravel Homestead', '6.3.0');
$app = new Symfony\Component\Console\Application('Laravel Homestead', '6.4.0');

$app->add(new Laravel\Homestead\MakeCommand);

Expand Down
4 changes: 4 additions & 0 deletions resources/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ function php71() {
sudo update-alternatives --set php /usr/bin/php7.1
}

function php72() {
sudo update-alternatives --set php /usr/bin/php7.2
}

function serve-apache() {
if [[ "$1" && "$2" ]]
then
Expand Down
4 changes: 4 additions & 0 deletions resources/localized/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ function php71() {
sudo update-alternatives --set php /usr/bin/php7.1
}

function php72() {
sudo update-alternatives --set php /usr/bin/php7.2
}

function serve-apache() {
if [[ "$1" && "$2" ]]
then
Expand Down
1 change: 1 addition & 0 deletions scripts/blackfire.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ echo "$client" > "/home/vagrant/.blackfire.ini"
service php5.6-fpm restart
service php7.0-fpm restart
service php7.1-fpm restart
service php7.2-fpm restart
service blackfire-agent restart
11 changes: 8 additions & 3 deletions scripts/homestead.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def Homestead.configure(config, settings)
# Configure The Box
config.vm.define settings["name"] ||= "homestead-7"
config.vm.box = settings["box"] ||= "laravel/homestead"
config.vm.box_version = settings["version"] ||= ">= 3.0.0"
config.vm.box_version = settings["version"] ||= ">= 4.0.0"
config.vm.hostname = settings["hostname"] ||= "homestead"

# Configure A Private Network IP
Expand Down Expand Up @@ -228,7 +228,7 @@ def Homestead.configure(config, settings)

config.vm.provision "shell" do |s|
s.name = "Restarting Nginx"
s.inline = "sudo service nginx restart; sudo service php5.6-fpm restart; sudo service php7.0-fpm restart; sudo service php7.1-fpm restart"
s.inline = "sudo service nginx restart; sudo service php5.6-fpm restart; sudo service php7.0-fpm restart; sudo service php7.1-fpm restart; sudo service php7.2-fpm restart"
end

# Install MariaDB If Necessary
Expand Down Expand Up @@ -315,14 +315,19 @@ def Homestead.configure(config, settings)
s.args = [var["key"], var["value"]]
end

config.vm.provision "shell" do |s|
s.inline = "echo \"\nenv[$1] = '$2'\" >> /etc/php/7.2/fpm/php-fpm.conf"
s.args = [var["key"], var["value"]]
end

config.vm.provision "shell" do |s|
s.inline = "echo \"\n# Set Homestead Environment Variable\nexport $1=$2\" >> /home/vagrant/.profile"
s.args = [var["key"], var["value"]]
end
end

config.vm.provision "shell" do |s|
s.inline = "service php5.6-fpm restart; service php7.0-fpm restart; service php7.1-fpm restart;"
s.inline = "service php5.6-fpm restart; service php7.0-fpm restart; service php7.1-fpm restart; service php7.2-fpm restart;"
end
end

Expand Down
1 change: 1 addition & 0 deletions scripts/install-couch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ sudo service nginx restart
sudo service php5.6-fpm restart
sudo service php7.0-fpm restart
sudo service php7.1-fpm restart
sudo service php7.2-fpm restart
11 changes: 11 additions & 0 deletions scripts/install-mongo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ sudo ln -s /etc/php/7.1/mods-available/mongo.ini /etc/php/7.1/cli/conf.d/20-mong
sudo ln -s /etc/php/7.1/mods-available/mongo.ini /etc/php/7.1/fpm/conf.d/20-mongo.ini
sudo service php7.1-fpm restart

phpize7.2
./configure --with-php-config=/usr/bin/php-config7.2 > /dev/null
make clean > /dev/null
make >/dev/null 2>&1
sudo make install
sudo chmod 644 /usr/lib/php/20160303/mongodb.so
sudo bash -c "echo 'extension=mongodb.so' > /etc/php/7.2/mods-available/mongo.ini"
sudo ln -s /etc/php/7.2/mods-available/mongo.ini /etc/php/7.2/cli/conf.d/20-mongo.ini
sudo ln -s /etc/php/7.2/mods-available/mongo.ini /etc/php/7.2/fpm/conf.d/20-mongo.ini
sudo service php7.2-fpm restart

sudo ufw allow 27017
sudo sed -i "s/bindIp: .*/bindIp: 0.0.0.0/" /etc/mongod.conf

Expand Down
2 changes: 1 addition & 1 deletion scripts/serve-silverstripe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ block="server {
location ~ /framework/.*(main|rpc|tiny_mce_gzip)\.php$ {
fastcgi_keep_conn on;
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
fastcgi_pass unix:/var/run/php/php$5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
include fastcgi_params;
Expand Down

0 comments on commit f8ccc21

Please sign in to comment.