From d5a09fb3375256eaeb0c662d8dde05fd8217cfa0 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 5 May 2026 09:19:39 -0700 Subject: [PATCH] Bump PHP to 8.1 minimum and resolve composer.lock in CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .gitea/workflows/release.yml | 11 ++++++++++- CLAUDE.md | 2 +- README.md | 2 +- composer.json | 4 ++-- twilio-wp-plugin.php | 1 + 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 998bddf..9197b24 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -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 diff --git a/CLAUDE.md b/CLAUDE.md index e60ac1a..b2819c7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,7 +6,7 @@ - **URL**: `https://phone.cloud-hosting.io/` - **Deployment**: rsync to Docker (remote server only, not local) - **SDK**: Twilio PHP SDK v8.7.0 -- **PHP**: 8.0+ required +- **PHP**: 8.1+ required (AWS SDK v3.371+ requires PHP 8.1; production runs 8.5) - **Optional**: AWS SDK (`aws/aws-sdk-php`) for SNS SMS provider - **External SDK**: `wp-content/twilio-sdk/` (survives plugin updates) diff --git a/README.md b/README.md index 375dae6..8078de3 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ This plugin **requires** the Twilio PHP SDK v8.7.0 to function. The plugin will ## Requirements -- **PHP 8.0+** (required for Twilio SDK v8.7.0) +- **PHP 8.1+** (required by AWS SDK for SNS provider; Twilio SDK works on 8.0+) - **WordPress 5.0+** - **Twilio Account** with active phone number - **curl** and **tar** (for SDK installation) diff --git a/composer.json b/composer.json index 5b006ba..2d7cdf8 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "WordPress plugin for Twilio voice and SMS integration - REQUIRES Twilio SDK", "type": "wordpress-plugin", "require": { - "php": ">=8.0", + "php": ">=8.1", "twilio/sdk": "^8.7", "aws/aws-sdk-php": "^3.0" }, @@ -19,7 +19,7 @@ "config": { "optimize-autoloader": true, "platform": { - "php": "8.0" + "php": "8.1" } }, "scripts": { diff --git a/twilio-wp-plugin.php b/twilio-wp-plugin.php index a410ebb..cb6e7fb 100644 --- a/twilio-wp-plugin.php +++ b/twilio-wp-plugin.php @@ -4,6 +4,7 @@ * Plugin URI: https://repo.anhonesthost.net/wp-plugins/twilio-wp-plugin * Description: WordPress plugin for Twilio integration with phone scheduling, call forwarding, queue management, and Eleven Labs TTS * Version: {auto_update_value_on_deploy} + * Requires PHP: 8.1 * Author: Josh Knapp * License: GPL v2 or later * Text Domain: twilio-wp-plugin -- 2.47.3