Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ jobs:
php-version: 8.3
- name: Install dependencies
run: composer install -n --prefer-dist
- name: Run PHPCS
- name: Lint
run: composer lint
- name: Codesniffer
run: composer phpcs
php8-compatibility:
name: PHP 8.x Compatibility
runs-on: ubuntu-latest
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/test-behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ name: Behat CI

on:
push:
branches: [ master, main ]
branches: [ develop, main, release ]
pull_request:
workflow_dispatch:
schedule:
# Nightly at 00:00 UTC (CircleCI had cron "0 0 * * *" with branch filter=master)
- cron: "0 0 * * *"

permissions:
contents: read
Expand All @@ -20,10 +17,16 @@ jobs:

runs-on: ubuntu-latest

strategy:
matrix:
php-version: ['7.4', '8.1', '8.3']
fail-fast: false

env:
RUN_NUM: ${{ github.run_number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TERMINUS_TOKEN: ${{ secrets.TERMINUS_TOKEN }}
PHP_VERSION_OVERRIDE: ${{ matrix.php-version }}

steps:
- name: Checkout
Expand All @@ -41,9 +44,6 @@ jobs:
- name: Install dependencies
run: composer install -n --prefer-dist

- name: Run PHP Lint
run: composer phpcs

- name: Install Terminus
uses: pantheon-systems/terminus-github-actions@v1
with:
Expand All @@ -62,10 +62,11 @@ jobs:

- name: Export env
run: |
PHP_VERSION_CLEAN=$(echo "${{ matrix.php-version }}" | tr -d '.')
{
echo "TERMINUS_ENV=ci-${RUN_NUM}"
echo "TERMINUS_ENV=ci-${RUN_NUM}-php${PHP_VERSION_CLEAN}"
echo "TERMINUS_SITE=wp-native-php-sessions"
echo "SITE_ENV=wp-native-php-sessions.ci-${RUN_NUM}"
echo "SITE_ENV=wp-native-php-sessions.ci-${RUN_NUM}-php${PHP_VERSION_CLEAN}"
echo "WORDPRESS_ADMIN_USERNAME=pantheon"
echo "WORDPRESS_ADMIN_EMAIL=no-reply@getpantheon.com"
echo "WORDPRESS_ADMIN_PASSWORD=$(cat /tmp/WORDPRESS_ADMIN_PASSWORD)"
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
**Tags:** comments, sessions
**Requires at least:** 5.3
**Tested up to:** 6.8.1
**Stable tag:** 1.4.4
**Stable tag:** 1.4.5-dev
**Requires PHP:** 7.4
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -100,6 +100,8 @@ Adds a WP-CLI command to add an index to the sessions table if one does not exis

## Changelog ##

### 1.4.5-dev ###

### 1.4.4 (September 17, 2025) ###
* Compatibility: Supports PHP 8.4
* Increases minimum supported PHP version to 7.4
Expand Down
25 changes: 23 additions & 2 deletions bin/behat-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,33 @@ rm -rf "$PREPARE_DIR"/wp-content/mu-plugins/sessions-debug.php
cp "$BASH_DIR"/fixtures/sessions-debug.php "$PREPARE_DIR"/wp-content/mu-plugins/sessions-debug.php

###
# Push files to the environment
# Configure PHP version if specified
###
cd "$PREPARE_DIR"
git add wp-content
git config user.email "wp-native-php-sessions@getpantheon.com"
git config user.name "Pantheon"

if [ -n "${PHP_VERSION_OVERRIDE:-}" ]; then
echo "Setting PHP version to: $PHP_VERSION_OVERRIDE"

# Check current PHP version in pantheon.yml
CURRENT_PHP_VERSION=$(grep "^php_version:" pantheon.yml | cut -d' ' -f2)

if [ "$CURRENT_PHP_VERSION" != "$PHP_VERSION_OVERRIDE" ]; then
# Update the existing pantheon.yml file with the new PHP version
sed -i.bak "s/^php_version:.*/php_version: $PHP_VERSION_OVERRIDE/" pantheon.yml
git add pantheon.yml
git commit -m "Set PHP version to $PHP_VERSION_OVERRIDE"
echo "PHP version changed from $CURRENT_PHP_VERSION to $PHP_VERSION_OVERRIDE"
else
echo "PHP version already set to $PHP_VERSION_OVERRIDE, no change needed"
fi
fi

###
# Push files to the environment
###
git add wp-content
git commit -m "Include WP Native PHP Sessions and its configuration files"
git push

Expand Down
4 changes: 2 additions & 2 deletions pantheon-sessions.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Plugin Name: Native PHP Sessions
* Version: 1.4.4
* Version: 1.4.5-dev
* Description: Offload PHP's native sessions to your database for multi-server compatibility.
* Author: Pantheon
* Author URI: https://www.pantheon.io/
Expand All @@ -13,7 +13,7 @@

use Pantheon_Sessions\Session;

define( 'PANTHEON_SESSIONS_VERSION', '1.4.4' );
define( 'PANTHEON_SESSIONS_VERSION', '1.4.5-dev' );

/**
* Main controller class for the plugin.
Expand Down
4 changes: 3 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: getpantheon, outlandish josh, mpvanwinkle77, danielbachhuber, andr
Tags: comments, sessions
Requires at least: 5.3
Tested up to: 6.8.1
Stable tag: 1.4.4
Stable tag: 1.4.5-dev
Requires PHP: 7.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -98,6 +98,8 @@ Adds a WP-CLI command to add an index to the sessions table if one does not exis

== Changelog ==

= 1.4.5-dev =

= 1.4.4 (September 17, 2025) =
* Compatibility: Supports PHP 8.4
* Increases minimum supported PHP version to 7.4
Expand Down