From 3d3da6d42700614ab920790b6a6d0604911bf09b Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Thu, 26 Sep 2019 20:18:03 -0500 Subject: [PATCH] Add support for PHP 7.4 --- resources/aliases | 6 ++++++ resources/localized/aliases | 6 ++++++ scripts/features/blackfire.sh | 1 + scripts/features/cassandra.sh | 2 +- scripts/features/couchdb.sh | 1 + scripts/features/mongodb.sh | 10 ++++++++++ scripts/homestead.rb | 4 ++-- 7 files changed, 27 insertions(+), 3 deletions(-) diff --git a/resources/aliases b/resources/aliases index 5e5b20cec..0406b2ded 100644 --- a/resources/aliases +++ b/resources/aliases @@ -69,6 +69,12 @@ function php73() { sudo update-alternatives --set phpize /usr/bin/phpize7.3 } +function php74() { + sudo update-alternatives --set php /usr/bin/php7.4 + sudo update-alternatives --set php-config /usr/bin/php-config7.4 + sudo update-alternatives --set phpize /usr/bin/phpize7.4 +} + function serve-apache() { if [[ "$1" && "$2" ]] then diff --git a/resources/localized/aliases b/resources/localized/aliases index a5302b73e..440ff8062 100644 --- a/resources/localized/aliases +++ b/resources/localized/aliases @@ -57,6 +57,12 @@ function php73() { sudo update-alternatives --set phpize /usr/bin/phpize7.3 } +function php74() { + sudo update-alternatives --set php /usr/bin/php7.4 + sudo update-alternatives --set php-config /usr/bin/php-config7.4 + sudo update-alternatives --set phpize /usr/bin/phpize7.4 +} + function serve-apache() { if [[ "$1" && "$2" ]] then diff --git a/scripts/features/blackfire.sh b/scripts/features/blackfire.sh index dee9b8f10..7f4703dc3 100755 --- a/scripts/features/blackfire.sh +++ b/scripts/features/blackfire.sh @@ -43,4 +43,5 @@ service php7.0-fpm restart service php7.1-fpm restart service php7.2-fpm restart service php7.3-fpm restart +service php7.4-fpm restart service blackfire-agent restart diff --git a/scripts/features/cassandra.sh b/scripts/features/cassandra.sh index bc5943f4f..7c02f41b2 100755 --- a/scripts/features/cassandra.sh +++ b/scripts/features/cassandra.sh @@ -13,7 +13,7 @@ chown -Rf vagrant:vagrant /home/vagrant/.homestead-features echo "deb http://www.apache.org/dist/cassandra/debian 311x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list wget -q -O - https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add - sudo DEBIAN_FRONTEND=noninteractive apt update -sudo DEBIAN_FRONTEND=noninteractive apt install cassandra openjdk-8-jdk git libgmp-dev php7.1-dev php7.2-dev php7.3-dev -y +sudo DEBIAN_FRONTEND=noninteractive apt install cassandra openjdk-8-jdk git libgmp-dev php7.1-dev php7.2-dev php7.3-dev php7.4-dev -y # Start Cassandra and boot at runtime sudo service cassandra start diff --git a/scripts/features/couchdb.sh b/scripts/features/couchdb.sh index ddf74ca17..92cec852d 100755 --- a/scripts/features/couchdb.sh +++ b/scripts/features/couchdb.sh @@ -36,3 +36,4 @@ sudo service php7.0-fpm restart sudo service php7.1-fpm restart sudo service php7.2-fpm restart sudo service php7.3-fpm restart +sudo service php7.4-fpm restart diff --git a/scripts/features/mongodb.sh b/scripts/features/mongodb.sh index bfe1c53e4..e1b5645ac 100755 --- a/scripts/features/mongodb.sh +++ b/scripts/features/mongodb.sh @@ -83,4 +83,14 @@ sudo ln -s /etc/php/7.3/mods-available/mongo.ini /etc/php/7.3/cli/conf.d/20-mong sudo ln -s /etc/php/7.3/mods-available/mongo.ini /etc/php/7.3/fpm/conf.d/20-mongo.ini sudo service php7.3-fpm restart +phpize7.4 +./configure --with-php-config=/usr/bin/php-config7.4 > /dev/null +make clean > /dev/null +make >/dev/null 2>&1 +sudo make install +sudo bash -c "echo 'extension=mongodb.so' > /etc/php/7.4/mods-available/mongo.ini" +sudo ln -s /etc/php/7.4/mods-available/mongo.ini /etc/php/7.4/cli/conf.d/20-mongo.ini +sudo ln -s /etc/php/7.4/mods-available/mongo.ini /etc/php/7.4/fpm/conf.d/20-mongo.ini +sudo service php7.4-fpm restart + mongo admin --eval "db.createUser({user:'homestead',pwd:'secret',roles:['root']})" diff --git a/scripts/homestead.rb b/scripts/homestead.rb index 14d342daf..829c9a9b1 100644 --- a/scripts/homestead.rb +++ b/scripts/homestead.rb @@ -445,7 +445,7 @@ def self.configure(config, settings) end config.vm.provision 'shell' do |s| - s.inline = 'service php5.6-fpm restart;service php7.0-fpm restart;service php7.1-fpm restart; service php7.2-fpm restart; service php7.3-fpm restart;' + s.inline = 'service php5.6-fpm restart;service php7.0-fpm restart;service php7.1-fpm restart; service php7.2-fpm restart; service php7.3-fpm restart; service php7.4-fpm restart;' end end @@ -456,7 +456,7 @@ def self.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; sudo service php7.2-fpm restart; sudo service php7.3-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; sudo service php7.3-fpm restart; sudo service php7.4-fpm restart;' end # Configure All Of The Configured Databases