Skip to content

Commit

Permalink
Add support for PHP 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
svpernova09 committed Sep 27, 2019
1 parent 67bbd72 commit 3d3da6d
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 3 deletions.
6 changes: 6 additions & 0 deletions resources/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions resources/localized/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions scripts/features/blackfire.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion scripts/features/cassandra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions scripts/features/couchdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 10 additions & 0 deletions scripts/features/mongodb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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']})"
4 changes: 2 additions & 2 deletions scripts/homestead.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 3d3da6d

Please sign in to comment.