Plugin Directory

Changeset 3427514


Ignore:
Timestamp:
12/26/2025 03:22:41 AM (3 months ago)
Author:
withflex
Message:

Add 3.2.0

Location:
pay-with-flex/trunk
Files:
13 added
1 deleted
34 edited

Legend:

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

    r3390698 r3427514  
    11{
    2   "type": "wordpress-plugin",
     2    "type": "wordpress-plugin",
    33    "require": {
    44        "symfony/polyfill-php84": ">=1.31",
     
    77    "require-dev": {
    88        "phpunit/phpunit": "^9.6",
    9         "yoast/phpunit-polyfills": "^2.0"
     9        "yoast/phpunit-polyfills": "^2.0",
     10        "wp-phpunit/wp-phpunit": "*"
    1011    },
    1112    "autoload": {
    1213        "psr-4": {
    1314            "Flex\\": "src"
    14         }
     15        },
     16        "files": ["includes/functions.php"]
    1517    },
    1618    "autoload-dev": {
  • pay-with-flex/trunk/composer.lock

    r3398425 r3427514  
    55        "This file is @generated automatically"
    66    ],
    7     "content-hash": "7d2d16659169131591eb5ec722d479fd",
     7    "content-hash": "400fe045e9fce44650d89f3d72a1981a",
    88    "packages": [
    99        {
     
    387387        {
    388388            "name": "sentry/sentry",
    389             "version": "4.18.1",
     389            "version": "4.19.1",
    390390            "source": {
    391391                "type": "git",
    392392                "url": "https://github.com/getsentry/sentry-php.git",
    393                 "reference": "04dcf20b39742b731b676f8b8d4f02d1db488af8"
    394             },
    395             "dist": {
    396                 "type": "zip",
    397                 "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/04dcf20b39742b731b676f8b8d4f02d1db488af8",
    398                 "reference": "04dcf20b39742b731b676f8b8d4f02d1db488af8",
     393                "reference": "1c21d60bebe67c0122335bd3fe977990435af0a3"
     394            },
     395            "dist": {
     396                "type": "zip",
     397                "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/1c21d60bebe67c0122335bd3fe977990435af0a3",
     398                "reference": "1c21d60bebe67c0122335bd3fe977990435af0a3",
    399399                "shasum": ""
    400400            },
     
    459459            "support": {
    460460                "issues": "https://github.com/getsentry/sentry-php/issues",
    461                 "source": "https://github.com/getsentry/sentry-php/tree/4.18.1"
     461                "source": "https://github.com/getsentry/sentry-php/tree/4.19.1"
    462462            },
    463463            "funding": [
     
    471471                }
    472472            ],
    473             "time": "2025-11-11T09:34:53+00:00"
     473            "time": "2025-12-02T15:57:41+00:00"
    474474        },
    475475        {
     
    542542        {
    543543            "name": "symfony/options-resolver",
    544             "version": "v7.3.3",
     544            "version": "v8.0.0",
    545545            "source": {
    546546                "type": "git",
    547547                "url": "https://github.com/symfony/options-resolver.git",
    548                 "reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d"
    549             },
    550             "dist": {
    551                 "type": "zip",
    552                 "url": "https://api.github.com/repos/symfony/options-resolver/zipball/0ff2f5c3df08a395232bbc3c2eb7e84912df911d",
    553                 "reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d",
    554                 "shasum": ""
    555             },
    556             "require": {
    557                 "php": ">=8.2",
     548                "reference": "d2b592535ffa6600c265a3893a7f7fd2bad82dd7"
     549            },
     550            "dist": {
     551                "type": "zip",
     552                "url": "https://api.github.com/repos/symfony/options-resolver/zipball/d2b592535ffa6600c265a3893a7f7fd2bad82dd7",
     553                "reference": "d2b592535ffa6600c265a3893a7f7fd2bad82dd7",
     554                "shasum": ""
     555            },
     556            "require": {
     557                "php": ">=8.4",
    558558                "symfony/deprecation-contracts": "^2.5|^3"
    559559            },
     
    589589            ],
    590590            "support": {
    591                 "source": "https://github.com/symfony/options-resolver/tree/v7.3.3"
     591                "source": "https://github.com/symfony/options-resolver/tree/v8.0.0"
    592592            },
    593593            "funding": [
     
    609609                }
    610610            ],
    611             "time": "2025-08-05T10:16:07+00:00"
     611            "time": "2025-11-12T15:55:31+00:00"
    612612        },
    613613        {
     
    825825        {
    826826            "name": "nikic/php-parser",
    827             "version": "v5.6.2",
     827            "version": "v5.7.0",
    828828            "source": {
    829829                "type": "git",
    830830                "url": "https://github.com/nikic/PHP-Parser.git",
    831                 "reference": "3a454ca033b9e06b63282ce19562e892747449bb"
    832             },
    833             "dist": {
    834                 "type": "zip",
    835                 "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/3a454ca033b9e06b63282ce19562e892747449bb",
    836                 "reference": "3a454ca033b9e06b63282ce19562e892747449bb",
     831                "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82"
     832            },
     833            "dist": {
     834                "type": "zip",
     835                "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82",
     836                "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82",
    837837                "shasum": ""
    838838            },
     
    877877            "support": {
    878878                "issues": "https://github.com/nikic/PHP-Parser/issues",
    879                 "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.2"
    880             },
    881             "time": "2025-10-21T19:32:17+00:00"
     879                "source": "https://github.com/nikic/PHP-Parser/tree/v5.7.0"
     880            },
     881            "time": "2025-12-06T11:56:16+00:00"
    882882        },
    883883        {
     
    13201320        {
    13211321            "name": "phpunit/phpunit",
    1322             "version": "9.6.29",
     1322            "version": "9.6.31",
    13231323            "source": {
    13241324                "type": "git",
    13251325                "url": "https://github.com/sebastianbergmann/phpunit.git",
    1326                 "reference": "9ecfec57835a5581bc888ea7e13b51eb55ab9dd3"
    1327             },
    1328             "dist": {
    1329                 "type": "zip",
    1330                 "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9ecfec57835a5581bc888ea7e13b51eb55ab9dd3",
    1331                 "reference": "9ecfec57835a5581bc888ea7e13b51eb55ab9dd3",
     1326                "reference": "945d0b7f346a084ce5549e95289962972c4272e5"
     1327            },
     1328            "dist": {
     1329                "type": "zip",
     1330                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/945d0b7f346a084ce5549e95289962972c4272e5",
     1331                "reference": "945d0b7f346a084ce5549e95289962972c4272e5",
    13321332                "shasum": ""
    13331333            },
     
    14031403                "issues": "https://github.com/sebastianbergmann/phpunit/issues",
    14041404                "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
    1405                 "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.29"
     1405                "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.31"
    14061406            },
    14071407            "funding": [
     
    14271427                }
    14281428            ],
    1429             "time": "2025-09-24T06:29:11+00:00"
     1429            "time": "2025-12-06T07:45:52+00:00"
    14301430        },
    14311431        {
     
    24892489            ],
    24902490            "time": "2025-11-17T20:03:58+00:00"
     2491        },
     2492        {
     2493            "name": "wp-phpunit/wp-phpunit",
     2494            "version": "6.9.0",
     2495            "source": {
     2496                "type": "git",
     2497                "url": "https://github.com/wp-phpunit/wp-phpunit.git",
     2498                "reference": "448dc57a97c7225d2ac6271876682fca4c2ed340"
     2499            },
     2500            "dist": {
     2501                "type": "zip",
     2502                "url": "https://api.github.com/repos/wp-phpunit/wp-phpunit/zipball/448dc57a97c7225d2ac6271876682fca4c2ed340",
     2503                "reference": "448dc57a97c7225d2ac6271876682fca4c2ed340",
     2504                "shasum": ""
     2505            },
     2506            "type": "library",
     2507            "autoload": {
     2508                "files": [
     2509                    "__loaded.php"
     2510                ]
     2511            },
     2512            "notification-url": "https://packagist.org/downloads/",
     2513            "license": [
     2514                "GPL-2.0-or-later"
     2515            ],
     2516            "authors": [
     2517                {
     2518                    "name": "Evan Mattson",
     2519                    "email": "me@aaemnnost.tv"
     2520                },
     2521                {
     2522                    "name": "WordPress Community",
     2523                    "homepage": "https://wordpress.org/about/"
     2524                }
     2525            ],
     2526            "description": "WordPress core PHPUnit library",
     2527            "homepage": "https://github.com/wp-phpunit",
     2528            "keywords": [
     2529                "phpunit",
     2530                "test",
     2531                "wordpress"
     2532            ],
     2533            "support": {
     2534                "docs": "https://github.com/wp-phpunit/docs",
     2535                "issues": "https://github.com/wp-phpunit/issues",
     2536                "source": "https://github.com/wp-phpunit/wp-phpunit"
     2537            },
     2538            "time": "2025-12-03T01:19:46+00:00"
    24912539        },
    24922540        {
  • pay-with-flex/trunk/pay-with-flex.php

    r3398425 r3427514  
    44 * Plugin Name:      Flex HSA/FSA Payments
    55 * Description:      Accept HSA/FSA payments directly in the checkout flow.
    6  * Version:          3.1.16
     6 * Version:          3.2.0
    77 * Plugin URI:       https://wordpress.org/plugins/pay-with-flex/
    88 * Author:           Flex
     
    4343require_once __DIR__ . '/vendor/autoload.php';
    4444const PLUGIN_FILE = __FILE__;
    45 /**
    46  * Flex Payment Gateway.
    47  *
    48  * If WooCommerce has initialized the payment gateways, return that instance, if not, return a new instance.
    49  */
    50 function payment_gateway(): PaymentGateway {
    51     if ( did_action( 'wc_payment_gateways_initialized' ) ) {
    52         $gateways = WC()->payment_gateways()->payment_gateways();
    53         if ( isset( $gateways['flex'] ) && $gateways['flex'] instanceof PaymentGateway ) {
    54             return $gateways['flex'];
    55         }
    56     }
    57     return new PaymentGateway( actions: \false );
    58 }
    5945/**
    6046 * Returns a Sentry client for this plugin.
  • pay-with-flex/trunk/readme.txt

    r3398425 r3427514  
    33Tags: hsa, fsa, payments, woocommerce
    44Requires at least: 6.7
    5 Tested up to: 6.8
    6 Stable tag: 3.1.16
     5Tested up to: 6.9
     6Stable tag: 3.1.18
    77Requires PHP: 8.1
    88License: GPLv3 or later
     
    5555
    5656== Changelog ==
     57
     58= 3.2.0 =
     59* Added support for dynamic pricing.
     60* Removed checkout session cache since idempotency system will prevent duplicate checkout sessions from being created.
     61
     62= 3.1.17 =
     63* Fixed a race condition where an order could be marked as `payment_complete` multiple times, once by the redirect and again by the webhook.
    5764
    5865= 3.1.16 =
  • pay-with-flex/trunk/src/Controller/OrderController.php

    r3371958 r3427514  
    7171            $checkout_session->exec( ResourceAction::REFRESH );
    7272            if ( CheckoutSessionStatus::COMPLETE === $checkout_session->status() ) {
    73                 $order->payment_complete();
     73                // The refresh can take a while, and the webhooks are fast, so ensure that we still need to update the order
     74                // and it hasn't already been updated by the webhooks.
     75                $order = wc_get_order( $id );
     76                if ( \false === $order ) {
     77                    return new \WP_REST_Response( status: 307, headers: array( 'Location' => get_home_url() ) );
     78                }
     79                if ( OrderStatus::PENDING === $order->get_status() ) {
     80                    $order->payment_complete( $checkout_session->id() );
     81                }
    7482            }
    7583        }
  • pay-with-flex/trunk/src/Resource/CheckoutSession/CheckoutSession.php

    r3371958 r3427514  
    2121    protected const KEY_STATUS       = 'checkout_session_status';
    2222    protected const KEY_REDIRECT_URL = 'checkout_session_redirect_url';
    23     protected const KEY_HASH         = 'checkout_session_hash';
    24     protected const KEY_AMOUNT_TOTAL = 'checkout_session_amount_total';
    2523    protected const KEY_TEST_MODE    = 'checkout_session_test_mode';
    2624    /**
     
    206204    public function apply_to( \WC_Order $order ): void {
    207205        $order->set_transaction_id( $this->id ?? '' );
    208         $order->update_meta_data( self::META_PREFIX . self::KEY_HASH, $this->hash() );
    209206        if ( null === $this->redirect_url ) {
    210207            $order->delete_meta_data( self::META_PREFIX . self::KEY_REDIRECT_URL );
    211208        } else {
    212209            $order->update_meta_data( self::META_PREFIX . self::KEY_REDIRECT_URL, $this->redirect_url );
    213         }
    214         if ( null === $this->amount_total ) {
    215             $order->delete_meta_data( self::META_PREFIX . self::KEY_AMOUNT_TOTAL );
    216         } else {
    217             $order->update_meta_data( self::META_PREFIX . self::KEY_AMOUNT_TOTAL, strval( $this->amount_total ) );
    218210        }
    219211        $status = $this->status?->value;
     
    240232            return ResourceAction::DEPENDENCY;
    241233        }
    242         if ( null === $this->id ) {
    243             return ResourceAction::CREATE;
    244         }
    245         if ( intval( $this->wc->get_meta( self::META_PREFIX . self::KEY_AMOUNT_TOTAL ) ) !== $this->amount_total ) {
    246             return ResourceAction::CREATE;
    247         }
    248         if ( $this->wc->get_meta( self::META_PREFIX . self::KEY_HASH ) !== $this->hash() ) {
    249             return ResourceAction::CREATE;
    250         }
    251         return ResourceAction::NONE;
     234        if ( \Flex\Resource\CheckoutSession\Status::COMPLETE === $this->status ) {
     235            return ResourceAction::NONE;
     236        }
     237        return ResourceAction::CREATE;
    252238    }
    253239    /**
  • pay-with-flex/trunk/src/Resource/CheckoutSession/LineItem.php

    r3352167 r3427514  
    7676     */
    7777    public static function from_wc( \WC_Order_Item_Product $item ): self {
    78         // If the order has a transaction id associated with it, then the checkout session was completed and the price id
    79         // associated with the line item is fixed.
     78        // If the order has a transaction id, the checkout session was completed
     79        // and the price id is fixed.
    8080        if ( $item->get_order()->get_transaction_id() && $item->meta_exists( self::META_PREFIX . self::KEY_PRICE ) ) {
    8181            $price = new Price( id: $item->get_meta( self::META_PREFIX . self::KEY_PRICE ) );
    8282        } else {
    83             $price = Price::from_wc( $item->get_product() );
     83            $price = Price::from_wc_item( $item );
    8484        }
    8585        $line_item     = new self( price: $price, quantity: $item->get_quantity() );
  • pay-with-flex/trunk/src/Resource/Price.php

    r3398425 r3427514  
    9393    }
    9494    /**
     95     * Create a price from a WooCommerce Order Line Item.
     96     *
     97     * If the line item price matches the product's catalog price, delegates to from_wc().
     98     * If the line item price differs (due to add-ons, dynamic pricing, etc.), creates
     99     * an ad-hoc price based on the actual line item price.
     100     *
     101     * @param \WC_Order_Item_Product $item The WooCommerce Order Item.
     102     */
     103    public static function from_wc_item( \WC_Order_Item_Product $item ): self {
     104        $product  = $item->get_product();
     105        $quantity = $item->get_quantity();
     106        // Calculate expected vs actual totals.
     107        $expected_total = self::currency_to_unit_amount( $product->get_price() ) * $quantity;
     108        $actual_total   = self::currency_to_unit_amount( $item->get_subtotal() );
     109        $price          = self::from_wc( $product );
     110        // If prices match, use the standard product-based price.
     111        if ( $expected_total === $actual_total ) {
     112            return $price;
     113        }
     114        return new self( product: $price->product, description: $item->get_name(), unit_amount: $actual_total / $quantity, hsa_fsa_eligibility: $price->hsa_fsa_eligibility );
     115    }
     116    /**
    95117     * Extract price data from an array of data returned by the Flex API.
    96118     *
     
    157179     */
    158180    public function needs(): \Flex\Resource\ResourceAction {
    159         // If the price was not created from WooCommerce, then there is nothing that needs to be done.
    160         if ( null === $this->wc ) {
    161             return \Flex\Resource\ResourceAction::NONE;
    162         }
    163         if ( ! in_array( $this->wc->get_type(), self::WC_TYPES, \true ) ) {
    164             return \Flex\Resource\ResourceAction::NONE;
     181        // Wait for a product id to be set.
     182        if ( null === $this->product->id() ) {
     183            return \Flex\Resource\ResourceAction::DEPENDENCY;
    165184        }
    166185        // If there is no unit amount, there is nothing to be done.
     
    168187            return \Flex\Resource\ResourceAction::NONE;
    169188        }
    170         // Wait for a product id to be set.
    171         if ( null === $this->product->id() ) {
    172             return \Flex\Resource\ResourceAction::DEPENDENCY;
    173         }
     189        // If no ID, we need to create the price.
    174190        if ( null === $this->id ) {
    175191            return \Flex\Resource\ResourceAction::CREATE;
     192        }
     193        // If the price was not created from WooCommerce, there's nothing more to check.
     194        if ( null === $this->wc ) {
     195            return \Flex\Resource\ResourceAction::NONE;
     196        }
     197        // WooCommerce-specific checks for updates.
     198        if ( ! in_array( $this->wc->get_type(), self::WC_TYPES, \true ) ) {
     199            return \Flex\Resource\ResourceAction::NONE;
    176200        }
    177201        $meta_prefix = self::meta_prefix();
  • pay-with-flex/trunk/src/Resource/Resource.php

    r3391546 r3427514  
    7474     * @throws \Throwable If the JSON decoding fails.
    7575     */
    76     protected static function remote_request( string $path, array $args = array() ): array {
     76    protected function remote_request( string $path, array $args = array() ): array {
    7777        $api_key = self::payment_gateway()->api_key();
    7878        if ( empty( $api_key ) ) {
     
    9393        }
    9494        $method = $args['method'] ?? 'GET';
     95        // Add idempotency key for mutating requests.
     96        if ( 'GET' !== $method ) {
     97            $headers['Idempotency-Key'] = $this->hash();
     98        }
    9599        /**
    96100         * The metadata to add to the breadcrumb
  • pay-with-flex/trunk/vendor/autoload.php

    r3390698 r3427514  
    2020require_once __DIR__ . '/composer/autoload_real.php';
    2121
    22 return ComposerAutoloaderInit7d2d16659169131591eb5ec722d479fd::getLoader();
     22return ComposerAutoloaderInit400fe045e9fce44650d89f3d72a1981a::getLoader();
  • pay-with-flex/trunk/vendor/composer/autoload_classmap.php

    r3395305 r3427514  
    144144    'Flex\\Sentry\\Logs\\LogsAggregator' => $vendorDir . '/sentry/sentry/src/Logs/LogsAggregator.php',
    145145    'Flex\\Sentry\\Metrics\\Metrics' => $vendorDir . '/sentry/sentry/src/Metrics/Metrics.php',
    146     'Flex\\Sentry\\Metrics\\MetricsUnit' => $vendorDir . '/sentry/sentry/src/Metrics/MetricsUnit.php',
     146    'Flex\\Sentry\\Metrics\\MetricsAggregator' => $vendorDir . '/sentry/sentry/src/Metrics/MetricsAggregator.php',
     147    'Flex\\Sentry\\Metrics\\TraceMetrics' => $vendorDir . '/sentry/sentry/src/Metrics/TraceMetrics.php',
     148    'Flex\\Sentry\\Metrics\\Types\\CounterMetric' => $vendorDir . '/sentry/sentry/src/Metrics/Types/CounterMetric.php',
     149    'Flex\\Sentry\\Metrics\\Types\\DistributionMetric' => $vendorDir . '/sentry/sentry/src/Metrics/Types/DistributionMetric.php',
     150    'Flex\\Sentry\\Metrics\\Types\\GaugeMetric' => $vendorDir . '/sentry/sentry/src/Metrics/Types/GaugeMetric.php',
     151    'Flex\\Sentry\\Metrics\\Types\\Metric' => $vendorDir . '/sentry/sentry/src/Metrics/Types/Metric.php',
    147152    'Flex\\Sentry\\MonitorConfig' => $vendorDir . '/sentry/sentry/src/MonitorConfig.php',
    148153    'Flex\\Sentry\\MonitorSchedule' => $vendorDir . '/sentry/sentry/src/MonitorSchedule.php',
     
    162167    'Flex\\Sentry\\Serializer\\EnvelopItems\\EventItem' => $vendorDir . '/sentry/sentry/src/Serializer/EnvelopItems/EventItem.php',
    163168    'Flex\\Sentry\\Serializer\\EnvelopItems\\LogsItem' => $vendorDir . '/sentry/sentry/src/Serializer/EnvelopItems/LogsItem.php',
     169    'Flex\\Sentry\\Serializer\\EnvelopItems\\MetricsItem' => $vendorDir . '/sentry/sentry/src/Serializer/EnvelopItems/MetricsItem.php',
    164170    'Flex\\Sentry\\Serializer\\EnvelopItems\\ProfileItem' => $vendorDir . '/sentry/sentry/src/Serializer/EnvelopItems/ProfileItem.php',
    165171    'Flex\\Sentry\\Serializer\\EnvelopItems\\TransactionItem' => $vendorDir . '/sentry/sentry/src/Serializer/EnvelopItems/TransactionItem.php',
     
    202208    'Flex\\Sentry\\Transport\\ResultStatus' => $vendorDir . '/sentry/sentry/src/Transport/ResultStatus.php',
    203209    'Flex\\Sentry\\Transport\\TransportInterface' => $vendorDir . '/sentry/sentry/src/Transport/TransportInterface.php',
     210    'Flex\\Sentry\\Unit' => $vendorDir . '/sentry/sentry/src/Unit.php',
    204211    'Flex\\Sentry\\UserDataBag' => $vendorDir . '/sentry/sentry/src/UserDataBag.php',
    205212    'Flex\\Sentry\\Util\\Arr' => $vendorDir . '/sentry/sentry/src/Util/Arr.php',
     
    210217    'Flex\\Sentry\\Util\\PHPVersion' => $vendorDir . '/sentry/sentry/src/Util/PHPVersion.php',
    211218    'Flex\\Sentry\\Util\\PrefixStripper' => $vendorDir . '/sentry/sentry/src/Util/PrefixStripper.php',
     219    'Flex\\Sentry\\Util\\RingBuffer' => $vendorDir . '/sentry/sentry/src/Util/RingBuffer.php',
    212220    'Flex\\Sentry\\Util\\SentryUid' => $vendorDir . '/sentry/sentry/src/Util/SentryUid.php',
    213221    'Flex\\Sentry\\Util\\Str' => $vendorDir . '/sentry/sentry/src/Util/Str.php',
  • pay-with-flex/trunk/vendor/composer/autoload_files.php

    r3299082 r3427514  
    1111    'fb4ca2d97fe7ba6af750497425204e70' => $vendorDir . '/sentry/sentry/src/functions.php',
    1212    '9d2b9fc6db0f153a0a149fefb182415e' => $vendorDir . '/symfony/polyfill-php84/bootstrap.php',
     13    '79667749ed3ce80089a399fc6e1fd564' => $baseDir . '/includes/functions.php',
    1314);
  • pay-with-flex/trunk/vendor/composer/autoload_real.php

    r3390698 r3427514  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit7d2d16659169131591eb5ec722d479fd
     5class ComposerAutoloaderInit400fe045e9fce44650d89f3d72a1981a
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInit7d2d16659169131591eb5ec722d479fd', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInit400fe045e9fce44650d89f3d72a1981a', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderInit7d2d16659169131591eb5ec722d479fd', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInit400fe045e9fce44650d89f3d72a1981a', 'loadClassLoader'));
    3030
    3131        require __DIR__ . '/autoload_static.php';
    32         call_user_func(\Composer\Autoload\ComposerStaticInit7d2d16659169131591eb5ec722d479fd::getInitializer($loader));
     32        call_user_func(\Composer\Autoload\ComposerStaticInit400fe045e9fce44650d89f3d72a1981a::getInitializer($loader));
    3333
    3434        $loader->register(true);
    3535
    36         $filesToLoad = \Composer\Autoload\ComposerStaticInit7d2d16659169131591eb5ec722d479fd::$files;
     36        $filesToLoad = \Composer\Autoload\ComposerStaticInit400fe045e9fce44650d89f3d72a1981a::$files;
    3737        $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
    3838            if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
  • pay-with-flex/trunk/vendor/composer/autoload_static.php

    r3395305 r3427514  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit7d2d16659169131591eb5ec722d479fd
     7class ComposerStaticInit400fe045e9fce44650d89f3d72a1981a
    88{
    99    public static $files = array (
     
    1212        'fb4ca2d97fe7ba6af750497425204e70' => __DIR__ . '/..' . '/sentry/sentry/src/functions.php',
    1313        '9d2b9fc6db0f153a0a149fefb182415e' => __DIR__ . '/..' . '/symfony/polyfill-php84/bootstrap.php',
     14        '79667749ed3ce80089a399fc6e1fd564' => __DIR__ . '/../..' . '/includes/functions.php',
    1415    );
    1516
     
    205206        'Flex\\Sentry\\Logs\\LogsAggregator' => __DIR__ . '/..' . '/sentry/sentry/src/Logs/LogsAggregator.php',
    206207        'Flex\\Sentry\\Metrics\\Metrics' => __DIR__ . '/..' . '/sentry/sentry/src/Metrics/Metrics.php',
    207         'Flex\\Sentry\\Metrics\\MetricsUnit' => __DIR__ . '/..' . '/sentry/sentry/src/Metrics/MetricsUnit.php',
     208        'Flex\\Sentry\\Metrics\\MetricsAggregator' => __DIR__ . '/..' . '/sentry/sentry/src/Metrics/MetricsAggregator.php',
     209        'Flex\\Sentry\\Metrics\\TraceMetrics' => __DIR__ . '/..' . '/sentry/sentry/src/Metrics/TraceMetrics.php',
     210        'Flex\\Sentry\\Metrics\\Types\\CounterMetric' => __DIR__ . '/..' . '/sentry/sentry/src/Metrics/Types/CounterMetric.php',
     211        'Flex\\Sentry\\Metrics\\Types\\DistributionMetric' => __DIR__ . '/..' . '/sentry/sentry/src/Metrics/Types/DistributionMetric.php',
     212        'Flex\\Sentry\\Metrics\\Types\\GaugeMetric' => __DIR__ . '/..' . '/sentry/sentry/src/Metrics/Types/GaugeMetric.php',
     213        'Flex\\Sentry\\Metrics\\Types\\Metric' => __DIR__ . '/..' . '/sentry/sentry/src/Metrics/Types/Metric.php',
    208214        'Flex\\Sentry\\MonitorConfig' => __DIR__ . '/..' . '/sentry/sentry/src/MonitorConfig.php',
    209215        'Flex\\Sentry\\MonitorSchedule' => __DIR__ . '/..' . '/sentry/sentry/src/MonitorSchedule.php',
     
    223229        'Flex\\Sentry\\Serializer\\EnvelopItems\\EventItem' => __DIR__ . '/..' . '/sentry/sentry/src/Serializer/EnvelopItems/EventItem.php',
    224230        'Flex\\Sentry\\Serializer\\EnvelopItems\\LogsItem' => __DIR__ . '/..' . '/sentry/sentry/src/Serializer/EnvelopItems/LogsItem.php',
     231        'Flex\\Sentry\\Serializer\\EnvelopItems\\MetricsItem' => __DIR__ . '/..' . '/sentry/sentry/src/Serializer/EnvelopItems/MetricsItem.php',
    225232        'Flex\\Sentry\\Serializer\\EnvelopItems\\ProfileItem' => __DIR__ . '/..' . '/sentry/sentry/src/Serializer/EnvelopItems/ProfileItem.php',
    226233        'Flex\\Sentry\\Serializer\\EnvelopItems\\TransactionItem' => __DIR__ . '/..' . '/sentry/sentry/src/Serializer/EnvelopItems/TransactionItem.php',
     
    263270        'Flex\\Sentry\\Transport\\ResultStatus' => __DIR__ . '/..' . '/sentry/sentry/src/Transport/ResultStatus.php',
    264271        'Flex\\Sentry\\Transport\\TransportInterface' => __DIR__ . '/..' . '/sentry/sentry/src/Transport/TransportInterface.php',
     272        'Flex\\Sentry\\Unit' => __DIR__ . '/..' . '/sentry/sentry/src/Unit.php',
    265273        'Flex\\Sentry\\UserDataBag' => __DIR__ . '/..' . '/sentry/sentry/src/UserDataBag.php',
    266274        'Flex\\Sentry\\Util\\Arr' => __DIR__ . '/..' . '/sentry/sentry/src/Util/Arr.php',
     
    271279        'Flex\\Sentry\\Util\\PHPVersion' => __DIR__ . '/..' . '/sentry/sentry/src/Util/PHPVersion.php',
    272280        'Flex\\Sentry\\Util\\PrefixStripper' => __DIR__ . '/..' . '/sentry/sentry/src/Util/PrefixStripper.php',
     281        'Flex\\Sentry\\Util\\RingBuffer' => __DIR__ . '/..' . '/sentry/sentry/src/Util/RingBuffer.php',
    273282        'Flex\\Sentry\\Util\\SentryUid' => __DIR__ . '/..' . '/sentry/sentry/src/Util/SentryUid.php',
    274283        'Flex\\Sentry\\Util\\Str' => __DIR__ . '/..' . '/sentry/sentry/src/Util/Str.php',
     
    293302    {
    294303        return \Closure::bind(function () use ($loader) {
    295             $loader->prefixLengthsPsr4 = ComposerStaticInit7d2d16659169131591eb5ec722d479fd::$prefixLengthsPsr4;
    296             $loader->prefixDirsPsr4 = ComposerStaticInit7d2d16659169131591eb5ec722d479fd::$prefixDirsPsr4;
    297             $loader->classMap = ComposerStaticInit7d2d16659169131591eb5ec722d479fd::$classMap;
     304            $loader->prefixLengthsPsr4 = ComposerStaticInit400fe045e9fce44650d89f3d72a1981a::$prefixLengthsPsr4;
     305            $loader->prefixDirsPsr4 = ComposerStaticInit400fe045e9fce44650d89f3d72a1981a::$prefixDirsPsr4;
     306            $loader->classMap = ComposerStaticInit400fe045e9fce44650d89f3d72a1981a::$classMap;
    298307
    299308        }, null, ClassLoader::class);
  • pay-with-flex/trunk/vendor/composer/installed.json

    r3395305 r3427514  
    399399        {
    400400            "name": "sentry\/sentry",
    401             "version": "4.18.1",
    402             "version_normalized": "4.18.1.0",
     401            "version": "4.19.1",
     402            "version_normalized": "4.19.1.0",
    403403            "source": {
    404404                "type": "git",
    405405                "url": "https:\/\/github.com\/getsentry\/sentry-php.git",
    406                 "reference": "04dcf20b39742b731b676f8b8d4f02d1db488af8"
    407             },
    408             "dist": {
    409                 "type": "zip",
    410                 "url": "https:\/\/api.github.com\/repos\/getsentry\/sentry-php\/zipball\/04dcf20b39742b731b676f8b8d4f02d1db488af8",
    411                 "reference": "04dcf20b39742b731b676f8b8d4f02d1db488af8",
     406                "reference": "1c21d60bebe67c0122335bd3fe977990435af0a3"
     407            },
     408            "dist": {
     409                "type": "zip",
     410                "url": "https:\/\/api.github.com\/repos\/getsentry\/sentry-php\/zipball\/1c21d60bebe67c0122335bd3fe977990435af0a3",
     411                "reference": "1c21d60bebe67c0122335bd3fe977990435af0a3",
    412412                "shasum": ""
    413413            },
     
    438438                "monolog\/monolog": "Allow sending log messages to Sentry by using the included Monolog handler."
    439439            },
    440             "time": "2025-11-11T09:34:53+00:00",
     440            "time": "2025-12-02T15:57:41+00:00",
    441441            "type": "library",
    442442            "installation-source": "dist",
     
    474474            "support": {
    475475                "issues": "https:\/\/github.com\/getsentry\/sentry-php\/issues",
    476                 "source": "https:\/\/github.com\/getsentry\/sentry-php\/tree\/4.18.1"
     476                "source": "https:\/\/github.com\/getsentry\/sentry-php\/tree\/4.19.1"
    477477            },
    478478            "funding": [
     
    560560        {
    561561            "name": "symfony\/options-resolver",
    562             "version": "v7.3.3",
    563             "version_normalized": "7.3.3.0",
     562            "version": "v8.0.0",
     563            "version_normalized": "8.0.0.0",
    564564            "source": {
    565565                "type": "git",
    566566                "url": "https:\/\/github.com\/symfony\/options-resolver.git",
    567                 "reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d"
    568             },
    569             "dist": {
    570                 "type": "zip",
    571                 "url": "https:\/\/api.github.com\/repos\/symfony\/options-resolver\/zipball\/0ff2f5c3df08a395232bbc3c2eb7e84912df911d",
    572                 "reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d",
    573                 "shasum": ""
    574             },
    575             "require": {
    576                 "php": ">=8.2",
     567                "reference": "d2b592535ffa6600c265a3893a7f7fd2bad82dd7"
     568            },
     569            "dist": {
     570                "type": "zip",
     571                "url": "https:\/\/api.github.com\/repos\/symfony\/options-resolver\/zipball\/d2b592535ffa6600c265a3893a7f7fd2bad82dd7",
     572                "reference": "d2b592535ffa6600c265a3893a7f7fd2bad82dd7",
     573                "shasum": ""
     574            },
     575            "require": {
     576                "php": ">=8.4",
    577577                "symfony\/deprecation-contracts": "^2.5|^3"
    578578            },
    579             "time": "2025-08-05T10:16:07+00:00",
     579            "time": "2025-11-12T15:55:31+00:00",
    580580            "type": "library",
    581581            "installation-source": "dist",
     
    610610            ],
    611611            "support": {
    612                 "source": "https:\/\/github.com\/symfony\/options-resolver\/tree\/v7.3.3"
     612                "source": "https:\/\/github.com\/symfony\/options-resolver\/tree\/v8.0.0"
    613613            },
    614614            "funding": [
  • pay-with-flex/trunk/vendor/composer/installed.php

    r3398425 r3427514  
    33namespace Flex;
    44
    5 return array('root' => array('name' => '__root__', 'pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '91f8a4205530518790bac8338af76d642a489a98', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => \false), 'versions' => array('__root__' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '91f8a4205530518790bac8338af76d642a489a98', '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.18.1', 'version' => '4.18.1.0', 'reference' => '04dcf20b39742b731b676f8b8d4f02d1db488af8', '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)));
     5return array('root' => array('name' => '__root__', 'pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '64e52af59652cf3a0461591681440deb601bb9ef', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => \false), 'versions' => array('__root__' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '64e52af59652cf3a0461591681440deb601bb9ef', '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.19.1', 'version' => '4.19.1.0', 'reference' => '1c21d60bebe67c0122335bd3fe977990435af0a3', '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' => 'v8.0.0', 'version' => '8.0.0.0', 'reference' => 'd2b592535ffa6600c265a3893a7f7fd2bad82dd7', '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/composer/platform_check.php

    r3352167 r3427514  
    55$issues = array();
    66
    7 if (!(PHP_VERSION_ID >= 80200)) {
    8     $issues[] = 'Your Composer dependencies require a PHP version ">= 8.2.0". You are running ' . PHP_VERSION . '.';
     7if (!(PHP_VERSION_ID >= 80400)) {
     8    $issues[] = 'Your Composer dependencies require a PHP version ">= 8.4.0". You are running ' . PHP_VERSION . '.';
    99}
    1010
  • pay-with-flex/trunk/vendor/scoper-autoload.php

    r3390698 r3427514  
    3030    }
    3131}
    32 humbug_phpscoper_expose_class('ComposerAutoloaderInit7d2d16659169131591eb5ec722d479fd', 'Flex\ComposerAutoloaderInit7d2d16659169131591eb5ec722d479fd');
     32humbug_phpscoper_expose_class('ComposerAutoloaderInit400fe045e9fce44650d89f3d72a1981a', 'Flex\ComposerAutoloaderInit400fe045e9fce44650d89f3d72a1981a');
    3333humbug_phpscoper_expose_class('Deprecated', 'Flex\Deprecated');
    3434humbug_phpscoper_expose_class('ReflectionConstant', 'Flex\ReflectionConstant');
     
    3636// Function aliases. For more information see:
    3737// https://github.com/humbug/php-scoper/blob/master/docs/further-reading.md#function-aliases
     38if (!function_exists('_manually_load_plugin')) { function _manually_load_plugin() { return \Flex\_manually_load_plugin(...func_get_args()); } }
    3839if (!function_exists('array_all')) { function array_all() { return \Flex\array_all(...func_get_args()); } }
    3940if (!function_exists('array_any')) { function array_any() { return \Flex\array_any(...func_get_args()); } }
     
    4243if (!function_exists('bcdivmod')) { function bcdivmod() { return \Flex\bcdivmod(...func_get_args()); } }
    4344if (!function_exists('fpow')) { function fpow() { return \Flex\fpow(...func_get_args()); } }
    44 if (!function_exists('get_woocommerce_currency_symbol')) { function get_woocommerce_currency_symbol() { return \Flex\get_woocommerce_currency_symbol(...func_get_args()); } }
    4545if (!function_exists('getallheaders')) { function getallheaders() { return \Flex\getallheaders(...func_get_args()); } }
    4646if (!function_exists('grapheme_str_split')) { function grapheme_str_split() { return \Flex\grapheme_str_split(...func_get_args()); } }
     
    5050if (!function_exists('mb_trim')) { function mb_trim() { return \Flex\mb_trim(...func_get_args()); } }
    5151if (!function_exists('mb_ucfirst')) { function mb_ucfirst() { return \Flex\mb_ucfirst(...func_get_args()); } }
     52if (!function_exists('tests_add_filter')) { function tests_add_filter() { return \Flex\tests_add_filter(...func_get_args()); } }
    5253if (!function_exists('trigger_deprecation')) { function trigger_deprecation() { return \Flex\trigger_deprecation(...func_get_args()); } }
    53 if (!function_exists('wc_get_price_decimal_separator')) { function wc_get_price_decimal_separator() { return \Flex\wc_get_price_decimal_separator(...func_get_args()); } }
    54 if (!function_exists('wc_get_price_thousand_separator')) { function wc_get_price_thousand_separator() { return \Flex\wc_get_price_thousand_separator(...func_get_args()); } }
    5554
    5655return $loader;
  • pay-with-flex/trunk/vendor/sentry/sentry/CHANGELOG.md

    r3393937 r3427514  
    11# CHANGELOG
     2
     3## 4.19.1
     4
     5The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.19.1.
     6
     7### Bug Fixes
     8
     9- Don't cast metrics value to `float` in constructor, drop invalid metrics instead. [(#1981)](https://github.com/getsentry/sentry-php/pull/1981)
     10
     11## 4.19.0
     12
     13The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.19.0.
     14
     15### Features
     16
     17- Add support for metrics. [(#1968)](https://github.com/getsentry/sentry-php/pull/1968)
     18```php
     19// Counter metric
     20\Sentry\trace_metrics()->count('test-counter', 10, ['my-attribute' => 'foo']);
     21
     22// Gauge metric
     23\Sentry\trace_metrics()->gauge('test-gauge', 50.0, ['my-attribute' => 'foo'], \Sentry\Unit::millisecond());
     24
     25// Distribution metric
     26\Sentry\trace_metrics()->distribution('test-distribution', 20.0, ['my-attribute' => 'foo'], \Sentry\Unit::kilobyte());
     27
     28// Flush metrics
     29\Sentry\trace_metrics()->flush();
     30```
     31
     32### Bug Fixes
     33
     34- Add rate limiting for profiles and cron check-ins. [(#1970)](https://github.com/getsentry/sentry-php/pull/1970)
     35- Fix Spotlight so it always registers the error integrations and emits transport logs even when no DSN is configured. [(#1964)](https://github.com/getsentry/sentry-php/pull/1964)
    236
    337## 4.18.1
  • pay-with-flex/trunk/vendor/sentry/sentry/README.md

    r3393937 r3427514  
    6464- Magento 2 by [JustBetter](https://github.com/justbetter/magento2-sentry) or by [Mygento](https://github.com/mygento/module-sentry)
    6565- [Joomla!](https://github.com/AlterBrains/sentry-joomla)
     66- Neos Flow (and CMS) using [flownative/sentry](https://github.com/flownative/flow-sentry) or [networkteam/sentryclient](https://github.com/networkteam/Networkteam.SentryClient)
     67- Neos CMS with specific Fusion handling using [networkteam/neos-sentryclient](https://github.com/networkteam/Netwokteam.Neos.SentryClient)
     68- [TYPO3](https://github.com/networkteam/sentry_client)
    6669- ... feel free to be famous, create a port to your favourite platform!
    6770
    6871## 3rd party integrations using the old SDK 3.x
    6972
    70 - [Neos Flow](https://github.com/flownative/flow-sentry)
    7173- [ZendFramework](https://github.com/facile-it/sentry-module)
    7274- [Yii2](https://github.com/notamedia/yii2-sentry)
     
    7880## 3rd party integrations using the old SDK 2.x
    7981
    80 - [Neos Flow](https://github.com/networkteam/Networkteam.SentryClient)
    8182- [OXID eShop](https://github.com/OXIDprojects/sentry)
    82 - [TYPO3](https://github.com/networkteam/sentry_client)
    8383- [CakePHP](https://github.com/Connehito/cake-sentry/tree/3.x)
    8484
    8585## 3rd party integrations using the old SDK 1.x
    8686
    87 - [Neos CMS](https://github.com/networkteam/Netwokteam.Neos.SentryClient)
    8887- [OpenCart](https://github.com/BurdaPraha/oc_sentry)
    8988- [TYPO3](https://github.com/networkteam/sentry_client/tree/2.1.1)
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Client.php

    r3393937 r3427514  
    2929     * The version of the SDK.
    3030     */
    31     public const SDK_VERSION = '4.18.1';
     31    public const SDK_VERSION = '4.19.1';
    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/Event.php

    r3352167 r3427514  
    77use Flex\Sentry\Context\RuntimeContext;
    88use Flex\Sentry\Logs\Log;
     9use Flex\Sentry\Metrics\Types\Metric;
    910use Flex\Sentry\Profiling\Profile;
    1011use Flex\Sentry\Tracing\Span;
     
    6263    private $logs = [];
    6364    /**
     65     * @var Metric[]
     66     */
     67    private $metrics = [];
     68    /**
    6469     * @var string|null The name of the server (e.g. the host name)
    6570     */
     
    196201        return new self($eventId, EventType::logs());
    197202    }
    198     /**
    199      * @deprecated Metrics are no longer supported. Metrics API is a no-op and will be removed in 5.x.
    200      */
    201203    public static function createMetrics(?EventId $eventId = null): self
    202204    {
     
    368370    }
    369371    /**
    370      * @deprecated Metrics are no longer supported. Metrics API is a no-op and will be removed in 5.x.
     372     * @return Metric[]
    371373     */
    372374    public function getMetrics(): array
    373375    {
    374         return [];
    375     }
    376     /**
    377      * @deprecated Metrics are no longer supported. Metrics API is a no-op and will be removed in 5.x.
     376        return $this->metrics;
     377    }
     378    /**
     379     * @param Metric[] $metrics
    378380     */
    379381    public function setMetrics(array $metrics): self
    380382    {
     383        $this->metrics = $metrics;
    381384        return $this;
    382385    }
  • pay-with-flex/trunk/vendor/sentry/sentry/src/EventType.php

    r3352167 r3427514  
    4040        return self::getInstance('log');
    4141    }
    42     /**
    43      * @deprecated Metrics are no longer supported. Metrics API is a no-op and will be removed in 5.x.
    44      */
    4542    public static function metrics(): self
    4643    {
    47         return self::getInstance('metrics');
     44        return self::getInstance('trace_metric');
    4845    }
    4946    /**
     
    5552    {
    5653        return [self::event(), self::transaction(), self::checkIn(), self::logs(), self::metrics()];
     54    }
     55    public function requiresEventId(): bool
     56    {
     57        switch ($this) {
     58            case self::metrics():
     59            case self::logs():
     60                return \false;
     61            default:
     62                return \true;
     63        }
    5764    }
    5865    public function __toString(): string
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Integration/IntegrationRegistry.php

    r3352167 r3427514  
    113113        }
    114114        $integrations = [new RequestIntegration(), new TransactionIntegration(), new FrameContextifierIntegration(), new EnvironmentIntegration(), new ModulesIntegration()];
    115         if ($options->getDsn() !== null) {
     115        if ($options->getDsn() !== null || $options->isSpotlightEnabled()) {
    116116            array_unshift($integrations, new ExceptionListenerIntegration(), new ErrorListenerIntegration(), new FatalErrorListenerIntegration());
    117117        }
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Metrics/Metrics.php

    r3352167 r3427514  
    66use Flex\Sentry\EventId;
    77use Flex\Sentry\Tracing\SpanContext;
     8use Flex\Sentry\Unit;
    89use function Flex\Sentry\trace;
     10class_alias(Unit::class, 'Flex\Sentry\Metrics\MetricsUnit');
     11/**
     12 * @deprecated use TraceMetrics instead
     13 */
    914class Metrics
    1015{
     
    2328     * @param array<string, string> $tags
    2429     *
    25      * @deprecated Metrics are no longer supported. Metrics API is a no-op and will be removed in 5.x.
     30     * @deprecated Use TraceMetrics::count() instead. To be removed in 5.x.
    2631     */
    27     public function increment(string $key, float $value, ?MetricsUnit $unit = null, array $tags = [], ?int $timestamp = null, int $stackLevel = 0): void
     32    public function increment(string $key, float $value, ?Unit $unit = null, array $tags = [], ?int $timestamp = null, int $stackLevel = 0): void
    2833    {
    2934    }
     
    3136     * @param array<string, string> $tags
    3237     *
    33      * @deprecated Metrics are no longer supported. Metrics API is a no-op and will be removed in 5.x.
     38     * @deprecated Use TraceMetrics::distribution() instead. Metrics API is a no-op and will be removed in 5.x.
    3439     */
    35     public function distribution(string $key, float $value, ?MetricsUnit $unit = null, array $tags = [], ?int $timestamp = null, int $stackLevel = 0): void
     40    public function distribution(string $key, float $value, ?Unit $unit = null, array $tags = [], ?int $timestamp = null, int $stackLevel = 0): void
    3641    {
    3742    }
     
    3944     * @param array<string, string> $tags
    4045     *
    41      * @deprecated Metrics are no longer supported. Metrics API is a no-op and will be removed in 5.x.
     46     * @deprecated Use TraceMetrics::gauge() instead. To be removed in 5.x.
    4247     */
    43     public function gauge(string $key, float $value, ?MetricsUnit $unit = null, array $tags = [], ?int $timestamp = null, int $stackLevel = 0): void
     48    public function gauge(string $key, float $value, ?Unit $unit = null, array $tags = [], ?int $timestamp = null, int $stackLevel = 0): void
    4449    {
    4550    }
     
    5055     * @deprecated Metrics are no longer supported. Metrics API is a no-op and will be removed in 5.x.
    5156     */
    52     public function set(string $key, $value, ?MetricsUnit $unit = null, array $tags = [], ?int $timestamp = null, int $stackLevel = 0): void
     57    public function set(string $key, $value, ?Unit $unit = null, array $tags = [], ?int $timestamp = null, int $stackLevel = 0): void
    5358    {
    5459    }
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Options.php

    r3390698 r3427514  
    1010use Flex\Sentry\Integration\IntegrationInterface;
    1111use Flex\Sentry\Logs\Log;
     12use Flex\Sentry\Metrics\Types\Metric;
    1213use Flex\Sentry\Transport\TransportInterface;
    1314use Flex\Symfony\Component\OptionsResolver\Options as SymfonyOptions;
     
    151152    }
    152153    /**
     154     * Sets if metrics should be enabled or not.
     155     */
     156    public function setEnableMetrics(bool $enableTracing): self
     157    {
     158        $options = array_merge($this->options, ['enable_metrics' => $enableTracing]);
     159        $this->options = $this->resolver->resolve($options);
     160        return $this;
     161    }
     162    /**
     163     * Returns whether metrics are enabled or not.
     164     */
     165    public function getEnableMetrics(): bool
     166    {
     167        /**
     168         * @var bool $enableMetrics
     169         */
     170        $enableMetrics = $this->options['enable_metrics'] ?? \true;
     171        return $enableMetrics;
     172    }
     173    /**
    153174     * Sets the sampling factor to apply to transactions. A value of 0 will deny
    154175     * sending any transactions, and a value of 1 will send 100% of transactions.
     
    562583    {
    563584        return $this->options['before_send_metrics'];
     585    }
     586    /**
     587     * Gets a callback that will be invoked before a metric is added.
     588     * Returning `null` means that the metric will be discarded.
     589     */
     590    public function getBeforeSendMetricCallback(): callable
     591    {
     592        /**
     593         * @var callable $callback
     594         */
     595        $callback = $this->options['before_send_metric'];
     596        return $callback;
     597    }
     598    /**
     599     * Sets a new callback that is invoked before metrics are sent.
     600     * Returning `null` means that the metric will be discarded.
     601     *
     602     * @return $this
     603     */
     604    public function setBeforeSendMetricCallback(callable $callback): self
     605    {
     606        $options = array_merge($this->options, ['before_send_metric' => $callback]);
     607        $this->options = $this->resolver->resolve($options);
     608        return $this;
    564609    }
    565610    /**
     
    10121057            'enable_tracing' => null,
    10131058            'enable_logs' => \false,
     1059            'enable_metrics' => \true,
    10141060            'traces_sample_rate' => null,
    10151061            'traces_sampler' => null,
     
    10481094            /**
    10491095             * @deprecated Metrics are no longer supported. Metrics API is a no-op and will be removed in 5.x.
     1096             * Use `before_send_metric` instead.
    10501097             */
    10511098            'before_send_metrics' => static function (Event $metrics): ?Event {
    10521099                return null;
     1100            },
     1101            'before_send_metric' => static function (Metric $metric): Metric {
     1102                return $metric;
    10531103            },
    10541104            'trace_propagation_targets' => null,
     
    10811131        $resolver->setAllowedTypes('enable_tracing', ['null', 'bool']);
    10821132        $resolver->setAllowedTypes('enable_logs', 'bool');
     1133        $resolver->setAllowedTypes('enable_metrics', 'bool');
    10831134        $resolver->setAllowedTypes('traces_sample_rate', ['null', 'int', 'float']);
    10841135        $resolver->setAllowedTypes('traces_sampler', ['null', 'callable']);
     
    11001151        $resolver->setAllowedTypes('before_send_transaction', ['callable']);
    11011152        $resolver->setAllowedTypes('before_send_log', 'callable');
     1153        $resolver->setAllowedTypes('before_send_metric', ['callable']);
    11021154        $resolver->setAllowedTypes('ignore_exceptions', 'string[]');
    11031155        $resolver->setAllowedTypes('ignore_transactions', 'string[]');
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Serializer/PayloadSerializer.php

    r3352167 r3427514  
    1010use Flex\Sentry\Serializer\EnvelopItems\EventItem;
    1111use Flex\Sentry\Serializer\EnvelopItems\LogsItem;
     12use Flex\Sentry\Serializer\EnvelopItems\MetricsItem;
    1213use Flex\Sentry\Serializer\EnvelopItems\ProfileItem;
    1314use Flex\Sentry\Serializer\EnvelopItems\TransactionItem;
     
    3637    {
    3738        // @see https://develop.sentry.dev/sdk/envelopes/#envelope-headers
    38         $envelopeHeader = ['event_id' => (string) $event->getId(), 'sent_at' => gmdate('Y-m-d\TH:i:s\Z'), 'dsn' => (string) $this->options->getDsn(), 'sdk' => $event->getSdkPayload()];
     39        $envelopeHeader = ['sent_at' => gmdate('Y-m-d\TH:i:s\Z'), 'dsn' => (string) $this->options->getDsn(), 'sdk' => $event->getSdkPayload()];
     40        if ($event->getType()->requiresEventId()) {
     41            $envelopeHeader['event_id'] = (string) $event->getId();
     42        }
    3943        $dynamicSamplingContext = $event->getSdkMetadata('dynamic_sampling_context');
    4044        if ($dynamicSamplingContext instanceof DynamicSamplingContext) {
     
    6165                $items[] = LogsItem::toEnvelopeItem($event);
    6266                break;
     67            case EventType::metrics():
     68                $items[] = MetricsItem::toEnvelopeItem($event);
     69                break;
    6370        }
    6471        return \sprintf("%s\n%s", JSON::encode($envelopeHeader), implode("\n", array_filter($items)));
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Tracing/Span.php

    r3390698 r3427514  
    55
    66use Flex\Sentry\EventId;
    7 use Flex\Sentry\Metrics\MetricsUnit;
    87use Flex\Sentry\SentrySdk;
    98use Flex\Sentry\State\Scope;
     9use Flex\Sentry\Unit;
    1010/**
    1111 * This class stores all the information about a span.
     
    460460     * @deprecated Metrics are no longer supported. Metrics API is a no-op and will be removed in 5.x.
    461461     */
    462     public function setMetricsSummary(string $type, string $key, $value, MetricsUnit $unit, array $tags): void
     462    public function setMetricsSummary(string $type, string $key, $value, Unit $unit, array $tags): void
    463463    {
    464464    }
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Transport/HttpTransport.php

    r3352167 r3427514  
    6969            return new Result(ResultStatus::rateLimit());
    7070        }
     71        // Since profiles are attached to transaction we have to check separately if they are rate limited.
     72        // We can do this after transactions have been checked because if transactions are rate limited,
     73        // so are profiles but not the other way around.
     74        if ($event->getSdkMetadata('profile') !== null) {
     75            if ($this->rateLimiter->isRateLimited(RateLimiter::DATA_CATEGORY_PROFILE)) {
     76                // Just remove profiling data so the normal transaction can be sent.
     77                $event->setSdkMetadata('profile', null);
     78                $this->logger->warning('Rate limit exceeded for sending requests of type "profile". The profile has been dropped.', ['event' => $event]);
     79            }
     80        }
    7181        $request = new Request();
    7282        $request->setStringBody($this->payloadSerializer->serialize($event));
     
    105115            return;
    106116        }
     117        $eventDescription = \sprintf('%s%s [%s]', $event->getLevel() !== null ? $event->getLevel() . ' ' : '', (string) $event->getType(), (string) $event->getId());
     118        $this->logger->info(\sprintf('Sending %s to Spotlight.', $eventDescription), ['event' => $event]);
    107119        $request = new Request();
    108120        $request->setStringBody($this->payloadSerializer->serialize($event));
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Transport/RateLimiter.php

    r3352167 r3427514  
    1313     * @var string
    1414     */
     15    public const DATA_CATEGORY_PROFILE = 'profile';
     16    /**
     17     * @var string
     18     */
    1519    private const DATA_CATEGORY_ERROR = 'error';
    1620    /**
     
    1822     */
    1923    private const DATA_CATEGORY_LOG_ITEM = 'log_item';
     24    /**
     25     * @var string
     26     */
     27    private const DATA_CATEGORY_CHECK_IN = 'monitor';
    2028    /**
    2129     * The name of the header to look at to know the rate limits for the events
     
    7987    public function isRateLimited($eventType): bool
    8088    {
    81         $disabledUntil = $this->getDisabledUntil($eventType);
    82         return $disabledUntil > time();
     89        return $this->getDisabledUntil($eventType) > time();
    8390    }
    8491    /**
     
    9299        } elseif ($eventType === 'log') {
    93100            $eventType = self::DATA_CATEGORY_LOG_ITEM;
     101        } elseif ($eventType === 'check_in') {
     102            $eventType = self::DATA_CATEGORY_CHECK_IN;
    94103        }
    95104        return max($this->rateLimits['all'] ?? 0, $this->rateLimits[$eventType] ?? 0);
  • pay-with-flex/trunk/vendor/sentry/sentry/src/functions.php

    r3393937 r3427514  
    99use Flex\Sentry\Logs\Logs;
    1010use Flex\Sentry\Metrics\Metrics;
     11use Flex\Sentry\Metrics\TraceMetrics;
    1112use Flex\Sentry\State\Scope;
    1213use Flex\Sentry\Tracing\PropagationContext;
     
    333334}
    334335/**
    335  * @deprecated Metrics are no longer supported. Metrics API is a no-op and will be removed in 5.x.
     336 * @deprecated use `trace_metrics` instead
    336337 */
    337338function metrics(): Metrics
    338339{
    339340    return Metrics::getInstance();
     341}
     342function trace_metrics(): TraceMetrics
     343{
     344    return TraceMetrics::getInstance();
    340345}
    341346/**
  • pay-with-flex/trunk/vendor/symfony/options-resolver/CHANGELOG.md

    r3306095 r3427514  
    11CHANGELOG
    22=========
     3
     48.0
     5---
     6
     7* Remove support for nested options definition via `setDefault()`, use `setOptions()` instead
    38
    497.3
  • pay-with-flex/trunk/vendor/symfony/options-resolver/OptionsResolver.php

    r3352167 r3427514  
    4242    private array $nested = [];
    4343    /**
    44      * BC layer. Remove in Symfony 8.0.
    45      *
    46      * @var array<string, true>
    47      */
    48     private array $deprecatedNestedOptions = [];
    49     /**
    5044     * The names of required options.
    5145     */
     
    177171                // Make sure the option is processed
    178172                unset($this->resolved[$option]);
    179                 // BC layer. Remove in Symfony 8.0.
    180                 if (isset($this->deprecatedNestedOptions[$option])) {
    181                     unset($this->nested[$option]);
    182                 }
    183                 return $this;
    184             }
    185             // Remove in Symfony 8.0.
    186             if (isset($params[0]) && ($type = $params[0]->getType()) instanceof \ReflectionNamedType && self::class === $type->getName() && (!isset($params[1]) || ($type = $params[1]->getType()) instanceof \ReflectionNamedType && Options::class === $type->getName())) {
    187                 trigger_deprecation('symfony/options-resolver', '7.3', 'Defining nested options via "%s()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.', __METHOD__);
    188                 $this->deprecatedNestedOptions[$option] = \true;
    189                 // Store closure for later evaluation
    190                 $this->nested[$option][] = $value;
    191                 $this->defaults[$option] = [];
    192                 $this->defined[$option] = \true;
    193                 // Make sure the option is processed and is not lazy anymore
    194                 unset($this->resolved[$option], $this->lazy[$option]);
    195173                return $this;
    196174            }
     
    198176        // This option is not lazy anymore
    199177        unset($this->lazy[$option]);
    200         // BC layer. Remove in Symfony 8.0.
    201         if (isset($this->deprecatedNestedOptions[$option])) {
    202             unset($this->nested[$option]);
    203         }
    204178        // Yet undefined options can be marked as resolved, because we only need
    205179        // to resolve options with lazy closures, normalizers or validation
     
    701675        foreach ((array) $optionNames as $option) {
    702676            unset($this->defined[$option], $this->defaults[$option], $this->required[$option], $this->resolved[$option]);
    703             unset($this->lazy[$option], $this->normalizers[$option], $this->allowedTypes[$option], $this->allowedValues[$option], $this->info[$option]);
     677            unset($this->lazy[$option], $this->normalizers[$option], $this->allowedTypes[$option], $this->allowedValues[$option], $this->info[$option], $this->deprecated[$option]);
    704678        }
    705679        return $this;
     
    850824                $resolver->prototype = \false;
    851825                $resolver->parentsOptions = $this->parentsOptions;
     826                if ($this->prototype && null !== $this->prototypeIndex && null !== $parentOptionKey = array_key_last($resolver->parentsOptions)) {
     827                    $resolver->parentsOptions[$parentOptionKey] .= \sprintf('[%s]', $this->prototypeIndex);
     828                }
    852829                $resolver->parentsOptions[] = $option;
    853830                foreach ($this->nested[$option] as $closure) {
     
    1012989    private function splitOutsideParenthesis(string $type): array
    1013990    {
    1014         $parts = [];
    1015         $currentPart = '';
    1016         $parenthesisLevel = 0;
    1017         $typeLength = \strlen($type);
    1018         for ($i = 0; $i < $typeLength; ++$i) {
    1019             $char = $type[$i];
    1020             if ('(' === $char) {
    1021                 ++$parenthesisLevel;
    1022             } elseif (')' === $char) {
    1023                 --$parenthesisLevel;
    1024             }
    1025             if ('|' === $char && 0 === $parenthesisLevel) {
    1026                 $parts[] = $currentPart;
    1027                 $currentPart = '';
    1028             } else {
    1029                 $currentPart .= $char;
    1030             }
    1031         }
    1032         if ('' !== $currentPart) {
    1033             $parts[] = $currentPart;
    1034         }
    1035         return $parts;
     991        return preg_split(<<<'EOF'
     992                /
     993                # Define a recursive subroutine for matching balanced parentheses
     994                (?(DEFINE)
     995                    (?<balanced>
     996                        \(                          # Match an opening parenthesis
     997                        (?:                         # Start a non-capturing group for the contents
     998                            [^()]                   # Match any character that is not a parenthesis
     999                            |                       # OR
     1000                            (?&balanced)            # Recursively match a nested balanced group
     1001                        )*                          # Repeat the group for all contents
     1002                        \)                          # Match the final closing parenthesis
     1003                    )
     1004                )
     1005       
     1006                # Match any balanced parenthetical group, then skip it
     1007                (?&balanced)(*SKIP)(*FAIL)          # Use the defined subroutine and discard the match
     1008       
     1009                | # OR
     1010       
     1011                \|                                  # Match the pipe delimiter (only if not inside a skipped group)
     1012                /x
     1013        EOF, $type);
    10361014    }
    10371015    /**
  • pay-with-flex/trunk/vendor/symfony/options-resolver/composer.json

    r3352167 r3427514  
    2121    ],
    2222    "require": {
    23         "php": ">=8.2",
     23        "php": ">=8.4",
    2424        "symfony\/deprecation-contracts": "^2.5|^3"
    2525    },
Note: See TracChangeset for help on using the changeset viewer.