Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to php 8.2 as the default #2690

Merged
merged 18 commits into from
Dec 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ body:
- 'VirtualBox 5'
- 'Parallels (Intel)'
- 'Parallels (Apple Silicon/Arm)'
- 'Docker'
- 'Hyper-V'
- 'VMWare'
- 'Other'
Expand Down
35 changes: 0 additions & 35 deletions .github/ISSUE_TEMPLATE/monteray-virtualbox-timeouts.yml

This file was deleted.

26 changes: 13 additions & 13 deletions .github/workflows/vvv-provisioning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# Make Symlinks
- name: Create Vagrant Like Environment
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
MYGID=$(id -g -n)
sudo chown -R $MYUID:$MYGID "$GITHUB_WORKSPACE/log"

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: logs-on-docker
Expand All @@ -119,12 +119,12 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: stable

- name: Cache Vagrant boxes
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.vagrant.d/boxes
key: ${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }}
Expand All @@ -137,7 +137,7 @@ jobs:
- name: vagrant up (stable)
run: vagrant up

- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
clean: false

Expand All @@ -147,7 +147,7 @@ jobs:
- name: tests
run: provision/tests/macos-tests.sh

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: logs-on-stable
Expand All @@ -161,12 +161,12 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: develop

- name: Cache Vagrant boxes
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.vagrant.d/boxes
key: ${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }}
Expand All @@ -180,7 +180,7 @@ jobs:
- name: vagrant up (develop)
run: vagrant up

- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
clean: false

Expand All @@ -190,7 +190,7 @@ jobs:
- name: tests
run: provision/tests/macos-tests.sh

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: logs-on-develop
Expand All @@ -204,10 +204,10 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Cache Vagrant boxes
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.vagrant.d/boxes
key: ${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }}
Expand All @@ -223,7 +223,7 @@ jobs:
- name: tests
run: provision/tests/macos-tests.sh

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: logs-on-clean
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ permalink: /docs/en-US/changelog/

# Changelog

## 3.13 ( 2023 )
## 3.13 ( 2023 December TBA )

### Enhancements

* Switched the default PHP to v8.0 ( #2658 )
* Switched the default PHP from v7.4 to v8.2 and default Node from v14 to v16 ( #2690 )
* WP Coding standards v3 ( #2688 )
* VIP Coding standards v3 ( #2688 )
* Better error messages with links to docs when trying to use a PHP version that isn't installed ( #2689 )
Expand Down
4 changes: 2 additions & 2 deletions config/default-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ sites:
skip_provisioning: false
description: "A standard WP install, useful for building plugins, testing things, etc"
repo: https://github.com/Varying-Vagrant-Vagrants/custom-site-template.git
php: 8.0 # change the PHP version to use for the provision and nginx
#php: 8.0 # change the PHP version to use for the provision and nginx
custom:
# locale: it_IT
delete_default_plugins: true
Expand Down Expand Up @@ -90,7 +90,7 @@ extensions:
#- php74
#- php80
#- php81
#- php82
#- php83

# vm_config controls how Vagrant provisions the virtual machine, and can be used to
# increase the memory given to VVV and the number of CPU cores.
Expand Down
4 changes: 2 additions & 2 deletions config/homebin/vvv_restore_php_default
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#!/usr/bin/env bash

DEFAULTPHP="8.0"
DEFAULTPHP="8.2"
php_version=$(readlink -f /usr/bin/php)
if [[ $php_version != *"${DEFAULTPHP}"* ]]; then
echo " * Restoring the default PHP CLI version ( ${DEFAULTPHP} )"
Expand Down
4 changes: 2 additions & 2 deletions config/init/vvv-start.conf
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# vvv - necessary services at start

description "necessary services for VVV"
description "Necessary services for VVV"

start on runlevel [2345]

script
service nginx start
service php7.4-fpm start
service php8.2-fpm start
service memcached start
service mariadb start
service mailhog start
Expand Down
8 changes: 4 additions & 4 deletions config/php-config/php-fpm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
; Relative path can also be used. They will be prefixed by:
; - the global prefix if it's been set (-p argument)
; - /usr otherwise
;include=/etc/php/7.4/fpm/*.conf
;include=/etc/php/8.2/fpm/*.conf

;;;;;;;;;;;;;;;;;;
; Global Options ;
Expand All @@ -22,14 +22,14 @@
; Pid file
; Note: the default prefix is /var
; Default Value: none
pid = /run/php/php8.0-fpm.pid
pid = /run/php/php8.2-fpm.pid

; Error log file
; If it's set to "syslog", log is sent to syslogd instead of being written
; in a local file.
; Note: the default prefix is /var
; Default Value: log/php-fpm.log
error_log = /var/log/php/php8.0-fpm.log
error_log = /var/log/php/php8.2-fpm.log

; syslog_facility is used to specify what type of program is logging the
; message. This lets syslogd specify that messages from different facilities
Expand Down Expand Up @@ -126,4 +126,4 @@ error_log = /var/log/php/php8.0-fpm.log

; To configure the pools it is recommended to have one .conf file per
; pool in the following directory:
include=/etc/php/8.0/fpm/pool.d/*.conf
include=/etc/php/8.2/fpm/pool.d/*.conf
2 changes: 1 addition & 1 deletion config/php-config/php-www.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ group = www-data
; specific port;
; '/path/to/unix/socket' - to listen on a unix socket.
; Note: This value is mandatory.
listen = /var/run/php8.0-fpm.sock
listen = /var/run/php8.2-fpm.sock

; Set listen(2) backlog. A value of '-1' means unlimited.
; Default Value: 128 (-1 on FreeBSD and OpenBSD)
Expand Down
4 changes: 2 additions & 2 deletions config/php-config/upstream.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Upstream to abstract backend connection(s) for PHP.
upstream php80 {
server unix:/var/run/php8.0-fpm.sock;
upstream php82 {
server unix:/var/run/php8.2-fpm.sock;
}
2 changes: 1 addition & 1 deletion provision/core/nginx/config/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ http {

# Upstream to abstract backend connection(s) for PHP.
upstream php {
server unix:/var/run/php8.0-fpm.sock;
server unix:/var/run/php8.2-fpm.sock;
}

include /etc/nginx/upstreams/*.conf;
Expand Down
5 changes: 1 addition & 4 deletions provision/core/nginx/config/site-fallback.conf
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
server {
listen 80;
listen 443 ssl http2;
listen 443 ssl;
server_name {vvv_hosts};
root "{vvv_path_to_site}/public_html";

# Nginx logs
error_log "{vvv_path_to_site}/log/nginx-error.log";
access_log "{vvv_path_to_site}/log/nginx-access.log";

# Enable server push if SSL/HTTP2 is being used for link preload headers
http2_push_preload on;

{vvv_tls_cert}
{vvv_tls_key}

Expand Down
6 changes: 3 additions & 3 deletions provision/core/node-nvm/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ function vvv_nvm_setup() {

fi

vvv_info " - Installing Node 14 via nvm"
nvm install 14
nvm use 14
vvv_info " - Installing Node 16 via nvm"
nvm install 16
nvm use 16

vvv_info " - Ensuring vagrant user owns its own nvm folder"
chown -R vagrant:vagrant /home/vagrant/.nvm/
Expand Down
2 changes: 1 addition & 1 deletion provision/core/php/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# @description Installs the default version of PHP
set -eo pipefail

VVV_BASE_PHPVERSION=${VVV_BASE_PHPVERSION:-"8.0"}
VVV_BASE_PHPVERSION=${VVV_BASE_PHPVERSION:-"8.2"}

function php_before_packages() {
cp -f "/srv/provision/core/php/ondrej-ppa-pin" "/etc/apt/preferences.d/ondrej-ppa-pin"
Expand Down
2 changes: 1 addition & 1 deletion provision/provision-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ VVV_SITE_NAME=${SITE}
VVV_HOSTS=""
SUCCESS=0

DEFAULTPHP="8.0"
DEFAULTPHP="8.2"

VVV_CONFIG=/vagrant/config.yml

Expand Down
Loading