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

@@ -44,25 +44,32 @@ jobs:
- name: Setup PHP
run: |
# 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.4 \
php8.4-cli \
php8.4-dom \
php8.4-curl \
php8.4-xml \
php8.4-mbstring \
php8.4-zip \
php8.4-pcntl \
php8.4-pdo \
php8.4-pdo-sqlite \
php8.4-bcmath \
php8.4-soap \
php8.4-intl \
php8.4-gd \
php8.4-exif \
php8.4-iconv \
php8.4-sodium \
php8.3 \
php8.3-cli \
php8.3-dom \
php8.3-curl \
php8.3-xml \
php8.3-mbstring \
php8.3-zip \
php8.3-pcntl \
php8.3-pdo \
php8.3-pdo-sqlite \
php8.3-bcmath \
php8.3-soap \
php8.3-intl \
php8.3-gd \
php8.3-exif \
php8.3-iconv \
php8.3-sodium \
composer
- name: Validate composer.json and composer.lock