Plugin Directory

Changeset 3371958


Ignore:
Timestamp:
10/02/2025 06:44:36 PM (6 months ago)
Author:
withflex
Message:

Adding 3.1.7

Location:
pay-with-flex/trunk
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • pay-with-flex/trunk/composer.lock

    r3352167 r3371958  
    387387        {
    388388            "name": "sentry/sentry",
    389             "version": "4.15.0",
     389            "version": "4.16.0",
    390390            "source": {
    391391                "type": "git",
    392392                "url": "https://github.com/getsentry/sentry-php.git",
    393                 "reference": "b2d84de69f3eda8ca22b0b00e9f923be3b837355"
    394             },
    395             "dist": {
    396                 "type": "zip",
    397                 "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/b2d84de69f3eda8ca22b0b00e9f923be3b837355",
    398                 "reference": "b2d84de69f3eda8ca22b0b00e9f923be3b837355",
     393                "reference": "c5b086e4235762da175034bc463b0d31cbb38d2e"
     394            },
     395            "dist": {
     396                "type": "zip",
     397                "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/c5b086e4235762da175034bc463b0d31cbb38d2e",
     398                "reference": "c5b086e4235762da175034bc463b0d31cbb38d2e",
    399399                "shasum": ""
    400400            },
     
    460460            "support": {
    461461                "issues": "https://github.com/getsentry/sentry-php/issues",
    462                 "source": "https://github.com/getsentry/sentry-php/tree/4.15.0"
     462                "source": "https://github.com/getsentry/sentry-php/tree/4.16.0"
    463463            },
    464464            "funding": [
     
    472472                }
    473473            ],
    474             "time": "2025-08-20T14:26:37+00:00"
     474            "time": "2025-09-22T13:38:03+00:00"
    475475        },
    476476        {
     
    543543        {
    544544            "name": "symfony/options-resolver",
    545             "version": "v7.3.2",
     545            "version": "v7.3.3",
    546546            "source": {
    547547                "type": "git",
    548548                "url": "https://github.com/symfony/options-resolver.git",
    549                 "reference": "119bcf13e67dbd188e5dbc74228b1686f66acd37"
    550             },
    551             "dist": {
    552                 "type": "zip",
    553                 "url": "https://api.github.com/repos/symfony/options-resolver/zipball/119bcf13e67dbd188e5dbc74228b1686f66acd37",
    554                 "reference": "119bcf13e67dbd188e5dbc74228b1686f66acd37",
     549                "reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d"
     550            },
     551            "dist": {
     552                "type": "zip",
     553                "url": "https://api.github.com/repos/symfony/options-resolver/zipball/0ff2f5c3df08a395232bbc3c2eb7e84912df911d",
     554                "reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d",
    555555                "shasum": ""
    556556            },
     
    590590            ],
    591591            "support": {
    592                 "source": "https://github.com/symfony/options-resolver/tree/v7.3.2"
     592                "source": "https://github.com/symfony/options-resolver/tree/v7.3.3"
    593593            },
    594594            "funding": [
     
    610610                }
    611611            ],
    612             "time": "2025-07-15T11:36:08+00:00"
     612            "time": "2025-08-05T10:16:07+00:00"
    613613        },
    614614        {
  • pay-with-flex/trunk/pay-with-flex.php

    r3352167 r3371958  
    44 * Plugin Name:      Flex HSA/FSA Payments
    55 * Description:      Accept HSA/FSA payments directly in the checkout flow.
    6  * Version:          3.1.6
     6 * Version:          3.1.7
    77 * Plugin URI:       https://wordpress.org/plugins/pay-with-flex/
    88 * Author:           Flex
     
    6666    if ( null === $hub ) {
    6767        $data = array();
    68         if ( function_exists( 'get_plugin_data' ) ) {
     68        if ( function_exists( 'Flex\get_plugin_data' ) ) {
    6969            $data = get_plugin_data( plugin_file: __FILE__, translate: \false );
    7070        }
     
    158158                        if ( empty( $event->getModules() ) ) {
    159159                            $modules = array();
    160                             if ( function_exists( 'wp_get_wp_version' ) ) {
     160                            if ( function_exists( 'Flex\wp_get_wp_version' ) ) {
    161161                                $modules['wordpress'] = wp_get_wp_version();
    162162                            }
    163                             if ( function_exists( 'get_plugins' ) && function_exists( 'is_plugin_active' ) ) {
     163                            if ( function_exists( 'Flex\get_plugins' ) && function_exists( 'Flex\is_plugin_active' ) ) {
    164164                                foreach ( get_plugins() as $plugin => $info ) {
    165165                                    if ( ! is_plugin_active( $plugin ) ) {
  • pay-with-flex/trunk/readme.txt

    r3352167 r3371958  
    44Requires at least: 6.8
    55Tested up to: 6.8
    6 Stable tag: 3.1.6
     6Stable tag: 3.1.7
    77Requires PHP: 8.1
    88License: GPLv3 or later
     
    5555
    5656== Changelog ==
     57
     58= 3.1.7 =
     59* Fixed a security vulnerability that allowed an attacker to retrieve completed orders within a short window after the order was placed.
    5760
    5861= 3.1.6 =
     
    130133== Upgrade Notice ==
    131134
     135= 3.1.7 =
     136This version fixes a security vulnerability that allowed an attacker to retrieve order details within a short window
     137after the order was placed.
     138
    132139= 1.0.0 =
    133140This version fixes a critical error and implements a webhook handler to prevent orders from failing to be marked as
  • pay-with-flex/trunk/src/Controller/OrderController.php

    r3352167 r3371958  
    2828            args: array(
    2929                'callback'            => array( $controller, 'complete' ),
    30                 'permission_callback' => '__return_true',
     30                'permission_callback' => array( $controller, 'permission_callback' ),
    3131                'args'                => array( 'id' => array( 'required' => \true ) ),
    3232            )
    3333        );
     34    }
     35    /**
     36     * Ensure the nonce matches before attempting to process the request.
     37     *
     38     * @param \WP_REST_Request $request The Request.
     39     */
     40    public function permission_callback( \WP_REST_Request $request ): bool {
     41        $id = $request->get_param( 'id' );
     42        if ( empty( $id ) ) {
     43            return \false;
     44        }
     45        $key = $request->get_param( 'key' );
     46        if ( empty( $key ) ) {
     47            return \false;
     48        }
     49        $order = wc_get_order( $id );
     50        if ( \false === $order ) {
     51            return \false;
     52        }
     53        return $order->key_is_valid( $key );
    3454    }
    3555    /**
     
    4767        }
    4868        // If the order is in a 'pending' state and the nonce is valid, then attempt to update the order.
    49         if ( OrderStatus::PENDING === $order->get_status() && \false !== wp_verify_nonce( $request->get_param( '_wpnonce' ), 'wp_rest' ) ) {
     69        if ( OrderStatus::PENDING === $order->get_status() ) {
    5070            $checkout_session = CheckoutSession::from_wc( $order );
    5171            $checkout_session->exec( ResourceAction::REFRESH );
  • pay-with-flex/trunk/src/Resource/CheckoutSession/CheckoutSession.php

    r3352167 r3371958  
    134134        $id          = $order->get_transaction_id();
    135135        $order_id    = $order->get_id();
    136         $success_url = wp_nonce_url( actionurl: get_rest_url( path: Controller::NAMESPACE . "/orders/{$order_id}/complete" ), action: 'wp_rest' );
     136        $success_url = add_query_arg( 'key', $order->get_order_key(), get_rest_url( path: Controller::NAMESPACE . "/orders/{$order_id}/complete" ) );
    137137        // A map of item_id => LineItem.
    138138        $line_items = array_map( static fn( $item ) => \Flex\Resource\CheckoutSession\LineItem::from_wc( $item ), $order->get_items() );
  • pay-with-flex/trunk/vendor/composer/installed.json

    r3352167 r3371958  
    399399        {
    400400            "name": "sentry\/sentry",
    401             "version": "4.15.0",
    402             "version_normalized": "4.15.0.0",
     401            "version": "4.16.0",
     402            "version_normalized": "4.16.0.0",
    403403            "source": {
    404404                "type": "git",
    405405                "url": "https:\/\/github.com\/getsentry\/sentry-php.git",
    406                 "reference": "b2d84de69f3eda8ca22b0b00e9f923be3b837355"
    407             },
    408             "dist": {
    409                 "type": "zip",
    410                 "url": "https:\/\/api.github.com\/repos\/getsentry\/sentry-php\/zipball\/b2d84de69f3eda8ca22b0b00e9f923be3b837355",
    411                 "reference": "b2d84de69f3eda8ca22b0b00e9f923be3b837355",
     406                "reference": "c5b086e4235762da175034bc463b0d31cbb38d2e"
     407            },
     408            "dist": {
     409                "type": "zip",
     410                "url": "https:\/\/api.github.com\/repos\/getsentry\/sentry-php\/zipball\/c5b086e4235762da175034bc463b0d31cbb38d2e",
     411                "reference": "c5b086e4235762da175034bc463b0d31cbb38d2e",
    412412                "shasum": ""
    413413            },
     
    439439                "monolog\/monolog": "Allow sending log messages to Sentry by using the included Monolog handler."
    440440            },
    441             "time": "2025-08-20T14:26:37+00:00",
     441            "time": "2025-09-22T13:38:03+00:00",
    442442            "type": "library",
    443443            "installation-source": "dist",
     
    475475            "support": {
    476476                "issues": "https:\/\/github.com\/getsentry\/sentry-php\/issues",
    477                 "source": "https:\/\/github.com\/getsentry\/sentry-php\/tree\/4.15.0"
     477                "source": "https:\/\/github.com\/getsentry\/sentry-php\/tree\/4.16.0"
    478478            },
    479479            "funding": [
     
    561561        {
    562562            "name": "symfony\/options-resolver",
    563             "version": "v7.3.2",
    564             "version_normalized": "7.3.2.0",
     563            "version": "v7.3.3",
     564            "version_normalized": "7.3.3.0",
    565565            "source": {
    566566                "type": "git",
    567567                "url": "https:\/\/github.com\/symfony\/options-resolver.git",
    568                 "reference": "119bcf13e67dbd188e5dbc74228b1686f66acd37"
    569             },
    570             "dist": {
    571                 "type": "zip",
    572                 "url": "https:\/\/api.github.com\/repos\/symfony\/options-resolver\/zipball\/119bcf13e67dbd188e5dbc74228b1686f66acd37",
    573                 "reference": "119bcf13e67dbd188e5dbc74228b1686f66acd37",
     568                "reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d"
     569            },
     570            "dist": {
     571                "type": "zip",
     572                "url": "https:\/\/api.github.com\/repos\/symfony\/options-resolver\/zipball\/0ff2f5c3df08a395232bbc3c2eb7e84912df911d",
     573                "reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d",
    574574                "shasum": ""
    575575            },
     
    578578                "symfony\/deprecation-contracts": "^2.5|^3"
    579579            },
    580             "time": "2025-07-15T11:36:08+00:00",
     580            "time": "2025-08-05T10:16:07+00:00",
    581581            "type": "library",
    582582            "installation-source": "dist",
     
    611611            ],
    612612            "support": {
    613                 "source": "https:\/\/github.com\/symfony\/options-resolver\/tree\/v7.3.2"
     613                "source": "https:\/\/github.com\/symfony\/options-resolver\/tree\/v7.3.3"
    614614            },
    615615            "funding": [
  • pay-with-flex/trunk/vendor/composer/installed.php

    r3352167 r3371958  
    33namespace Flex;
    44
    5 return array('root' => array('name' => '__root__', 'pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '69ec6bef00f745f4c201c37ee9e81ec06ee22277', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => \true), 'versions' => array('__root__' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '69ec6bef00f745f4c201c37ee9e81ec06ee22277', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => \false), 'guzzlehttp/psr7' => array('pretty_version' => '2.8.0', 'version' => '2.8.0.0', 'reference' => '21dc724a0583619cd1652f673303492272778051', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/psr7', 'aliases' => array(), 'dev_requirement' => \false), 'jean85/pretty-package-versions' => array('pretty_version' => '2.1.1', 'version' => '2.1.1.0', 'reference' => '4d7aa5dab42e2a76d99559706022885de0e18e1a', 'type' => 'library', 'install_path' => __DIR__ . '/../jean85/pretty-package-versions', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-factory' => array('pretty_version' => '1.1.0', 'version' => '1.1.0.0', 'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-factory', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-factory-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0')), 'psr/http-message' => array('pretty_version' => '2.0', 'version' => '2.0.0.0', 'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-message', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-message-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0')), 'psr/log' => array('pretty_version' => '3.0.2', 'version' => '3.0.2.0', 'reference' => 'f16e1d5863e37f8d8c2a01719f5b34baa2b714d3', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'dev_requirement' => \false), 'ralouphie/getallheaders' => array('pretty_version' => '3.0.3', 'version' => '3.0.3.0', 'reference' => '120b605dfeb996808c31b6477290a714d356e822', 'type' => 'library', 'install_path' => __DIR__ . '/../ralouphie/getallheaders', 'aliases' => array(), 'dev_requirement' => \false), 'sentry/sentry' => array('pretty_version' => '4.15.0', 'version' => '4.15.0.0', 'reference' => 'b2d84de69f3eda8ca22b0b00e9f923be3b837355', 'type' => 'library', 'install_path' => __DIR__ . '/../sentry/sentry', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('pretty_version' => 'v3.6.0', 'version' => '3.6.0.0', 'reference' => '63afe740e99a13ba87ec199bb07bbdee937a5b62', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/options-resolver' => array('pretty_version' => 'v7.3.2', 'version' => '7.3.2.0', 'reference' => '119bcf13e67dbd188e5dbc74228b1686f66acd37', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/options-resolver', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-php84' => array('pretty_version' => 'v1.33.0', 'version' => '1.33.0.0', 'reference' => 'd8ced4d875142b6a7426000426b8abc631d6b191', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php84', 'aliases' => array(), 'dev_requirement' => \false)));
     5return array('root' => array('name' => '__root__', 'pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '2cc5f9f0241f62d276da7dc35577596593e348e7', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => \true), 'versions' => array('__root__' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '2cc5f9f0241f62d276da7dc35577596593e348e7', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => \false), 'guzzlehttp/psr7' => array('pretty_version' => '2.8.0', 'version' => '2.8.0.0', 'reference' => '21dc724a0583619cd1652f673303492272778051', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/psr7', 'aliases' => array(), 'dev_requirement' => \false), 'jean85/pretty-package-versions' => array('pretty_version' => '2.1.1', 'version' => '2.1.1.0', 'reference' => '4d7aa5dab42e2a76d99559706022885de0e18e1a', 'type' => 'library', 'install_path' => __DIR__ . '/../jean85/pretty-package-versions', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-factory' => array('pretty_version' => '1.1.0', 'version' => '1.1.0.0', 'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-factory', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-factory-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0')), 'psr/http-message' => array('pretty_version' => '2.0', 'version' => '2.0.0.0', 'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-message', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-message-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0')), 'psr/log' => array('pretty_version' => '3.0.2', 'version' => '3.0.2.0', 'reference' => 'f16e1d5863e37f8d8c2a01719f5b34baa2b714d3', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'dev_requirement' => \false), 'ralouphie/getallheaders' => array('pretty_version' => '3.0.3', 'version' => '3.0.3.0', 'reference' => '120b605dfeb996808c31b6477290a714d356e822', 'type' => 'library', 'install_path' => __DIR__ . '/../ralouphie/getallheaders', 'aliases' => array(), 'dev_requirement' => \false), 'sentry/sentry' => array('pretty_version' => '4.16.0', 'version' => '4.16.0.0', 'reference' => 'c5b086e4235762da175034bc463b0d31cbb38d2e', 'type' => 'library', 'install_path' => __DIR__ . '/../sentry/sentry', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('pretty_version' => 'v3.6.0', 'version' => '3.6.0.0', 'reference' => '63afe740e99a13ba87ec199bb07bbdee937a5b62', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/options-resolver' => array('pretty_version' => 'v7.3.3', 'version' => '7.3.3.0', 'reference' => '0ff2f5c3df08a395232bbc3c2eb7e84912df911d', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/options-resolver', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-php84' => array('pretty_version' => 'v1.33.0', 'version' => '1.33.0.0', 'reference' => 'd8ced4d875142b6a7426000426b8abc631d6b191', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php84', 'aliases' => array(), 'dev_requirement' => \false)));
  • pay-with-flex/trunk/vendor/scoper-autoload.php

    r3352167 r3371958  
    4242if (!function_exists('bcdivmod')) { function bcdivmod() { return \Flex\bcdivmod(...func_get_args()); } }
    4343if (!function_exists('fpow')) { function fpow() { return \Flex\fpow(...func_get_args()); } }
     44if (!function_exists('get_plugin_data')) { function get_plugin_data() { return \Flex\get_plugin_data(...func_get_args()); } }
     45if (!function_exists('get_plugins')) { function get_plugins() { return \Flex\get_plugins(...func_get_args()); } }
    4446if (!function_exists('getallheaders')) { function getallheaders() { return \Flex\getallheaders(...func_get_args()); } }
    4547if (!function_exists('grapheme_str_split')) { function grapheme_str_split() { return \Flex\grapheme_str_split(...func_get_args()); } }
     48if (!function_exists('is_plugin_active')) { function is_plugin_active() { return \Flex\is_plugin_active(...func_get_args()); } }
    4649if (!function_exists('mb_lcfirst')) { function mb_lcfirst() { return \Flex\mb_lcfirst(...func_get_args()); } }
    4750if (!function_exists('mb_ltrim')) { function mb_ltrim() { return \Flex\mb_ltrim(...func_get_args()); } }
     
    5053if (!function_exists('mb_ucfirst')) { function mb_ucfirst() { return \Flex\mb_ucfirst(...func_get_args()); } }
    5154if (!function_exists('trigger_deprecation')) { function trigger_deprecation() { return \Flex\trigger_deprecation(...func_get_args()); } }
     55if (!function_exists('wp_get_wp_version')) { function wp_get_wp_version() { return \Flex\wp_get_wp_version(...func_get_args()); } }
    5256
    5357return $loader;
  • pay-with-flex/trunk/vendor/sentry/sentry/CHANGELOG.md

    r3352167 r3371958  
    11# CHANGELOG
     2
     3## 4.16.0
     4
     5The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.16.0.
     6
     7### Features
     8
     9- Remove `max_breadcrumbs` limit. [(#1890)](https://github.com/getsentry/sentry-php/pull/1890)
     10- Implement `__destruct` in `LogsHandler` to make sure logs are always flushed. [(#1916)](https://github.com/getsentry/sentry-php/pull/1916)
     11
     12### Bug Fixes
     13
     14- Use PSR log level when logging messages using the PSR-3 logger within the SDK. [(#1907)](https://github.com/getsentry/sentry-php/pull/1907)
     15- Remove `@internal` annotation from `Sentry\Transport\Result`. [(#1904)](https://github.com/getsentry/sentry-php/pull/1904)
     16
     17### Misc
     18
     19- Add `sentry.origin` attribute to `LogsHandler`. [(#1917)](https://github.com/getsentry/sentry-php/pull/1917)
     20
     21## 4.15.2
     22
     23The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.15.2.
     24
     25### Bug Fixes
     26
     27- Ensure the Monolog handler only processes records permitted by their log level. [(#1888)](https://github.com/getsentry/sentry-php/pull/1888)
     28
     29## 4.15.1
     30
     31The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.15.1.
     32
     33### Bug Fixes
     34
     35- Do not send `template` attribute with logs when there are no template values [(#1885)](https://github.com/getsentry/sentry-php/pull/1885)
    236
    337## 4.15.0
     
    1549  use Sentry\Monolog\LogsHandler;
    1650  use Sentry\Logs\LogLevel;
    17  
     51
    1852  // Initialize Sentry SDK first (make sure 'enable_logs' is set to true)
    1953  \Sentry\init([
     
    2155      'enable_logs' => true,
    2256  ]);
    23  
     57
    2458  // Create a Monolog logger
    2559  $logger = new Logger('my-app');
    26  
     60
    2761  // Add the Sentry logs handler
    2862  // Optional: specify minimum log level (defaults to LogLevel::debug())
    2963  $handler = new LogsHandler(LogLevel::info());
    3064  $logger->pushHandler($handler);
    31  
     65
    3266  // Now your logs will be sent to Sentry
    3367  $logger->info('User logged in', ['user_id' => 123]);
    3468  $logger->error('Payment failed', ['order_id' => 456]);
    3569  ```
    36  
     70
    3771  Note: The handler will not collect logs for exceptions (they should be handled separately via `captureException`).
    3872
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Client.php

    r3352167 r3371958  
    2929     * The version of the SDK.
    3030     */
    31     public const SDK_VERSION = '4.15.0';
     31    public const SDK_VERSION = '4.16.0';
    3232    /**
    3333     * Regex pattern to detect if a string is a regex pattern (starts and ends with / optionally followed by flags).
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Logs/Log.php

    r3352167 r3371958  
    6262        return $this;
    6363    }
     64    public function getPsrLevel(): string
     65    {
     66        return $this->level->toPsrLevel();
     67    }
    6468    public function getBody(): string
    6569    {
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Logs/LogLevel.php

    r3352167 r3371958  
    5858        return $this->priority;
    5959    }
     60    public function toPsrLevel(): string
     61    {
     62        switch ($this->value) {
     63            case 'trace':
     64            case 'debug':
     65                return \Flex\Psr\Log\LogLevel::DEBUG;
     66            case 'warn':
     67                return \Flex\Psr\Log\LogLevel::WARNING;
     68            case 'error':
     69                return \Flex\Psr\Log\LogLevel::ERROR;
     70            case 'fatal':
     71                return \Flex\Psr\Log\LogLevel::CRITICAL;
     72            case 'info':
     73            default:
     74                return \Flex\Psr\Log\LogLevel::INFO;
     75        }
     76    }
    6077    private static function getInstance(string $value, int $priority): self
    6178    {
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Logs/LogsAggregator.php

    r3352167 r3371958  
    5252            $formattedMessage = $message;
    5353        }
    54         $log = (new Log($timestamp, $this->getTraceId($hub), $level, $formattedMessage))->setAttribute('sentry.release', $options->getRelease())->setAttribute('sentry.environment', $options->getEnvironment() ?? Event::DEFAULT_ENVIRONMENT)->setAttribute('sentry.server.address', $options->getServerName())->setAttribute('sentry.message.template', $message)->setAttribute('sentry.trace.parent_span_id', $hub->getSpan() ? $hub->getSpan()->getSpanId() : null);
     54        $log = (new Log($timestamp, $this->getTraceId($hub), $level, $formattedMessage))->setAttribute('sentry.release', $options->getRelease())->setAttribute('sentry.environment', $options->getEnvironment() ?? Event::DEFAULT_ENVIRONMENT)->setAttribute('sentry.server.address', $options->getServerName())->setAttribute('sentry.trace.parent_span_id', $hub->getSpan() ? $hub->getSpan()->getSpanId() : null);
    5555        if ($client instanceof Client) {
    5656            $log->setAttribute('sentry.sdk.name', $client->getSdkIdentifier());
     
    7171            }
    7272        });
    73         foreach ($values as $key => $value) {
    74             $log->setAttribute("sentry.message.parameter.{$key}", $value);
     73        if (\count($values)) {
     74            $log->setAttribute('sentry.message.template', $message);
     75            foreach ($values as $key => $value) {
     76                $log->setAttribute("sentry.message.parameter.{$key}", $value);
     77            }
    7578        }
    7679        $attributes = Arr::simpleDot($attributes);
     
    98101            return;
    99102        }
    100         // We check if it's a `LogsLogger` to avoid a infinite loop where the logger is logging the logs it's writing
    101103        if ($sdkLogger !== null) {
    102             $sdkLogger->log((string) $log->getLevel(), "Logs item: {$log->getBody()}", $log->attributes()->toSimpleArray());
     104            $sdkLogger->log($log->getPsrLevel(), "Logs item: {$log->getBody()}", $log->attributes()->toSimpleArray());
    103105        }
    104106        $this->logs[] = $log;
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Monolog/LogsHandler.php

    r3352167 r3371958  
    4848    public function handle($record): bool
    4949    {
     50        if (!$this->isHandling($record)) {
     51            return \false;
     52        }
    5053        // Do not collect logs for exceptions, they should be handled seperately by the `Handler` or `captureException`
    5154        if (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Throwable) {
    5255            return \false;
    5356        }
    54         Logs::getInstance()->aggregator()->add(self::getSentryLogLevelFromMonologLevel($record['level']), $record['message'], [], array_merge($record['context'], $record['extra']));
     57        Logs::getInstance()->aggregator()->add(self::getSentryLogLevelFromMonologLevel($record['level']), $record['message'], [], array_merge($record['context'], $record['extra'], ['sentry.origin' => 'auto.logger.monolog']));
    5558        return $this->bubble === \false;
    5659    }
     
    9295        return new LineFormatter();
    9396    }
     97    public function __destruct()
     98    {
     99        try {
     100            $this->close();
     101        } catch (\Throwable $e) {
     102            // Just in case so that the destructor can never fail.
     103        }
     104    }
    94105}
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Options.php

    r3352167 r3371958  
    12261226    }
    12271227    /**
    1228      * Validates if the value of the max_breadcrumbs option is in range.
     1228     * Validates if the value of the max_breadcrumbs option is valid.
    12291229     *
    12301230     * @param int $value The value to validate
     
    12321232    private function validateMaxBreadcrumbsOptions(int $value): bool
    12331233    {
    1234         return $value >= 0 && $value <= self::DEFAULT_MAX_BREADCRUMBS;
     1234        return $value >= 0;
    12351235    }
    12361236    /**
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Transport/Result.php

    r3352167 r3371958  
    88 * This class contains the details of the sending operation of an event, e.g.
    99 * if it was sent successfully or if it was skipped because of some reason.
    10  *
    11  * @internal
    1210 */
    1311class Result
Note: See TracChangeset for help on using the changeset viewer.