Skip to content

Commit

Permalink
Ready to release 2.14.0 on wp.org
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Lannoy committed May 7, 2024
1 parent 1b81592 commit 9bea74d
Show file tree
Hide file tree
Showing 9 changed files with 178 additions and 151 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ All notable changes to **Sessions** are documented in this *changelog*.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and **Sessions** adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.14.0] - 2024-05-07

### Changed
- The plugin now adapts its requirements to the PSR-3 loaded version.

## [2.13.3] - 2024-05-04

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion includes/libraries/class-libraries.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static function init() {
'name' => 'DecaLog SDK',
'prefix' => 'DecaLog',
'base' => POSE_VENDOR_DIR . 'decalog-sdk/',
'version' => '4.1.0',
'version' => '4.2.0',
'author' => 'Pierre Lannoy',
'url' => 'https://github.com/Pierre-Lannoy/wp-decalog-sdk',
'license' => 'mit',
Expand Down
28 changes: 25 additions & 3 deletions includes/libraries/decalog-sdk/Engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Engine {
* @since 1.0.0
* @var string $version Maintains the engine version.
*/
private static $version = '4.1.0';
private static $version = '4.2.0';

/**
* The logger instances and parameters.
Expand All @@ -39,7 +39,7 @@ class Engine {
/**
* Registers a new logger.
*
* @param string $class The class identifier, must be a value in ['plugin', 'theme'].
* @param string $class The class identifier, must be a value in ['plugin', 'theme', 'library'].
* @param string $slug The slug identifier.
* @param string $name The name of the component that will trigger events.
* @param string $version The version of the component that will trigger events.
Expand Down Expand Up @@ -82,6 +82,28 @@ public static function getSdkVersion() {
return self::$version;
}

/**
* Get the loaded version of PSR-3.
*
* @return int The PSR-3 main version.
* @since 4.2.0
*/
public static function getPsrVersion() {
if ( class_exists( '\Psr\Log\NullLogger') ) {
$reflection = new \ReflectionMethod(\Psr\Log\NullLogger::class, 'log');
foreach ( $reflection->getParameters() as $param ) {
if ( 'message' === $param->getName() ) {
if ( str_contains($param->getType() ?? '', '|') ) {
return 3;
}
}
}
} else {
return 0;
}
return 1;
}

/**
* Get the version of DecaLog.
*
Expand All @@ -106,7 +128,7 @@ public static function getVersionString() {
if ( ! defined( 'DECALOG_PRODUCT_NAME' ) ) {
define( 'DECALOG_PRODUCT_NAME', 'DecaLog' );
}
return DECALOG_PRODUCT_NAME . ' ' . self::getDecalogVersion() . ' (SDK ' . self::getSdkVersion() . ')';
return DECALOG_PRODUCT_NAME . ' ' . self::getDecalogVersion() . ' (SDK ' . self::getSdkVersion() . ' / PSR-3^' . self::getPsrVersion() . ')';
}
return '';
}
Expand Down
284 changes: 142 additions & 142 deletions includes/libraries/decalog-sdk/EventsLogger.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion includes/libraries/decalog-sdk/MetricsLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class MetricsLogger {
/**
* Initialize the class and set its properties.
*
* @param string $class The class identifier, must be a value in ['plugin', 'theme'].
* @param string $class The class identifier, must be a value in ['plugin', 'theme', 'library'].
* @param string $name Optional. The name of the component that will trigger events.
* @param string $version Optional. The version of the component that will trigger events.
* @since 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion includes/libraries/decalog-sdk/TracesLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class TracesLogger {
/**
* Initialize the class and set its properties.
*
* @param string $class The class identifier, must be a value in ['plugin', 'theme'].
* @param string $class The class identifier, must be a value in ['plugin', 'theme', 'library'].
* @param string $name Optional. The name of the component that will trigger events.
* @param string $version Optional. The version of the component that will trigger events.
* @since 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion init.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
define( 'POSE_PRODUCT_SHORTNAME', 'Sessions' );
define( 'POSE_PRODUCT_ABBREVIATION', 'posessions' );
define( 'POSE_SLUG', 'sessions' );
define( 'POSE_VERSION', '2.13.3' );
define( 'POSE_VERSION', '2.14.0' );
define( 'POSE_CODENAME', '"-"' );
define( 'POSE_CDN_AVAILABLE', true );
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: authentication, login, protection, role, session
Requires at least: 6.2
Requires PHP: 8.1
Tested up to: 6.5
Stable tag: 2.13.3
Stable tag: 2.14.0
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down
2 changes: 1 addition & 1 deletion sessions.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Plugin Name: Sessions
* Plugin URI: https://perfops.one/sessions
* Description: Powerful sessions manager for WordPress with sessions limiter and full analytics reporting capabilities.
* Version: 2.13.3
* Version: 2.14.0
* Requires at least: 6.2
* Requires PHP: 8.1
* Author: Pierre Lannoy / PerfOps One
Expand Down

0 comments on commit 9bea74d

Please sign in to comment.