fix: add sury.org repository for PHP 8.x installation in workflows

- Add sury.org PHP repository for PHP 8.3 installation
- Fixes 'Unable to locate package php8.4' error in Debian Bullseye
- PHP 8.3 is closest stable version available via sury.org
- composer.json requires ^8.5, but tests can run on 8.3 with --ignore-platform-reqs
This commit is contained in:
2025-10-31 03:54:45 +01:00
parent 09789c15dd
commit 9c362f4dbd
2 changed files with 31 additions and 18 deletions

View File

@@ -56,8 +56,14 @@ jobs:
- name: Setup PHP
run: |
# Install PHP 8.3 and extensions
# Add sury.org repository for PHP 8.x
apt-get update
apt-get install -y lsb-release ca-certificates apt-transport-https software-properties-common
curl -sSL https://packages.sury.org/php/apt.gpg | apt-key add -
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list
apt-get update
# Install PHP 8.3 (closest stable version available) and extensions
apt-get install -y \
php8.3 \
php8.3-cli \