Plugin Directory

Changeset 3093990

Timestamp:
05/28/2024 02:48:45 PM (2 months ago)
Author:
PierreLannoy
Message:

Sessions 3.0.0 released from GitHub

Location:
sessions
Files:
38 added
2 deleted
18 edited
1 copied

Legend:

Unmodified
Added
Removed
  • sessions/tags/3.0.0/CHANGELOG.md

    r3082621 r3093990  
    33
    44The 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).
     5
     6
     7
     8
     9
     10
     11
     12
     13
     14
     15
    516
    617## [2.14.0] - 2024-05-07
  • sessions/tags/3.0.0/functions.php

    r2552017 r3093990  
    88 */
    99
    10 /**
    11  * Provide PHP 7.3 compatibility for array_key_last() function.
    12  */
    13 if ( ! function_exists( 'array_key_last' ) ) {
    14     // phpcs:ignore
    15     function array_key_last( array $array ) {
    16         if ( ! empty( $array ) ) {
    17             return key( array_slice( $array, -1, 1, true ) );
     10if ( ! function_exists('decalog_get_psr_log_version') ) {
     11    /**
     12     * Get the needed version of PSR-3.
     13     *
     14     * @return  int  The PSR-3 needed version.
     15     * @since 4.0.0
     16     */
     17    function decalog_get_psr_log_version() {
     18        $required = 1;
     19        if ( ! defined( 'DECALOG_PSR_LOG_VERSION') ) {
     20            define( 'DECALOG_PSR_LOG_VERSION', 'V1' );
    1821        }
     22
     23
     24
     25
     26
     27
     28
     29
     30
     31
     32
     33
     34
     35
     36
     37
     38
    1939    }
    2040}
    2141
    22 /**
    23  * Provide PHP 7.3 compatibility for array_key_first() function.
    24  */
    25 if ( ! function_exists( 'array_key_first' ) ) {
    26     // phpcs:ignore
    27     function array_key_first( array $arr ) {
    28         foreach ( $arr as $key => $unused ) {
    29             return $key;
    30         }
    31     }
    32 }
  • sessions/tags/3.0.0/includes/libraries/class-libraries.php

    r3082621 r3093990  
    8181            'langs'   => 'en',
    8282        ];
     83
     84
     85
     86
     87
    8388        self::$psr4_libraries['psr-03']      = [
    8489            'name'    => 'PSR-3',
    8590            'prefix'  => 'Psr\\Log',
    86             'base'    => POSE_VENDOR_DIR . 'psr/log/',
    87             'version' => '3.0.0',
     91            'base'    => POSE_VENDOR_DIR . 'psr/log/',
     92            'version' => .0.0',
    8893            'author'  => 'PHP Framework Interop Group',
    8994            'url'     => 'https://www.php-fig.org/',
     
    245250            foreach ( $list as $library ) {
    246251                /* translators: as in the sentence "Product W version X by author Y (license Z)" */
    247                 $items[] = sprintf( __( '<a href="%1$s">%2$s %3$s</a>%4$s by %5$s (%6$s)', 'sessions' ), $library['url'], $library['name'], $library['version'], $library['langs'], $library['author'], $library['license'] );
     252                $items[] = sprintf( __( '<a href="%1$s">%2$s %3$s</a>%4$s by %5$s (%6$s)', 'sessions' ), $library['url'], $library['name'], $library['version'], $library['langs'], $library['author'], $library['license'] );
    248253            }
    249254            $result = implode( ', ', $items );
  • sessions/tags/3.0.0/includes/libraries/decalog-sdk/Engine.php

    r3082621 r3093990  
    2727     * @var    string    $version    Maintains the engine version.
    2828     */
    29     private static $version = '4.2.0';
     29    private static $version = '.0';
    3030
    3131    /**
     
    9090     */
    9191    public static function getPsrVersion() {
    92         if ( class_exists( '\Psr\Log\NullLogger') ) {
    93             $reflection = new \ReflectionMethod(\Psr\Log\NullLogger::class, 'log');
    94             foreach ( $reflection->getParameters() as $param ) {
    95                 if ( 'message' === $param->getName() ) {
    96                     if ( str_contains($param->getType() ?? '', '|') ) {
    97                         return 3;
     92        $required = 1;
     93        if ( ! defined( 'DECALOG_PSR_LOG_VERSION') ) {
     94            define( 'DECALOG_PSR_LOG_VERSION', 'V1' );
     95        }
     96        switch ( strtolower( DECALOG_PSR_LOG_VERSION ) ) {
     97            case 'v3':
     98                $required = 3;
     99                break;
     100            case 'auto':
     101                if ( class_exists( '\Psr\Log\NullLogger') ) {
     102                    $reflection = new \ReflectionMethod(\Psr\Log\NullLogger::class, 'log');
     103                    foreach ( $reflection->getParameters() as $param ) {
     104                        if ( 'message' === $param->getName() ) {
     105                            if ( str_contains($param->getType() ?? '', '|') ) {
     106                                $required = 3;
     107                            }
     108                        }
    98109                    }
    99110                }
    100             }
    101         } else {
    102             return 0;
    103         }
    104         return 1;
     111        }
     112        return $required;
    105113    }
    106114
  • sessions/tags/3.0.0/includes/libraries/decalog-sdk/EventsLogger.php

    r3082621 r3093990  
    267267    }
    268268
    269 } else { // if version in not detected or equal to 1
     269} else {
    270270
    271271    /**
  • sessions/tags/3.0.0/init.php

    r3082621 r3093990  
    1313define( 'POSE_PRODUCT_ABBREVIATION', 'posessions' );
    1414define( 'POSE_SLUG', 'sessions' );
    15 define( 'POSE_VERSION', '2.14.0' );
     15define( 'POSE_VERSION', '.0' );
    1616define( 'POSE_CODENAME', '"-"' );
    1717define( 'POSE_CDN_AVAILABLE', true );
  • sessions/tags/3.0.0/perfopsone/functions.php

    r2595045 r3093990  
    1111
    1212use POSessions\System\Plugin;
    13 
    14 if ( version_compare( $wp_version, '5.5', '<' ) && ! function_exists( 'wp_is_auto_update_enabled_for_type' ) ) {
    15     /**
    16      * Provide WP 5.5 compatibility for wp_is_auto_update_enabled_for_type() function.
    17      */
    18     function wp_is_auto_update_enabled_for_type( $type ) {
    19         return false;
    20     }
    21 }
    2213
    2314if ( ! function_exists( 'poo_switch_autoupdate_callback' ) ) {
  • sessions/tags/3.0.0/readme.txt

    r3082621 r3093990  
    55Requires PHP: 8.1
    66Tested up to: 6.5
    7 Stable tag: 2.14.0
     7Stable tag: .0
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
  • sessions/tags/3.0.0/sessions.php

    r3082621 r3093990  
    1111 * Plugin URI:        https://perfops.one/sessions
    1212 * Description:       Powerful sessions manager for WordPress with sessions limiter and full analytics reporting capabilities.
    13  * Version:           2.14.0
     13 * Version:           .0
    1414 * Requires at least: 6.2
    1515 * Requires PHP:      8.1
  • sessions/trunk/CHANGELOG.md

    r3082621 r3093990  
    33
    44The 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).
     5
     6
     7
     8
     9
     10
     11
     12
     13
     14
     15
    516
    617## [2.14.0] - 2024-05-07
  • sessions/trunk/functions.php

    r2552017 r3093990  
    88 */
    99
    10 /**
    11  * Provide PHP 7.3 compatibility for array_key_last() function.
    12  */
    13 if ( ! function_exists( 'array_key_last' ) ) {
    14     // phpcs:ignore
    15     function array_key_last( array $array ) {
    16         if ( ! empty( $array ) ) {
    17             return key( array_slice( $array, -1, 1, true ) );
     10if ( ! function_exists('decalog_get_psr_log_version') ) {
     11    /**
     12     * Get the needed version of PSR-3.
     13     *
     14     * @return  int  The PSR-3 needed version.
     15     * @since 4.0.0
     16     */
     17    function decalog_get_psr_log_version() {
     18        $required = 1;
     19        if ( ! defined( 'DECALOG_PSR_LOG_VERSION') ) {
     20            define( 'DECALOG_PSR_LOG_VERSION', 'V1' );
    1821        }
     22
     23
     24
     25
     26
     27
     28
     29
     30
     31
     32
     33
     34
     35
     36
     37
     38
    1939    }
    2040}
    2141
    22 /**
    23  * Provide PHP 7.3 compatibility for array_key_first() function.
    24  */
    25 if ( ! function_exists( 'array_key_first' ) ) {
    26     // phpcs:ignore
    27     function array_key_first( array $arr ) {
    28         foreach ( $arr as $key => $unused ) {
    29             return $key;
    30         }
    31     }
    32 }
  • sessions/trunk/includes/libraries/class-libraries.php

    r3082621 r3093990  
    8181            'langs'   => 'en',
    8282        ];
     83
     84
     85
     86
     87
    8388        self::$psr4_libraries['psr-03']      = [
    8489            'name'    => 'PSR-3',
    8590            'prefix'  => 'Psr\\Log',
    86             'base'    => POSE_VENDOR_DIR . 'psr/log/',
    87             'version' => '3.0.0',
     91            'base'    => POSE_VENDOR_DIR . 'psr/log/',
     92            'version' => .0.0',
    8893            'author'  => 'PHP Framework Interop Group',
    8994            'url'     => 'https://www.php-fig.org/',
     
    245250            foreach ( $list as $library ) {
    246251                /* translators: as in the sentence "Product W version X by author Y (license Z)" */
    247                 $items[] = sprintf( __( '<a href="%1$s">%2$s %3$s</a>%4$s by %5$s (%6$s)', 'sessions' ), $library['url'], $library['name'], $library['version'], $library['langs'], $library['author'], $library['license'] );
     252                $items[] = sprintf( __( '<a href="%1$s">%2$s %3$s</a>%4$s by %5$s (%6$s)', 'sessions' ), $library['url'], $library['name'], $library['version'], $library['langs'], $library['author'], $library['license'] );
    248253            }
    249254            $result = implode( ', ', $items );
  • sessions/trunk/includes/libraries/decalog-sdk/Engine.php

    r3082621 r3093990  
    2727     * @var    string    $version    Maintains the engine version.
    2828     */
    29     private static $version = '4.2.0';
     29    private static $version = '.0';
    3030
    3131    /**
     
    9090     */
    9191    public static function getPsrVersion() {
    92         if ( class_exists( '\Psr\Log\NullLogger') ) {
    93             $reflection = new \ReflectionMethod(\Psr\Log\NullLogger::class, 'log');
    94             foreach ( $reflection->getParameters() as $param ) {
    95                 if ( 'message' === $param->getName() ) {
    96                     if ( str_contains($param->getType() ?? '', '|') ) {
    97                         return 3;
     92        $required = 1;
     93        if ( ! defined( 'DECALOG_PSR_LOG_VERSION') ) {
     94            define( 'DECALOG_PSR_LOG_VERSION', 'V1' );
     95        }
     96        switch ( strtolower( DECALOG_PSR_LOG_VERSION ) ) {
     97            case 'v3':
     98                $required = 3;
     99                break;
     100            case 'auto':
     101                if ( class_exists( '\Psr\Log\NullLogger') ) {
     102                    $reflection = new \ReflectionMethod(\Psr\Log\NullLogger::class, 'log');
     103                    foreach ( $reflection->getParameters() as $param ) {
     104                        if ( 'message' === $param->getName() ) {
     105                            if ( str_contains($param->getType() ?? '', '|') ) {
     106                                $required = 3;
     107                            }
     108                        }
    98109                    }
    99110                }
    100             }
    101         } else {
    102             return 0;
    103         }
    104         return 1;
     111        }
     112        return $required;
    105113    }
    106114
  • sessions/trunk/includes/libraries/decalog-sdk/EventsLogger.php

    r3082621 r3093990  
    267267    }
    268268
    269 } else { // if version in not detected or equal to 1
     269} else {
    270270
    271271    /**
  • sessions/trunk/init.php

    r3082621 r3093990  
    1313define( 'POSE_PRODUCT_ABBREVIATION', 'posessions' );
    1414define( 'POSE_SLUG', 'sessions' );
    15 define( 'POSE_VERSION', '2.14.0' );
     15define( 'POSE_VERSION', '.0' );
    1616define( 'POSE_CODENAME', '"-"' );
    1717define( 'POSE_CDN_AVAILABLE', true );
  • sessions/trunk/perfopsone/functions.php

    r2595045 r3093990  
    1111
    1212use POSessions\System\Plugin;
    13 
    14 if ( version_compare( $wp_version, '5.5', '<' ) && ! function_exists( 'wp_is_auto_update_enabled_for_type' ) ) {
    15     /**
    16      * Provide WP 5.5 compatibility for wp_is_auto_update_enabled_for_type() function.
    17      */
    18     function wp_is_auto_update_enabled_for_type( $type ) {
    19         return false;
    20     }
    21 }
    2213
    2314if ( ! function_exists( 'poo_switch_autoupdate_callback' ) ) {
  • sessions/trunk/readme.txt

    r3082621 r3093990  
    55Requires PHP: 8.1
    66Tested up to: 6.5
    7 Stable tag: 2.14.0
     7Stable tag: .0
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
  • sessions/trunk/sessions.php

    r3082621 r3093990  
    1111 * Plugin URI:        https://perfops.one/sessions
    1212 * Description:       Powerful sessions manager for WordPress with sessions limiter and full analytics reporting capabilities.
    13  * Version:           2.14.0
     13 * Version:           .0
    1414 * Requires at least: 6.2
    1515 * Requires PHP:      8.1
Note: See TracChangeset for help on using the changeset viewer.