From 465e819d52783a969cc15f8628c922627f59c33e Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 21 May 2026 15:47:07 -0700 Subject: [PATCH 1/3] Modify composer commands for PHP 8 support Update PHP package management commands for PHP 8 compatibility. --- .github/workflows/tests.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8fcdd5f..4a75a88 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -726,8 +726,10 @@ jobs: Set-ACL -Path "${env:TEMP_DIR}" -ACLObject $acl cd ${env:GITHUB_WORKSPACE}\phpBB3\phpBB php ..\composer.phar install - php ..\composer.phar remove phpunit/dbunit --dev --update-with-dependencies - php ..\composer.phar require symfony/yaml:~4.4 misantron/dbunit:~5.0 phpunit/phpunit:^9.3 doctrine/instantiator:^1.4 --dev --update-with-all-dependencies --ignore-platform-reqs + if ("${{ matrix.php }}" -match "^8") { + php ..\composer.phar remove phpunit/dbunit --dev --update-with-dependencies --no-security-blocking + php ..\composer.phar require symfony/yaml:^4.4 misantron/dbunit:5.2.1 phpunit/phpunit:^9.3 doctrine/instantiator:^1.4 --dev --update-with-all-dependencies --ignore-platform-reqs --no-security-blocking + } cd .. - name: Setup database From e19c77b7958242fa4773c50477ca2858b83112a9 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Wed, 12 Aug 2026 09:24:41 -0700 Subject: [PATCH 2/3] Address when Choclately fails on IIS runners --- .github/workflows/tests.yml | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4a75a88..3b0d932 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -696,9 +696,33 @@ jobs: run: | Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole, IIS-WebServer, IIS-CommonHttpFeatures, IIS-ManagementConsole, IIS-HttpErrors, IIS-HttpRedirect, IIS-WindowsAuthentication, IIS-StaticContent, IIS-DefaultDocument, IIS-HttpCompressionStatic, IIS-DirectoryBrowsing, IIS-WebServerManagementTools, IIS-CGI -All Set-Service wuauserv -StartupType Manual - (Get-Content ${env:GITHUB_WORKSPACE}\phpBB3\phpBB\web.config).replace("", "`n`t`n`t`t`n`t") | Set-Content ${env:GITHUB_WORKSPACE}\phpBB3\phpBB\web.config - (Get-Content ${env:GITHUB_WORKSPACE}\phpBB3\phpBB\web.config).replace("`t", "`t`t`n`t") | Set-Content ${env:GITHUB_WORKSPACE}\phpBB3\phpBB\web.config - choco install urlrewrite -y + $webConfig = "${env:GITHUB_WORKSPACE}\phpBB3\phpBB\web.config" + # Install URL Rewrite with retries because Chocolatey feed requests can timeout on GitHub runners. + $installed = $false + for ($i = 1; $i -le 3; $i++) { + try { + choco install urlrewrite -y --no-progress + $installed = $true + break + } catch { + Write-Warning "URL Rewrite install attempt $i failed: $($_.Exception.Message)" + Start-Sleep -Seconds (10 * $i) + } + } + if (-not $installed) { + throw "Failed to install URL Rewrite after 3 attempts." + } + # Only patch web.config after rewrite is installed. + $content = Get-Content $webConfig -Raw + $content = $content.Replace( + "", + "`n`t`n`t`t`n`t" + ) + $content = $content.Replace( + "`t", + "`t`t`n`t" + ) + Set-Content $webConfig -Value $content -Encoding UTF8 Import-Module WebAdministration New-WebSite -Name 'phpBBTest' -PhysicalPath "${env:GITHUB_WORKSPACE}\phpBB3\phpBB" -Force $session = Get-PSSession -Name WinPSCompatSession From 2f5dbe307ea28fc901ba6e0e4bd2404fca42c560 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Wed, 12 Aug 2026 09:41:31 -0700 Subject: [PATCH 3/3] Try fixing windows again --- .github/workflows/tests.yml | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3b0d932..9f98e3c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -697,22 +697,6 @@ jobs: Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole, IIS-WebServer, IIS-CommonHttpFeatures, IIS-ManagementConsole, IIS-HttpErrors, IIS-HttpRedirect, IIS-WindowsAuthentication, IIS-StaticContent, IIS-DefaultDocument, IIS-HttpCompressionStatic, IIS-DirectoryBrowsing, IIS-WebServerManagementTools, IIS-CGI -All Set-Service wuauserv -StartupType Manual $webConfig = "${env:GITHUB_WORKSPACE}\phpBB3\phpBB\web.config" - # Install URL Rewrite with retries because Chocolatey feed requests can timeout on GitHub runners. - $installed = $false - for ($i = 1; $i -le 3; $i++) { - try { - choco install urlrewrite -y --no-progress - $installed = $true - break - } catch { - Write-Warning "URL Rewrite install attempt $i failed: $($_.Exception.Message)" - Start-Sleep -Seconds (10 * $i) - } - } - if (-not $installed) { - throw "Failed to install URL Rewrite after 3 attempts." - } - # Only patch web.config after rewrite is installed. $content = Get-Content $webConfig -Raw $content = $content.Replace( "", @@ -722,6 +706,16 @@ jobs: "`t", "`t`t`n`t" ) + $rewriteInstalled = $false + try { + choco install urlrewrite -y --no-progress + $rewriteInstalled = $true + } catch { + Write-Warning "URL Rewrite installation failed; continuing without rewrite-specific IIS configuration." + } + if (-not $rewriteInstalled) { + $content = $content -replace "(?s)`r?`n\s*.*?", "" + } Set-Content $webConfig -Value $content -Encoding UTF8 Import-Module WebAdministration New-WebSite -Name 'phpBBTest' -PhysicalPath "${env:GITHUB_WORKSPACE}\phpBB3\phpBB" -Force