From 876b26a06f8a53ab72412b86515a4f038b3ceed2 Mon Sep 17 00:00:00 2001 From: Tim Carr Date: Fri, 8 May 2026 22:33:04 +0800 Subject: [PATCH 1/4] Tests: Fix Runners on PHP 8.3 --- .github/workflows/tests.yml | 44 +++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b72cd3642..91390cf47 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -89,30 +89,11 @@ jobs: fail-fast: false matrix: wp-versions: [ 'latest' ] #[ '6.1.1', 'latest' ] - php-versions: [ '8.1', '8.2', '8.3', '8.4' ] #[ '7.4', '8.0', '8.1' ] + php-versions: [ '8.3' ] #[ '7.4', '8.0', '8.1' ] # Folder names within the 'tests' folder to run tests in parallel. test-groups: [ - 'EndToEnd/broadcasts/blocks-shortcodes', - 'EndToEnd/broadcasts/import-export', - 'EndToEnd/forms/blocks-shortcodes', - 'EndToEnd/forms/general', - 'EndToEnd/forms/post-types', - 'EndToEnd/general/other', - 'EndToEnd/general/uninstall', - 'EndToEnd/general/plugin-screens', - 'EndToEnd/integrations/divi-builder', - 'EndToEnd/integrations/divi-theme', - 'EndToEnd/integrations/elementor', - 'EndToEnd/integrations/other', - 'EndToEnd/integrations/wlm', - 'EndToEnd/integrations/woocommerce', - 'EndToEnd/landing-pages', - 'EndToEnd/products', - 'EndToEnd/restrict-content/general', - 'EndToEnd/restrict-content/post-types', - 'EndToEnd/tags', - 'Integration' + 'EndToEnd/broadcasts/blocks-shortcodes' ] # Steps to install, configure and run tests @@ -279,6 +260,27 @@ jobs: - name: Start nginx run: sudo systemctl start nginx.service + # Debug: confirm whether multiple PHP installs / FPM units / socket + # permission issues are causing the 502 on PHP 8.3. + - name: Debug PHP and FPM state + run: | + echo "=== which php ===" + which php || true + echo "=== php --version ===" + php --version || true + echo "=== /run/php contents ===" + ls -la /run/php/ || true + echo "=== FPM pool config (listen settings) ===" + cat /etc/php/${{ matrix.php-versions }}/fpm/pool.d/www.conf | grep -E '^(listen|user|group)' || true + echo "=== systemd PHP-FPM units ===" + systemctl list-units --no-pager --all | grep -i php || true + echo "=== nginx user ===" + ps aux | grep nginx | head -5 || true + echo "=== installed php packages ===" + dpkg -l | grep -E '^ii\s+php' || true + echo "=== curl test against nginx ===" + curl -v -s http://127.0.0.1/ 2>&1 | head -30 || true + # Start chromedriver - name: Start chromedriver run: | From 56c017f6a4aaaeac64700982b647134032c17bd8 Mon Sep 17 00:00:00 2001 From: Tim Carr Date: Fri, 8 May 2026 23:22:38 +0800 Subject: [PATCH 2/4] Add Restart PHP-FPM Step --- .github/workflows/tests.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 91390cf47..ce41de850 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -217,6 +217,19 @@ jobs: php-version: ${{ matrix.php-versions }} coverage: xdebug + # Workaround for PHP 8.3 (and potentially other versions): the GitHub + # Actions ubuntu-latest runner ships with a pre-installed PHP that leaves + # an empty regular file at /run/php/php-fpm.sock. setup-php + # installs a different patch version on top, but PHP-FPM never replaces + # the stale file with a real Unix socket, so nginx returns 502. + # Removing the stale file and restarting PHP-FPM forces a clean socket. + - name: Restart PHP-FPM + run: | + sudo rm -f /run/php/php${{ matrix.php-versions }}-fpm.sock + sudo systemctl restart php${{ matrix.php-versions }}-fpm + sleep 1 + ls -la /run/php/ + # Configure nginx to use the PHP version and WOrdPress installation at /var/www/html - name: Configure nginx site run: | From 3a4ce48181a952ccb15a422a2372876464a5281c Mon Sep 17 00:00:00 2001 From: Tim Carr Date: Fri, 8 May 2026 23:27:47 +0800 Subject: [PATCH 3/4] Remove debugging; restart PHP-FPM on backward compat. tests --- .github/workflows/tests-backward-compat.yml | 13 +++++++++++++ .github/workflows/tests.yml | 21 --------------------- 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/.github/workflows/tests-backward-compat.yml b/.github/workflows/tests-backward-compat.yml index 97e7a5170..00fdf3de2 100644 --- a/.github/workflows/tests-backward-compat.yml +++ b/.github/workflows/tests-backward-compat.yml @@ -197,6 +197,19 @@ jobs: php-version: ${{ matrix.php-versions }} coverage: xdebug + # Workaround for PHP 8.3 (and potentially other versions): the GitHub + # Actions ubuntu-latest runner ships with a pre-installed PHP that leaves + # an empty regular file at /run/php/php-fpm.sock. setup-php + # installs a different patch version on top, but PHP-FPM never replaces + # the stale file with a real Unix socket, so nginx returns 502. + # Removing the stale file and restarting PHP-FPM forces a clean socket. + - name: Restart PHP-FPM + run: | + sudo rm -f /run/php/php${{ matrix.php-versions }}-fpm.sock + sudo systemctl restart php${{ matrix.php-versions }}-fpm + sleep 1 + ls -la /run/php/ + # Configure nginx to use the PHP version and WOrdPress installation at /var/www/html - name: Configure nginx site run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ce41de850..2af26f4d2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -273,27 +273,6 @@ jobs: - name: Start nginx run: sudo systemctl start nginx.service - # Debug: confirm whether multiple PHP installs / FPM units / socket - # permission issues are causing the 502 on PHP 8.3. - - name: Debug PHP and FPM state - run: | - echo "=== which php ===" - which php || true - echo "=== php --version ===" - php --version || true - echo "=== /run/php contents ===" - ls -la /run/php/ || true - echo "=== FPM pool config (listen settings) ===" - cat /etc/php/${{ matrix.php-versions }}/fpm/pool.d/www.conf | grep -E '^(listen|user|group)' || true - echo "=== systemd PHP-FPM units ===" - systemctl list-units --no-pager --all | grep -i php || true - echo "=== nginx user ===" - ps aux | grep nginx | head -5 || true - echo "=== installed php packages ===" - dpkg -l | grep -E '^ii\s+php' || true - echo "=== curl test against nginx ===" - curl -v -s http://127.0.0.1/ 2>&1 | head -30 || true - # Start chromedriver - name: Start chromedriver run: | From e68940f5299119c3fdd6f5137521ddbb89de058a Mon Sep 17 00:00:00 2001 From: Tim Carr Date: Fri, 8 May 2026 23:29:33 +0800 Subject: [PATCH 4/4] Reinstate all tests --- .github/workflows/tests.yml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2af26f4d2..146c2d248 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -89,11 +89,30 @@ jobs: fail-fast: false matrix: wp-versions: [ 'latest' ] #[ '6.1.1', 'latest' ] - php-versions: [ '8.3' ] #[ '7.4', '8.0', '8.1' ] + php-versions: [ '8.1', '8.2', '8.3', '8.4' ] #[ '7.4', '8.0', '8.1' ] # Folder names within the 'tests' folder to run tests in parallel. test-groups: [ - 'EndToEnd/broadcasts/blocks-shortcodes' + 'EndToEnd/broadcasts/blocks-shortcodes', + 'EndToEnd/broadcasts/import-export', + 'EndToEnd/forms/blocks-shortcodes', + 'EndToEnd/forms/general', + 'EndToEnd/forms/post-types', + 'EndToEnd/general/other', + 'EndToEnd/general/uninstall', + 'EndToEnd/general/plugin-screens', + 'EndToEnd/integrations/divi-builder', + 'EndToEnd/integrations/divi-theme', + 'EndToEnd/integrations/elementor', + 'EndToEnd/integrations/other', + 'EndToEnd/integrations/wlm', + 'EndToEnd/integrations/woocommerce', + 'EndToEnd/landing-pages', + 'EndToEnd/products', + 'EndToEnd/restrict-content/general', + 'EndToEnd/restrict-content/post-types', + 'EndToEnd/tags', + 'Integration' ] # Steps to install, configure and run tests