Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
64 changes: 0 additions & 64 deletions .circleci/config.yml

This file was deleted.

105 changes: 105 additions & 0 deletions .github/workflows/test-behat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Behat CI

on:
push:
branches: [ master, main ]
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
actions: write

jobs:
test-behat:
# Run nightly only on master (schedule can't filter branches directly)
if: github.event_name != 'schedule' || github.ref == 'refs/heads/master'

runs-on: ubuntu-latest

env:
RUN_NUM: ${{ github.run_number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TERMINUS_TOKEN: ${{ secrets.TERMINUS_TOKEN }}

steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/vendor
key: test-lint-dependencies-{{ checksum "composer.json" }}
restore-keys: test-lint-dependencies-{{ checksum "composer.json" }}

- 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:
pantheon-machine-token: ${{ secrets.TERMINUS_TOKEN }}

- name: Validate Readme Spacing
uses: pantheon-systems/validate-readme-spacing@v1

- name: Install Subversion
run: |
sudo apt-get update
sudo apt-get install subversion

- name: Generate admin password
run: echo $(openssl rand -hex 8) > /tmp/WORDPRESS_ADMIN_PASSWORD

- name: Export env
run: |
{
echo "TERMINUS_ENV=ci-${RUN_NUM}"
echo "TERMINUS_SITE=wp-native-php-sessions"
echo "SITE_ENV=wp-native-php-sessions.ci-${RUN_NUM}"
echo "WORDPRESS_ADMIN_USERNAME=pantheon"
echo "WORDPRESS_ADMIN_EMAIL=no-reply@getpantheon.com"
echo "WORDPRESS_ADMIN_PASSWORD=$(cat /tmp/WORDPRESS_ADMIN_PASSWORD)"
} >> "$GITHUB_ENV"

- name: Force SSH to ignore host keys
run: echo "GIT_SSH_COMMAND=ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" >> $GITHUB_ENV

- name: Install SSH key
uses: webfactory/ssh-agent@v0.9.1

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium test

Unpinned 3rd party Action 'Behat CI' step
Uses Step
uses 'webfactory/ssh-agent' with ref 'v0.9.1', not a pinned commit hash
with:
ssh-private-key: ${{ secrets.SITE_OWNER_SSH_PRIVATE_KEY }}

- name: Configure Composer GitHub OAuth (optional)
if: env.GITHUB_TOKEN != ''
run: |
echo "Setting Composer GitHub OAuth token (output suppressed)"
{ composer config -g github-oauth.github.com "$GITHUB_TOKEN"; } &>/dev/null

- name: Validate fixture version
uses: jazzsequence/action-validate-plugin-version@v2

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium test

Unpinned 3rd party Action 'Behat CI' step
Uses Step
uses 'jazzsequence/action-validate-plugin-version' with ref 'v2', not a pinned commit hash
with:
branch: ${{ github.head_ref }}
dry-run: 'true'

- name: Behat prepare
run: |
terminus auth:login --machine-token=$TERMINUS_TOKEN
terminus self:plugin:install terminus-build-tools-plugin
./bin/behat-prepare.sh

- name: Behat tests (strict)
run: ./bin/behat-test.sh --strict

- name: Cleanup (always)
if: always()
run: ./bin/behat-cleanup.sh
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.DS_Store
.idea
.codacy
Thumbs.db
wp-cli.local.yml
node_modules/
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
**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 (20 November 2025) ###

### 1.4.4 (September 17, 2025) ###
* Compatibility: Supports PHP 8.4
* Increases minimum supported PHP version to 7.4
Expand Down
16 changes: 11 additions & 5 deletions bin/behat-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,23 @@
###

if [ -z "$TERMINUS_SITE" ] || [ -z "$TERMINUS_ENV" ]; then
echo "TERMINUS_SITE and TERMINUS_ENV environment variables must be set"
exit 1
echo "TERMINUS_SITE and TERMINUS_ENV environment variables must be set"
exit 1
fi

if [ -z "$WORDPRESS_ADMIN_USERNAME" ] || [ -z "$WORDPRESS_ADMIN_PASSWORD" ]; then
echo "WORDPRESS_ADMIN_USERNAME and WORDPRESS_ADMIN_PASSWORD environment variables must be set"
exit 1
echo "WORDPRESS_ADMIN_USERNAME and WORDPRESS_ADMIN_PASSWORD environment variables must be set"
exit 1
fi

set -ex

###
# Install Composer dependencies, including Behat. This makes the
# ./vendor/bin/behat executable available for the test runner.
###
composer install --no-progress --prefer-dist

###
# Create a new environment for this particular test run.
###
Expand Down Expand Up @@ -67,7 +73,7 @@ git commit -m "Include WP Native PHP Sessions and its configuration files"
git push

# Sometimes Pantheon takes a little time to refresh the filesystem
terminus build:workflow:wait "$TERMINUS_SITE"."$TERMINUS_ENV"
terminus workflow:wait "$TERMINUS_SITE"."$TERMINUS_ENV"

###
# Set up WordPress, theme, and plugins for the test run
Expand Down
44 changes: 0 additions & 44 deletions bin/validate-fixture-version.sh

This file was deleted.

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
* 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' );

/**
* 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
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 (20 November 2025) =

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