Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit 1bf2535

Browse files
authored
Merge branch 'Varying-Vagrant-Vagrants:develop' into develop
2 parents 8f0cdbb + c425018 commit 1bf2535

File tree

7 files changed

+58
-144
lines changed

7 files changed

+58
-144
lines changed

.github/workflows/vvv-provisioning.yml

-119
Original file line numberDiff line numberDiff line change
@@ -109,122 +109,3 @@ jobs:
109109
with:
110110
name: logs-on-docker
111111
path: "${{ github.workspace }}/log"
112-
113-
# This workflow contains a single job called "build"
114-
on-stable:
115-
name: MacOS 10.15 Stable Reprovision
116-
# The type of runner that the job will run on
117-
runs-on: macos-10.15
118-
119-
# Steps represent a sequence of tasks that will be executed as part of the job
120-
steps:
121-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
122-
- uses: actions/checkout@v4
123-
with:
124-
ref: stable
125-
126-
- name: Cache Vagrant boxes
127-
uses: actions/cache@v3
128-
with:
129-
path: ~/.vagrant.d/boxes
130-
key: ${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }}
131-
restore-keys: |
132-
${{ runner.os }}-vagrant-
133-
134-
- name: install goodhosts
135-
run: vagrant plugin install --local
136-
137-
- name: vagrant up (stable)
138-
run: vagrant up
139-
140-
- uses: actions/checkout@v4
141-
with:
142-
clean: false
143-
144-
- name: vagrant up (current branch)
145-
run: vagrant up --provision
146-
147-
- name: tests
148-
run: provision/tests/macos-tests.sh
149-
150-
- uses: actions/upload-artifact@v3
151-
if: ${{ always() }}
152-
with:
153-
name: logs-on-stable
154-
path: "${{ github.workspace }}/log"
155-
156-
on-develop:
157-
name: MacOS 10.15 Develop Reprovision
158-
# The type of runner that the job will run on
159-
runs-on: macos-10.15
160-
161-
# Steps represent a sequence of tasks that will be executed as part of the job
162-
steps:
163-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
164-
- uses: actions/checkout@v4
165-
with:
166-
ref: develop
167-
168-
- name: Cache Vagrant boxes
169-
uses: actions/cache@v3
170-
with:
171-
path: ~/.vagrant.d/boxes
172-
key: ${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }}
173-
restore-keys: |
174-
${{ runner.os }}-vagrant-
175-
176-
177-
- name: install goodhosts
178-
run: vagrant plugin install --local
179-
180-
- name: vagrant up (develop)
181-
run: vagrant up
182-
183-
- uses: actions/checkout@v4
184-
with:
185-
clean: false
186-
187-
- name: vagrant up (current branch)
188-
run: vagrant up --provision
189-
190-
- name: tests
191-
run: provision/tests/macos-tests.sh
192-
193-
- uses: actions/upload-artifact@v3
194-
if: ${{ always() }}
195-
with:
196-
name: logs-on-develop
197-
path: "${{ github.workspace }}/log"
198-
199-
on-clean:
200-
name: MacOS 10.15 Clean Provision
201-
# The type of runner that the job will run on
202-
runs-on: macos-10.15
203-
204-
# Steps represent a sequence of tasks that will be executed as part of the job
205-
steps:
206-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
207-
- uses: actions/checkout@v4
208-
209-
- name: Cache Vagrant boxes
210-
uses: actions/cache@v3
211-
with:
212-
path: ~/.vagrant.d/boxes
213-
key: ${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }}
214-
restore-keys: |
215-
${{ runner.os }}-vagrant-
216-
217-
- name: install goodhosts
218-
run: vagrant plugin install --local
219-
220-
- name: vagrant up (current branch)
221-
run: vagrant up
222-
223-
- name: tests
224-
run: provision/tests/macos-tests.sh
225-
226-
- uses: actions/upload-artifact@v3
227-
if: ${{ always() }}
228-
with:
229-
name: logs-on-clean
230-
path: "${{ github.workspace }}/log"

CHANGELOG.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,28 @@ permalink: /docs/en-US/changelog/
66

77
# Changelog
88

9-
## 3.13 ( 2023 December TBA )
9+
## 3.13 ( 2024 TBA )
1010

1111
### Enhancements
1212

13-
* Switched the default PHP from v7.4 to v8.2 and default Node from v14 to v16 ( #2690 )
13+
* Switched the default PHP from v7.4 to v8.2 and ~default Node from v14 to v16~ ( #2690 )
14+
* Use Node 20 as the default version to match WP and Gutenberg ( #2696 )
1415
* WP Coding standards v3 ( #2688 )
1516
* VIP Coding standards v3 ( #2688 )
1617
* Better error messages with links to docs when trying to use a PHP version that isn't installed ( #2689 )
1718
* Opted out of Dotnet package telemetry ( #2689 )
1819
* Replace references to the Squizlab PHPCS with that from the PHPCS Standards org ( #2692 )
20+
* Better PHP Debug mod switching outputs and checks ( #2702 )
21+
* PHP Info and Xdebug info pages now state their versions ( #2702 )
22+
23+
### Maintenance
24+
25+
* Switch the Parallels Arm64 box from `mpasternak/focal64-arm` to `bento/ubuntu-22.04-arm64` to match x86 boxes ( #2695 )
1926

2027
### Bug Fixes
2128

2229
* The host file inside the VM was only adding sites with `127.0.0.1` addresses, now it adds the IPVv6 `::1` too ( #2689 )
30+
* Removed old MacOS PR workflows, no runners available ( #2698 )
2331

2432
## 3.12 ( 2023 August 3rd )
2533

Vagrantfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
447447
# this seems to be the most reliable way to detect whether or not we're
448448
# running under ARM64.
449449
if Etc.uname[:version].include? 'ARM64'
450-
override.vm.box = 'mpasternak/focal64-arm'
450+
override.vm.box = 'bento/ubuntu-20.04-arm64'
451451
end
452452
end
453453

config/homebin/switch_php_debugmod

+40-14
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,21 @@ disable_phpmods() {
2828
for phpv in $(phpquery -V)
2929
do
3030
if is_module_enabled_fpm "${phpv}" "${i}"; then
31-
vvv_info " ✘ Disabling active PHP <b>v${phpv}</b><info> debug mod: </info><b>'${i}'</b>"
32-
sudo phpdismod -q -s fpm -v "${phpv}" "${i}"
33-
sudo phpdismod -q -s cli -v "${phpv}" "${i}"
31+
#vvv_info " ✘ Disabling active PHP <b>v${phpv}</b><info> debug mod: </info><b>'${i}'</b>"
32+
#sudo phpdismod -q -s fpm -v "${phpv}" "${i}"
33+
#sudo phpdismod -q -s cli -v "${phpv}" "${i}"
34+
35+
if sudo phpdismod -q -v "${phpv}" -s fpm "${i}"; then
36+
vvv_success " - ✔ Disabled ${i} for PHP <b>v${phpv} FPM</b>"
37+
else
38+
vvv_error " - x Could not disable ${i} for PHP <b>v${phpv} FPM</b>"
39+
fi
40+
41+
if sudo phpdismod -q -v "${phpv}" -s cli "${i}"; then
42+
vvv_success " - ✔ Disabled ${i} for PHP <b>v${phpv} CLI</b>"
43+
else
44+
vvv_error " - x Could not disable ${i} for PHP <b>v${phpv} CLI</b>"
45+
fi
3446
fi
3547
done
3648
done
@@ -40,11 +52,19 @@ enable_phpmod() {
4052
for phpv in $(phpquery -V)
4153
do
4254
if is_module_installed_fpm "${phpv}" "${1}"; then
43-
vvv_info " * Enabling <b>'${1}'</b><info> for PHP <b>v${phpv}</b>"
44-
sudo phpenmod -q -v "${phpv}" -s fpm "${1}"
45-
sudo phpenmod -q -v "${phpv}" -s cli "${1}"
55+
if sudo phpenmod -q -v "${phpv}" -s fpm "${1}"; then
56+
vvv_success " - ✔ Enabled ${1} for PHP <b>v${phpv} FPM</b>"
57+
else
58+
vvv_error " - x Could not enable ${1} for PHP <b>v${phpv} FPM</b>"
59+
fi
60+
61+
if sudo phpenmod -q -v "${phpv}" -s cli "${1}"; then
62+
vvv_success " - ✔ Enabled ${1} for PHP <b>v${phpv} CLI</b>"
63+
else
64+
vvv_error " - x Could not enable ${1} for PHP <b>v${phpv} CLI</b>"
65+
fi
4666
else
47-
vvv_info " * Skipped enabling ${1} in PHP <b>v${phpv}</b><info>, module isn't installed for this version"
67+
vvv_info " - ? Skipped enabling ${1} in PHP <b>v${phpv}</b><info>, module isn't installed for this version"
4868
fi
4969
done
5070
}
@@ -65,9 +85,19 @@ is_module_installed_fpm() {
6585

6686
restart_phpfpm() {
6787
vvv_info " * Restarting PHP FPM services so that the change takes effect"
68-
find /etc/init.d/ -name "php*-fpm" -exec bash -c 'sudo service "$(basename "$0")" restart' {} \;
88+
if find /etc/init.d/ -name "php*-fpm" -exec bash -c 'sudo service "$(basename "$0")" restart' {} \;; then
89+
vvv_success " ✔ Completed restart sequence"
90+
else
91+
vvv_error " x One of the PHP services failed to restart, changes may not take effect."
92+
fi
6993
}
7094

95+
96+
vvv_info "Attempting to disable PHP debug mods and switch to <b>${mod}</b><info>:"
97+
if [[ "${mod}" == "pcov" ]]; then
98+
vvv_info " * pcov supports PHP 7.1 and above, it is not available for 5.6 and 7.0"
99+
fi
100+
71101
disable_phpmods phpmods[@]
72102

73103
if [[ "${mod}" == "none" ]]; then
@@ -76,10 +106,6 @@ if [[ "${mod}" == "none" ]]; then
76106
exit 0
77107
fi
78108

79-
if [[ "${mod}" == "pcov" ]]; then
80-
vvv_info " * pcov supports PHP 7.1 and above, it is not available for 5.6 and 7.0"
81-
fi
82-
83109
# Tideways needs 2 mods enabling
84110
if [[ "${mod}" == "tideways" ]]; then
85111
enable_phpmod "xhgui"
@@ -91,11 +117,11 @@ fi
91117

92118
if [[ "${mod}" == "xdebug" ]]; then
93119
# Ensure the log file for xdebug is group writeable.
94-
vvv_info " * Making sure log/php/xdebug-remote.log is readable and present"
120+
vvv_info " * Making sure <b>log/php/xdebug-remote.log</b><info> is readable and present"
95121
sudo touch /var/log/php/xdebug-remote.log
96122
sudo chmod 664 /var/log/php/xdebug-remote.log
97123
fi
98124

99125
enable_phpmod "${mod}"
100126
restart_phpfpm
101-
vvv_success " ✔ PHP Debug mod switch to <b>${mod}</b><success> on all available PHP versions complete.</success>"
127+
vvv_info " ✔ PHP Debug mod switch to <b>${mod}</b><success> on all available PHP versions complete.</success>"

provision/core/node-nvm/provision.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ function vvv_nvm_setup() {
5353

5454
fi
5555

56-
vvv_info " - Installing Node 16 via nvm"
57-
nvm install 16
58-
nvm use 16
56+
vvv_info " - Installing Node 20 via nvm"
57+
nvm install 20
58+
nvm use 20
5959

6060
vvv_info " - Ensuring vagrant user owns its own nvm folder"
6161
chown -R vagrant:vagrant /home/vagrant/.nvm/

www/default/phpinfo/index.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
*/
55
?>
66
<nav class="center">
7-
<a href="//vvv.test/phpinfo/">PHP Info</a>
7+
<a href="//vvv.test/phpinfo/">PHP Info (v<?php echo phpversion(); ?>)</a>
88
<?php
99
if ( function_exists( 'xdebug_info' ) ) {
10-
?>&middot; <a href="//vvv.test/xdebuginfo/">Xdebug Info</a><?php
10+
?>&middot; <a href="//vvv.test/xdebuginfo/">Xdebug Info (v<?php echo phpversion('xdebug'); ?>)</a><?php
1111
}
1212
?>
1313
</nav>

www/default/xdebuginfo/index.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
?>
66
<style type="text/css">
77
body {
8-
color: #222;
98
font-family: sans-serif;
109
}
1110

@@ -25,10 +24,10 @@
2524
}
2625
</style>
2726
<nav class="center">
28-
<a href="//vvv.test/phpinfo/">PHP Info</a>
27+
<a href="//vvv.test/phpinfo/">PHP Info (v<?php echo phpversion(); ?>)</a>
2928
<?php
3029
if ( function_exists( 'xdebug_info' ) ) {
31-
?>&middot; <a href="//vvv.test/xdebuginfo/">Xdebug Info</a><?php
30+
?>&middot; <a href="//vvv.test/xdebuginfo/">Xdebug Info (v<?php echo phpversion('xdebug'); ?>)</a><?php
3231
}
3332
?>
3433
</nav>

0 commit comments

Comments
 (0)