Bump PHP to 8.1 minimum and resolve composer.lock in CI

The Gitea release build failed because aws/aws-sdk-php 3.371+ requires PHP
>= 8.1, while composer.json's platform was pinned to 8.0. Production runs
PHP 8.5.4, so bumping the minimum to 8.1 is well within the runtime envelope.

Changes:
  composer.json                 — require php >=8.1, platform.php = 8.1
  .gitea/workflows/release.yml  — setup-php now installs PHP 8.1
                                  added pre-install step that runs
                                  `composer update --no-install` only when
                                  composer.lock is absent. If a lock file is
                                  ever committed later, CI uses it directly
                                  for deterministic installs instead of
                                  regenerating.
  twilio-wp-plugin.php          — added "Requires PHP: 8.1" header so
                                  WordPress itself enforces the minimum
  README.md, CLAUDE.md          — doc bump from 8.0 to 8.1, with note that
                                  the AWS SDK is the constraint driver

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude
2026-05-05 09:19:39 -07:00
parent a2f450bb19
commit d5a09fb337
5 changed files with 15 additions and 5 deletions

View File

@@ -19,9 +19,18 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: '8.1'
tools: composer
- name: Generate composer.lock if missing
run: |
if [ ! -f composer.lock ]; then
echo "No composer.lock present — resolving dependencies."
composer update --no-dev --no-install --no-interaction --prefer-dist
else
echo "Using committed composer.lock."
fi
- name: Install Composer dependencies
run: composer install --no-dev --prefer-dist --optimize-autoloader --no-interaction