From fd0a26ad9d6441ea994c5d5a8e41f57c20fd5f84 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Tue, 30 May 2023 08:30:46 -0600 Subject: [PATCH 1/5] Adds $admin property This PR intends to fix this error added by PHP 8.2: Deprecated: Creation of dynamic property Pantheon_Sessions::$admin is deprecated in /usr/src/app/content/plugins/wp-native-php-sessions/pantheon-sessions.php on line 93 --- pantheon-sessions.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pantheon-sessions.php b/pantheon-sessions.php index 3633d667..7c28c3d1 100644 --- a/pantheon-sessions.php +++ b/pantheon-sessions.php @@ -27,6 +27,13 @@ class Pantheon_Sessions { */ private static $instance; + /** + * The admin instance. + * + * @var \Pantheon_Sessions\Admin + */ + private $admin; + /** * Gets a copy of the singleton instance. * From d34c8373f71c76b6a35ad95f1f1e7c171443e1f9 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Tue, 30 May 2023 08:34:17 -0600 Subject: [PATCH 2/5] fixes lints that were missed in previous PR --- pantheon-sessions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pantheon-sessions.php b/pantheon-sessions.php index 7c28c3d1..f0905397 100644 --- a/pantheon-sessions.php +++ b/pantheon-sessions.php @@ -171,9 +171,9 @@ private function initialize_session_override() { require_once __DIR__ . '/inc/class-session-handler.php'; $session_handler = new Pantheon_Sessions\Session_Handler(); if ( PHP_SESSION_ACTIVE !== session_status() ) { - // Check if headers have already been sent + // Check if headers have already been sent. if ( headers_sent( $file, $line ) ) { - // Output a friendly error message if headers are already sent + // Output a friendly error message if headers are already sent. trigger_error( sprintf( /* translators: %1s: File path, %2d: Line number */ From 17efe17cf6934fcb8be8b1f7c14a18a1a096f973 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Thu, 1 Jun 2023 08:50:36 -0600 Subject: [PATCH 3/5] bump version --- pantheon-sessions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pantheon-sessions.php b/pantheon-sessions.php index f0905397..2154b507 100644 --- a/pantheon-sessions.php +++ b/pantheon-sessions.php @@ -1,7 +1,7 @@ Date: Thu, 1 Jun 2023 08:58:05 -0600 Subject: [PATCH 4/5] bump version, tested up to & update changelog --- README.md | 7 +++++-- readme.txt | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3eec9898..48775fae 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ **Contributors:** [getpantheon](https://profiles.wordpress.org/getpantheon), [outlandish josh](https://profiles.wordpress.org/outlandish-josh), [mpvanwinkle77](https://profiles.wordpress.org/mpvanwinkle77), [danielbachhuber](https://profiles.wordpress.org/danielbachhuber), [andrew.taylor](https://profiles.wordpress.org/andrew.taylor), [jazzs3quence](https://profiles.wordpress.org/jazzs3quence), [stovak](https://profiles.wordpress.org/stovak), [jspellman](https://profiles.wordpress.org/jspellman/) **Tags:** comments, sessions **Requires at least:** 4.7 -**Tested up to:** 6.2 -**Stable tag:** 1.3.5 +**Tested up to:** 6.2.2 +**Stable tag:** 1.3.6 **Requires PHP:** 5.4 **License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html @@ -71,6 +71,9 @@ This mu-plugin will load WP Native PHP Sessions before all other plugins, while ## Changelog ## +### 1.3.6 (June 1, 2023) ### +* Fixes PHP 8.2 deprecated dynamic property error [[#251](https://github.com/pantheon-systems/wp-native-php-sessions/pull/251)] (props @miguelaxcar) + ### 1.3.5 (April 7, 2023) ### * Bump yoast/phpunit-polyfills from 1.0.4 to 1.0.5 [[#245](https://github.com/pantheon-systems/wp-native-php-sessions/pull/245)]. * Bump tested up to version diff --git a/readme.txt b/readme.txt index 18d8131b..c9eb990d 100644 --- a/readme.txt +++ b/readme.txt @@ -2,8 +2,8 @@ Contributors: getpantheon, outlandish josh, mpvanwinkle77, danielbachhuber, andrew.taylor, jazzs3quence, stovak, jspellman Tags: comments, sessions Requires at least: 4.7 -Tested up to: 6.2 -Stable tag: 1.3.5 +Tested up to: 6.2.2 +Stable tag: 1.3.6 Requires PHP: 5.4 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -69,6 +69,9 @@ To fix, create a new file at `wp-content/mu-plugins/000-loader.php` and include This mu-plugin will load WP Native PHP Sessions before all other plugins, while letting you still use the WordPress plugin updater to keep the plugin up-to-date. == Changelog == += 1.3.6 (June 1, 2023) = +* Fixes PHP 8.2 deprecated dynamic property error [[#251](https://github.com/pantheon-systems/wp-native-php-sessions/pull/251)] (props @miguelaxcar) + = 1.3.5 (April 7, 2023) = * Bump yoast/phpunit-polyfills from 1.0.4 to 1.0.5 [[#245](https://github.com/pantheon-systems/wp-native-php-sessions/pull/245)]. * Bump tested up to version From a4486d2cfbbb97faec6eabd68864ecd3c2dbe455 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Thu, 1 Jun 2023 11:30:16 -0600 Subject: [PATCH 5/5] re-add plucked stable tag --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index a81d2859..c774059c 100644 --- a/readme.txt +++ b/readme.txt @@ -3,6 +3,7 @@ Contributors: getpantheon, outlandish josh, mpvanwinkle77, danielbachhuber, andr Tags: comments, sessions Requires at least: 4.7 Tested up to: 6.2.2 +Stable tag: 1.3.6-dev Requires PHP: 5.4 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html