Skip to content

Commit

Permalink
Ready to release 1.9.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 2392878 commit 65c0416
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 **Vibes** are documented in this *changelog*.

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

## [1.9.0] - 2024-05-07

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

## [1.8.2] - 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 @@ -125,7 +125,7 @@ public static function init() {
'name' => 'DecaLog SDK',
'prefix' => 'DecaLog',
'base' => VIBES_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,7 +12,7 @@
define( 'VIBES_PRODUCT_SHORTNAME', 'Vibes' );
define( 'VIBES_PRODUCT_ABBREVIATION', 'vibes' );
define( 'VIBES_SLUG', 'vibes' );
define( 'VIBES_VERSION', '1.8.2' );
define( 'VIBES_VERSION', '1.9.0' );
define( 'VIBES_API_VERSION', '1' );
define( 'VIBES_CODENAME', '"-"' );

Expand Down
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: rum, real user monitoring, ux, web performance, web vitals
Requires at least: 6.2
Requires PHP: 8.1
Tested up to: 6.5
Stable tag: 1.8.2
Stable tag: 1.9.0
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down
2 changes: 1 addition & 1 deletion vibes.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Plugin Name: Vibes
* Plugin URI: https://perfops.one/vibes
* Description: Truthful user experience and browsing performances monitoring.
* Version: 1.8.2
* Version: 1.9.0
* Requires at least: 6.2
* Requires PHP: 8.1
* Author: Pierre Lannoy / PerfOps One
Expand Down

0 comments on commit 65c0416

Please sign in to comment.