Plugin Directory

Changeset 3308128


Ignore:
Timestamp:
06/08/2025 07:39:21 PM (10 months ago)
Author:
withflex
Message:

Add 3.1.0

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

Legend:

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

    r3306095 r3308128  
    452452        {
    453453            "name": "sentry/sentry",
    454             "version": "4.11.1",
     454            "version": "4.12.0",
    455455            "source": {
    456456                "type": "git",
    457457                "url": "https://github.com/getsentry/sentry-php.git",
    458                 "reference": "53dc0bcb6a667cac5b760b46f98d5380e63e02ca"
    459             },
    460             "dist": {
    461                 "type": "zip",
    462                 "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/53dc0bcb6a667cac5b760b46f98d5380e63e02ca",
    463                 "reference": "53dc0bcb6a667cac5b760b46f98d5380e63e02ca",
     458                "reference": "0173702ffcbe36ce7638f07f090271294866a7a0"
     459            },
     460            "dist": {
     461                "type": "zip",
     462                "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/0173702ffcbe36ce7638f07f090271294866a7a0",
     463                "reference": "0173702ffcbe36ce7638f07f090271294866a7a0",
    464464                "shasum": ""
    465465            },
     
    525525            "support": {
    526526                "issues": "https://github.com/getsentry/sentry-php/issues",
    527                 "source": "https://github.com/getsentry/sentry-php/tree/4.11.1"
     527                "source": "https://github.com/getsentry/sentry-php/tree/4.12.0"
    528528            },
    529529            "funding": [
     
    537537                }
    538538            ],
    539             "time": "2025-05-12T11:30:33+00:00"
     539            "time": "2025-06-07T08:37:56+00:00"
    540540        },
    541541        {
  • pay-with-flex/trunk/pay-with-flex.php

    r3306095 r3308128  
    33 * Plugin Name:      Flex HSA/FSA Payments
    44 * Description:      Accept HSA/FSA payments directly in the checkout flow.
    5  * Version:          3.0.0
     5 * Version:          3.1.0
    66 * Plugin URI:       https://wordpress.org/plugins/pay-with-flex/
    77 * Author:           Flex
     
    2525use Flex\PaymentGateway;
    2626use Flex\Resource\CheckoutSession\LineItem;
     27use Flex\Resource\Coupon;
    2728use Flex\Resource\Price;
    2829use Flex\Resource\Product;
     
    345346
    346347/**
     348 * Update Coupon in Flex.
     349 *
     350 * @param int $product_id The id of the product.
     351 * @param int $retries The number of retries that have been attempted.
     352 *
     353 * @throws \Exception If the product fails to be updated.
     354 */
     355function flex_update_coupon_async( int $product_id, int $retries = 0 ): void {
     356    flex_enqueue_async_action(
     357        hook: 'flex_update_coupon',
     358        args: array( $product_id, $retries ),
     359        group: "product-$product_id",
     360        retries: $retries,
     361    );
     362}
     363
     364/**
    347365 * Update Product in Flex.
    348366 *
     
    366384
    367385        $flex_product = Product::from_wc( $product );
    368 
    369         $action = $flex_product->needs();
    370 
    371         // It's possible that the product no longer needs updating (i.e. if the changes have been reverted).
    372         if ( ! $flex_product->can( $action ) ) {
    373             return;
    374         }
    375 
    376         $flex_product->exec( $action );
     386        $flex_product->exec( $flex_product->needs() );
    377387    } catch ( \Throwable $previous ) {
    378388        flex_update_product_async( $product_id, $retries + 1 );
     
    408418
    409419        $price = Price::from_wc( $product );
    410 
    411         $action = $price->needs();
    412 
    413         // It's possible that the price no longer needs updating (i.e. if the changes have been reverted).
    414         if ( ! $price->can( $action ) ) {
    415             return;
    416         }
    417 
    418         $price->exec( $action );
     420        $price->exec( $price->needs() );
    419421    } catch ( \Throwable $previous ) {
    420422        flex_update_price_async( $product_id, $retries + 1 );
     
    429431
    430432/**
     433 * Update Coupon in Flex.
     434 *
     435 * @param int $product_id The id of the coupon.
     436 * @param int $retries The number of retries that have been attempted.
     437 *
     438 * @throws FlexException If the API key is not set.
     439 * @throws \Throwable Any caught exceptions.
     440 */
     441function flex_update_coupon( int $product_id, int $retries = 0 ): void {
     442    try {
     443        $gateway = payment_gateway();
     444        if ( empty( $gateway->api_key() ) ) {
     445            throw new FlexException( 'API Key is not set' );
     446        }
     447
     448        $product = wc_get_product( $product_id );
     449        if ( ! $product ) {
     450            return;
     451        }
     452
     453        $coupon = Coupon::from_wc( $product );
     454        $coupon->exec( $coupon->needs() );
     455    } catch ( \Throwable $previous ) {
     456        flex_update_coupon_async( $product_id, $retries + 1 );
     457        throw $previous;
     458    }
     459}
     460add_action(
     461    hook_name: 'flex_update_coupon',
     462    callback: __NAMESPACE__ . '\flex_update_coupon',
     463    accepted_args: 2,
     464);
     465
     466/**
    431467 * Listens to product update and enqueues an update in Flex if needed.
    432468 *
     
    454490    }
    455491
     492    $coupon = Coupon::from_wc( $product );
     493    if ( $coupon->can( $coupon->needs() ) ) {
     494        flex_update_coupon_async( $product_id );
     495        return;
     496    }
     497
    456498    $variation_ids = $product->get_children();
    457499    foreach ( $variation_ids as $variation_id ) {
    458500        $variation = wc_get_product( $variation_id );
    459         $price     = Price::from_wc( $variation );
    460 
     501
     502        $price = Price::from_wc( $variation );
    461503        if ( $price->can( $price->needs() ) ) {
    462504            flex_update_price_async( $variation_id );
     505            continue;
     506        }
     507
     508        $coupon = Coupon::from_wc( $variation );
     509        if ( $coupon->can( $coupon->needs() ) ) {
     510            flex_update_coupon_async( $variation_id );
     511            continue;
    463512        }
    464513    }
     
    491540    $price = Price::from_wc( $product );
    492541    if ( $price->can( $price->needs() ) ) {
    493         return;
    494     }
    495 
    496     flex_update_price_async( $product_id );
     542        flex_update_price_async( $product_id );
     543        return;
     544    }
     545
     546    $coupon = Coupon::from_wc( $product );
     547    if ( $coupon->can( $coupon->needs() ) ) {
     548        flex_update_coupon_async( $product_id );
     549        return;
     550    }
    497551}
    498552add_action(
     
    602656
    603657/**
     658 * React to the payment method being enabled.
     659 */
     660function payment_method_enabled(): void {
     661    sentry()->captureMessage(
     662        message: 'Payment method enabled',
     663        level: Severity::info(),
     664    );
     665
     666    $gateway = payment_gateway();
     667
     668    // Refresh the settings from the database so we are working with the latest version.
     669    $gateway->init_settings();
     670
     671        // If no API key is present, then there is nothing to do.
     672    if ( empty( $gateway->api_key() ) ) {
     673        return;
     674    }
     675
     676    // Check to see if the webhook needs to be updated.
     677    $webhook = Webhook::from_wc( $gateway );
     678    if ( $webhook->can( $webhook->needs() ) ) {
     679        flex_update_webhook_async();
     680    }
     681
     682    for ( $i = 1; ; $i++ ) {
     683        /**
     684         * Fetch all of the products we support.
     685         *
     686         * @var \WC_Product[]
     687         */
     688        $products = wc_get_products(
     689            array(
     690                'paged' => $i,
     691                'type'  => array_merge( Product::WC_TYPES, Price::WC_TYPES ),
     692            )
     693        );
     694
     695        if ( empty( $products ) ) {
     696            break;
     697        }
     698
     699        // Enqueue all of them to be updated.
     700        foreach ( $products as $product ) {
     701            wc_update_product( $product->get_id(), $product );
     702        }
     703    }
     704}
     705
     706/**
     707 * React to the payment method being disabled.
     708 */
     709function payment_method_disabled(): void {
     710    sentry()->captureMessage(
     711        message: 'Payment method disabled',
     712        level: Severity::warning(),
     713    );
     714    $gateway = payment_gateway();
     715
     716    // Refresh the settings from the database so we are working with the latest version.
     717    $gateway->init_settings();
     718
     719    // Check to see if the webhook needs to be updated.
     720    $webhook = Webhook::from_wc( $gateway );
     721    if ( $webhook->can( $webhook->needs() ) ) {
     722        flex_update_webhook_async();
     723    }
     724}
     725
     726/**
    604727 * Listen to settings changes for Flex gateway.
    605728 *
     
    616739    }
    617740
    618     $gateway = payment_gateway();
    619 
    620     // Refresh the settings from the database so we are working with the latest version.
    621     $gateway->init_settings();
    622 
    623     // Payment method activation.
    624741    if ( 'yes' === $value['enabled'] && ( null === $old_value || ! isset( $old_value['enabled'] ) || 'no' === $old_value['enabled'] ) ) {
    625         sentry()->captureMessage(
    626             message: 'Payment method enabled',
    627             level: Severity::info(),
    628         );
    629 
    630         // If no API key is present, then there is nothing to do.
    631         if ( empty( $gateway->api_key() ) ) {
    632             return;
    633         }
    634 
    635         // Check to see if the webhook needs to be updated.
    636         $webhook = Webhook::from_wc( $gateway );
    637         if ( $webhook->can( $webhook->needs() ) ) {
    638             flex_update_webhook_async();
    639         }
    640 
    641         for ( $i = 1; ; $i++ ) {
    642             /**
    643              * Fetch all of the products we support.
    644              *
    645              * @var \WC_Product[]
    646              */
    647             $products = wc_get_products(
    648                 array(
    649                     'paged' => $i,
    650                     'type'  => array_merge( Product::WC_TYPES, Price::WC_TYPES ),
    651                 )
    652             );
    653 
    654             if ( empty( $products ) ) {
    655                 break;
    656             }
    657 
    658             // Enqueue all of them to be updated.
    659             foreach ( $products as $product ) {
    660                 wc_update_product( $product->get_id(), $product );
    661             }
    662         }
    663     } elseif ( 'no' === $value['enabled'] && 'yes' === $old_value['enabled'] ) { // Payment method deactivation.
    664         sentry()->captureMessage(
    665             message: 'Payment method disabled',
    666             level: Severity::warning(),
    667         );
    668 
    669         // Check to see if the webhook needs to be updated.
    670         $webhook = Webhook::from_wc( $gateway );
    671         if ( $webhook->can( $webhook->needs() ) ) {
    672             flex_update_webhook_async();
    673         }
     742        payment_method_enabled();
     743    } elseif ( 'no' === $value['enabled'] && 'yes' === $old_value['enabled'] ) {
     744        payment_method_disabled();
    674745    }
    675746}
     
    677748    hook_name: 'update_option_woocommerce_flex_settings',
    678749    callback: __NAMESPACE__ . '\update_option_wc_flex_settings',
     750    accepted_args: 2,
     751);
     752
     753/**
     754 * Adding the WooCommerce option for the first time.
     755 *
     756 * @param string $option The name of the option.
     757 * @param mixed  $value The value of the option.
     758 */
     759function add_option_wc_flex_settings( string $option, mixed $value ): void {
     760    if ( ! is_array( $value ) ) {
     761        return;
     762    }
     763
     764    if ( ! isset( $value['enabled'] ) ) {
     765        return;
     766    }
     767
     768    if ( 'yes' === $value['enabled'] ) {
     769        payment_method_enabled();
     770    }
     771}
     772add_action(
     773    hook_name: 'add_option_woocommerce_flex_settings',
     774    callback: __NAMESPACE__ . '\add_option_wc_flex_settings',
    679775    accepted_args: 2,
    680776);
  • pay-with-flex/trunk/readme.txt

    r3306095 r3308128  
    44Requires at least: 6.8
    55Tested up to: 6.8
    6 Stable tag: 3.0.0
     6Stable tag: 3.1.0
    77Requires PHP: 8.1
    88License: GPLv3 or later
     
    5656== Changelog ==
    5757
     58= 3.1.0 =
     59* Added support for [Coupons](https://woocommerce.com/document/coupon-management/).
     60* Added support for Sale Price.
     61* Fixed a bug that prevented product sync when the payment method was enabled for the very first time.
     62
    5863= 3.0.0 =
    59 * Added support fro processing refunds from within WooCommerce.
     64* Added support for processing [refunds](https://woocommerce.com/document/woocommerce-refunds/#automatic-refunds) from within WooCommerce.
    6065* Added the `FLEX_TELEMETRY` constant which allows users to opt-out of telemetry by setting the constant to `false`.
    6166* Fixed `PHP Notice: Function _load_textdomain_just_in_time was called incorrectly.`
  • pay-with-flex/trunk/src/Resource/CheckoutSession/CheckoutSession.php

    r3306095 r3308128  
    1212use Flex\Controller\Controller;
    1313use Flex\Exception\FlexException;
     14use Flex\Resource\Coupon;
    1415use Flex\Resource\Resource;
    1516use Flex\Resource\ResourceAction;
     
    3233     */
    3334    protected ?\WC_Order $wc = null;
     35
     36    /**
     37     * Line Items
     38     *
     39     * @var LineItem[]
     40     */
     41    protected array $line_items;
     42
     43    /**
     44     * Discounts
     45     *
     46     * @var Discount[]
     47     */
     48    protected array $discounts;
    3449
    3550    /**
     
    4964     * @param ?TaxRate          $tax_rate The tax if there is one.
    5065     * @param ?string           $cancel_url The url to use to cancel the checkout session.
     66     * @param ?Discount[]       $discounts The discounts to apply to the checkout session.
     67     * @throws \LogicException If the line_items or discounts contain something other than their respective types.
    5168     */
    5269    public function __construct(
     
    5471        protected ?CustomerDefaults $defaults = null,
    5572        protected ?string $redirect_url = null,
    56         protected array $line_items = array(),
     73        array $line_items = array(),
    5774        protected ?string $id = null,
    5875        protected ?string $client_reference_id = null,
     
    6481        protected ?TaxRate $tax_rate = null,
    6582        protected ?string $cancel_url = null,
    66     ) {}
     83        ?array $discounts = null,
     84    ) {
     85        if ( ! array_all( $line_items, fn ( $item ) => $item instanceof LineItem ) ) {
     86            throw new \LogicException( 'CheckoutSession::$line_items may only contain instances of LineItem' );
     87        }
     88        $this->line_items = $line_items;
     89
     90        if ( ! empty( $discounts ) && ! array_all( $discounts, fn ( $item ) => $item instanceof Discount ) ) {
     91            throw new \LogicException( 'CheckoutSession::$discounts may only contain instances of Discount' );
     92        }
     93
     94        $this->discounts = $discounts ?? array();
     95    }
    6796
    6897    /**
     
    124153        }
    125154
     155        if ( ! empty( $this->discounts ) ) {
     156            $data['discounts'] = $this->discounts;
     157        }
     158
    126159        return $data;
    127160    }
     
    143176
    144177        $tax_rate = TaxRate::from_wc( $order );
     178
     179        // Recreate the discounts so we can get a line-item level discount.
     180        $wc_discounts = new \WC_Discounts( $order );
     181        foreach ( $order->get_coupons() as $applied ) {
     182            // We do *not* verify the coupons because they have already been verified when they were placed on the order.
     183            // Applying the coupons again _should_ be deterministic.
     184            $wc_discounts->apply_coupon( new \WC_Coupon( $applied->get_code() ), false );
     185        }
     186
     187        // Group the discounts by the code → amount → line item
     188        // If the discount is spread evenly across line items, we can share the discount in Flex.
     189        $discounts_grouped = array();
     190        foreach ( $wc_discounts->get_discounts() as $code => $items ) {
     191            foreach ( $items as $item_id => $amount ) {
     192                $discounts_grouped[ $code ][ self::currency_to_unit_amount( $amount ) ][] = $item_id;
     193            }
     194        }
     195
     196        $discounts = array();
     197        foreach ( $discounts_grouped as $code => $group ) {
     198            foreach ( $group as $per_item_amount => $item_ids ) {
     199                $amount_off = $per_item_amount * count( $item_ids );
     200                if ( empty( $amount_off ) ) {
     201                    continue;
     202                }
     203
     204                $discounts[] = new Discount(
     205                    new Coupon(
     206                        name: $code,
     207                        amount_off: $amount_off,
     208                        applies_to: array_map( fn( $item_id ) => LineItem::from_wc( $order->get_item( $item_id ) )->price(), $item_ids ),
     209                    )
     210                );
     211            }
     212        }
     213
     214        // Add the sale price discounts.
     215        foreach ( $order->get_items() as $item ) {
     216            if ( ! $item instanceof \WC_Order_Item_Product ) {
     217                continue;
     218            }
     219
     220            $product = $item->get_product();
     221            if ( $product->get_price() !== $product->get_sale_price() ) {
     222                continue;
     223            }
     224
     225            $coupon = Coupon::from_wc( $product );
     226            if ( empty( $coupon->amount_off() ) ) {
     227                continue;
     228            }
     229
     230            $quantity = $item->get_quantity();
     231
     232            // Add a discount for each individiaul item.
     233            for ( $i = 0; $i < $quantity; $i++ ) {
     234                $discounts[] = new Discount( $coupon );
     235            }
     236        }
    145237
    146238        $checkout_session = new self(
     
    158250            tax_rate: $tax_rate->amount() > 0 ? $tax_rate : null,
    159251            cancel_url: wc_get_checkout_url(),
     252            discounts: $discounts,
    160253        );
    161254
     
    225318    public function needs(): ResourceAction {
    226319        // Handle any dependency actions first.
    227         if ( array_any( $this->line_items, fn( $line_item ) => $line_item->needs() !== ResourceAction::NONE ) ) {
     320        if ( array_any( $this->line_items, static fn( $line_item ) => $line_item->needs() !== ResourceAction::NONE ) ) {
     321            return ResourceAction::DEPENDENCY;
     322        }
     323
     324        if ( array_any( $this->discounts, static fn( $discount ) => $discount->needs() !== ResourceAction::NONE ) ) {
    228325            return ResourceAction::DEPENDENCY;
    229326        }
     
    313410                $line_item->exec( $line_item->needs() );
    314411            }
     412
     413            foreach ( $this->discounts as $discount ) {
     414                $discount->exec( $discount->needs() );
     415            }
     416
     417            // Re-evaluate the action.
     418            $this->exec( $this->needs() );
     419            return;
    315420        }
    316421
    317422        $data = $this->remote_request(
    318423            match ( $action ) {
    319                 ResourceAction::CREATE, ResourceAction::DEPENDENCY => '/v1/checkout/sessions',
     424                ResourceAction::CREATE => '/v1/checkout/sessions',
    320425                ResourceAction::REFRESH => '/v1/checkout/sessions/' . $this->id,
    321426            },
    322427            array(
    323428                'method' => match ( $action ) {
    324                     ResourceAction::CREATE, ResourceAction::DEPENDENCY => 'POST',
     429                    ResourceAction::CREATE => 'POST',
    325430                    ResourceAction::REFRESH => 'GET',
    326431                },
    327432                'flex'   => match ( $action ) {
    328                     ResourceAction::CREATE, ResourceAction::DEPENDENCY => array( 'data' => array( 'checkout_session' => $this ) ),
     433                    ResourceAction::CREATE => array( 'data' => array( 'checkout_session' => $this ) ),
    329434                    ResourceAction::REFRESH => array(),
    330435                },
  • pay-with-flex/trunk/src/Resource/CheckoutSession/LineItem.php

    r3306095 r3308128  
    5353    public function price(): Price {
    5454        return $this->price;
     55    }
     56
     57    /**
     58     * Returns the quantity associated with the line item.
     59     */
     60    public function quantity(): int {
     61        return $this->quantity;
    5562    }
    5663
  • pay-with-flex/trunk/src/Resource/Price.php

    r3296637 r3308128  
    260260
    261261            // Revaluate the action that is needed.
    262             $action = $this->needs();
    263             if ( ResourceAction::DEPENDENCY === $action || false === $this->can( $action ) ) {
    264                 return;
    265             }
     262            $this->exec( $this->needs() );
     263            return;
    266264        }
    267265
  • pay-with-flex/trunk/vendor/composer/autoload_classmap.php

    r3306095 r3308128  
    2323    'Flex\\Resource\\CheckoutSession\\CheckoutSession' => $baseDir . '/src/Resource/CheckoutSession/CheckoutSession.php',
    2424    'Flex\\Resource\\CheckoutSession\\CustomerDefaults' => $baseDir . '/src/Resource/CheckoutSession/CustomerDefaults.php',
     25    'Flex\\Resource\\CheckoutSession\\Discount' => $baseDir . '/src/Resource/CheckoutSession/Discount.php',
    2526    'Flex\\Resource\\CheckoutSession\\LineItem' => $baseDir . '/src/Resource/CheckoutSession/LineItem.php',
    2627    'Flex\\Resource\\CheckoutSession\\Mode' => $baseDir . '/src/Resource/CheckoutSession/Mode.php',
     
    3031    'Flex\\Resource\\CheckoutSession\\Status' => $baseDir . '/src/Resource/CheckoutSession/Status.php',
    3132    'Flex\\Resource\\CheckoutSession\\TaxRate' => $baseDir . '/src/Resource/CheckoutSession/TaxRate.php',
     33    'Flex\\Resource\\Coupon' => $baseDir . '/src/Resource/Coupon.php',
    3234    'Flex\\Resource\\Price' => $baseDir . '/src/Resource/Price.php',
    3335    'Flex\\Resource\\Product' => $baseDir . '/src/Resource/Product.php',
     
    9799    'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/src/LoggerTrait.php',
    98100    'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/src/NullLogger.php',
     101    'Sentry\\Attributes\\Attribute' => $vendorDir . '/sentry/sentry/src/Attributes/Attribute.php',
     102    'Sentry\\Attributes\\AttributeBag' => $vendorDir . '/sentry/sentry/src/Attributes/AttributeBag.php',
    99103    'Sentry\\Breadcrumb' => $vendorDir . '/sentry/sentry/src/Breadcrumb.php',
    100104    'Sentry\\CheckIn' => $vendorDir . '/sentry/sentry/src/CheckIn.php',
     
    138142    'Sentry\\Integration\\TransactionIntegration' => $vendorDir . '/sentry/sentry/src/Integration/TransactionIntegration.php',
    139143    'Sentry\\Logger\\DebugFileLogger' => $vendorDir . '/sentry/sentry/src/Logger/DebugFileLogger.php',
     144    'Sentry\\Logger\\DebugLogger' => $vendorDir . '/sentry/sentry/src/Logger/DebugLogger.php',
    140145    'Sentry\\Logger\\DebugStdOutLogger' => $vendorDir . '/sentry/sentry/src/Logger/DebugStdOutLogger.php',
     146    'Sentry\\Logs\\Log' => $vendorDir . '/sentry/sentry/src/Logs/Log.php',
     147    'Sentry\\Logs\\LogLevel' => $vendorDir . '/sentry/sentry/src/Logs/LogLevel.php',
     148    'Sentry\\Logs\\Logs' => $vendorDir . '/sentry/sentry/src/Logs/Logs.php',
     149    'Sentry\\Logs\\LogsAggregator' => $vendorDir . '/sentry/sentry/src/Logs/LogsAggregator.php',
    141150    'Sentry\\Metrics\\Metrics' => $vendorDir . '/sentry/sentry/src/Metrics/Metrics.php',
    142151    'Sentry\\Metrics\\MetricsUnit' => $vendorDir . '/sentry/sentry/src/Metrics/MetricsUnit.php',
     
    155164    'Sentry\\Serializer\\EnvelopItems\\EnvelopeItemInterface' => $vendorDir . '/sentry/sentry/src/Serializer/EnvelopItems/EnvelopeItemInterface.php',
    156165    'Sentry\\Serializer\\EnvelopItems\\EventItem' => $vendorDir . '/sentry/sentry/src/Serializer/EnvelopItems/EventItem.php',
     166    'Sentry\\Serializer\\EnvelopItems\\LogsItem' => $vendorDir . '/sentry/sentry/src/Serializer/EnvelopItems/LogsItem.php',
    157167    'Sentry\\Serializer\\EnvelopItems\\ProfileItem' => $vendorDir . '/sentry/sentry/src/Serializer/EnvelopItems/ProfileItem.php',
    158168    'Sentry\\Serializer\\EnvelopItems\\TransactionItem' => $vendorDir . '/sentry/sentry/src/Serializer/EnvelopItems/TransactionItem.php',
     
    195205    'Sentry\\Transport\\TransportInterface' => $vendorDir . '/sentry/sentry/src/Transport/TransportInterface.php',
    196206    'Sentry\\UserDataBag' => $vendorDir . '/sentry/sentry/src/UserDataBag.php',
     207    'Sentry\\Util\\Arr' => $vendorDir . '/sentry/sentry/src/Util/Arr.php',
    197208    'Sentry\\Util\\Http' => $vendorDir . '/sentry/sentry/src/Util/Http.php',
    198209    'Sentry\\Util\\JSON' => $vendorDir . '/sentry/sentry/src/Util/JSON.php',
  • pay-with-flex/trunk/vendor/composer/autoload_static.php

    r3306095 r3308128  
    101101        'Flex\\Resource\\CheckoutSession\\CheckoutSession' => __DIR__ . '/../..' . '/src/Resource/CheckoutSession/CheckoutSession.php',
    102102        'Flex\\Resource\\CheckoutSession\\CustomerDefaults' => __DIR__ . '/../..' . '/src/Resource/CheckoutSession/CustomerDefaults.php',
     103        'Flex\\Resource\\CheckoutSession\\Discount' => __DIR__ . '/../..' . '/src/Resource/CheckoutSession/Discount.php',
    103104        'Flex\\Resource\\CheckoutSession\\LineItem' => __DIR__ . '/../..' . '/src/Resource/CheckoutSession/LineItem.php',
    104105        'Flex\\Resource\\CheckoutSession\\Mode' => __DIR__ . '/../..' . '/src/Resource/CheckoutSession/Mode.php',
     
    108109        'Flex\\Resource\\CheckoutSession\\Status' => __DIR__ . '/../..' . '/src/Resource/CheckoutSession/Status.php',
    109110        'Flex\\Resource\\CheckoutSession\\TaxRate' => __DIR__ . '/../..' . '/src/Resource/CheckoutSession/TaxRate.php',
     111        'Flex\\Resource\\Coupon' => __DIR__ . '/../..' . '/src/Resource/Coupon.php',
    110112        'Flex\\Resource\\Price' => __DIR__ . '/../..' . '/src/Resource/Price.php',
    111113        'Flex\\Resource\\Product' => __DIR__ . '/../..' . '/src/Resource/Product.php',
     
    175177        'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/src/LoggerTrait.php',
    176178        'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/src/NullLogger.php',
     179        'Sentry\\Attributes\\Attribute' => __DIR__ . '/..' . '/sentry/sentry/src/Attributes/Attribute.php',
     180        'Sentry\\Attributes\\AttributeBag' => __DIR__ . '/..' . '/sentry/sentry/src/Attributes/AttributeBag.php',
    177181        'Sentry\\Breadcrumb' => __DIR__ . '/..' . '/sentry/sentry/src/Breadcrumb.php',
    178182        'Sentry\\CheckIn' => __DIR__ . '/..' . '/sentry/sentry/src/CheckIn.php',
     
    216220        'Sentry\\Integration\\TransactionIntegration' => __DIR__ . '/..' . '/sentry/sentry/src/Integration/TransactionIntegration.php',
    217221        'Sentry\\Logger\\DebugFileLogger' => __DIR__ . '/..' . '/sentry/sentry/src/Logger/DebugFileLogger.php',
     222        'Sentry\\Logger\\DebugLogger' => __DIR__ . '/..' . '/sentry/sentry/src/Logger/DebugLogger.php',
    218223        'Sentry\\Logger\\DebugStdOutLogger' => __DIR__ . '/..' . '/sentry/sentry/src/Logger/DebugStdOutLogger.php',
     224        'Sentry\\Logs\\Log' => __DIR__ . '/..' . '/sentry/sentry/src/Logs/Log.php',
     225        'Sentry\\Logs\\LogLevel' => __DIR__ . '/..' . '/sentry/sentry/src/Logs/LogLevel.php',
     226        'Sentry\\Logs\\Logs' => __DIR__ . '/..' . '/sentry/sentry/src/Logs/Logs.php',
     227        'Sentry\\Logs\\LogsAggregator' => __DIR__ . '/..' . '/sentry/sentry/src/Logs/LogsAggregator.php',
    219228        'Sentry\\Metrics\\Metrics' => __DIR__ . '/..' . '/sentry/sentry/src/Metrics/Metrics.php',
    220229        'Sentry\\Metrics\\MetricsUnit' => __DIR__ . '/..' . '/sentry/sentry/src/Metrics/MetricsUnit.php',
     
    233242        'Sentry\\Serializer\\EnvelopItems\\EnvelopeItemInterface' => __DIR__ . '/..' . '/sentry/sentry/src/Serializer/EnvelopItems/EnvelopeItemInterface.php',
    234243        'Sentry\\Serializer\\EnvelopItems\\EventItem' => __DIR__ . '/..' . '/sentry/sentry/src/Serializer/EnvelopItems/EventItem.php',
     244        'Sentry\\Serializer\\EnvelopItems\\LogsItem' => __DIR__ . '/..' . '/sentry/sentry/src/Serializer/EnvelopItems/LogsItem.php',
    235245        'Sentry\\Serializer\\EnvelopItems\\ProfileItem' => __DIR__ . '/..' . '/sentry/sentry/src/Serializer/EnvelopItems/ProfileItem.php',
    236246        'Sentry\\Serializer\\EnvelopItems\\TransactionItem' => __DIR__ . '/..' . '/sentry/sentry/src/Serializer/EnvelopItems/TransactionItem.php',
     
    273283        'Sentry\\Transport\\TransportInterface' => __DIR__ . '/..' . '/sentry/sentry/src/Transport/TransportInterface.php',
    274284        'Sentry\\UserDataBag' => __DIR__ . '/..' . '/sentry/sentry/src/UserDataBag.php',
     285        'Sentry\\Util\\Arr' => __DIR__ . '/..' . '/sentry/sentry/src/Util/Arr.php',
    275286        'Sentry\\Util\\Http' => __DIR__ . '/..' . '/sentry/sentry/src/Util/Http.php',
    276287        'Sentry\\Util\\JSON' => __DIR__ . '/..' . '/sentry/sentry/src/Util/JSON.php',
  • pay-with-flex/trunk/vendor/composer/installed.json

    r3306095 r3308128  
    467467        {
    468468            "name": "sentry/sentry",
    469             "version": "4.11.1",
    470             "version_normalized": "4.11.1.0",
     469            "version": "4.12.0",
     470            "version_normalized": "4.12.0.0",
    471471            "source": {
    472472                "type": "git",
    473473                "url": "https://github.com/getsentry/sentry-php.git",
    474                 "reference": "53dc0bcb6a667cac5b760b46f98d5380e63e02ca"
    475             },
    476             "dist": {
    477                 "type": "zip",
    478                 "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/53dc0bcb6a667cac5b760b46f98d5380e63e02ca",
    479                 "reference": "53dc0bcb6a667cac5b760b46f98d5380e63e02ca",
     474                "reference": "0173702ffcbe36ce7638f07f090271294866a7a0"
     475            },
     476            "dist": {
     477                "type": "zip",
     478                "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/0173702ffcbe36ce7638f07f090271294866a7a0",
     479                "reference": "0173702ffcbe36ce7638f07f090271294866a7a0",
    480480                "shasum": ""
    481481            },
     
    507507                "monolog/monolog": "Allow sending log messages to Sentry by using the included Monolog handler."
    508508            },
    509             "time": "2025-05-12T11:30:33+00:00",
     509            "time": "2025-06-07T08:37:56+00:00",
    510510            "type": "library",
    511511            "installation-source": "dist",
     
    543543            "support": {
    544544                "issues": "https://github.com/getsentry/sentry-php/issues",
    545                 "source": "https://github.com/getsentry/sentry-php/tree/4.11.1"
     545                "source": "https://github.com/getsentry/sentry-php/tree/4.12.0"
    546546            },
    547547            "funding": [
  • pay-with-flex/trunk/vendor/composer/installed.php

    r3306095 r3308128  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => 'b52bc3dd944a3f0dc9e1ffb085a3e4f95efe9343',
     6        'reference' => '2beb32d234e288a9a5afa8a86de34e8d978774f9',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => 'b52bc3dd944a3f0dc9e1ffb085a3e4f95efe9343',
     16            'reference' => '2beb32d234e288a9a5afa8a86de34e8d978774f9',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
     
    9696        ),
    9797        'sentry/sentry' => array(
    98             'pretty_version' => '4.11.1',
    99             'version' => '4.11.1.0',
    100             'reference' => '53dc0bcb6a667cac5b760b46f98d5380e63e02ca',
     98            'pretty_version' => '4.12.0',
     99            'version' => '4.12.0.0',
     100            'reference' => '0173702ffcbe36ce7638f07f090271294866a7a0',
    101101            'type' => 'library',
    102102            'install_path' => __DIR__ . '/../sentry/sentry',
  • pay-with-flex/trunk/vendor/composer/jetpack_autoload_classmap.php

    r3306095 r3308128  
    8383        'path'    => $baseDir . '/src/Resource/CheckoutSession/CustomerDefaults.php'
    8484    ),
     85    'Flex\\Resource\\CheckoutSession\\Discount' => array(
     86        'version' => 'dev-main',
     87        'path'    => $baseDir . '/src/Resource/CheckoutSession/Discount.php'
     88    ),
    8589    'Flex\\Resource\\CheckoutSession\\LineItem' => array(
    8690        'version' => 'dev-main',
     
    110114        'version' => 'dev-main',
    111115        'path'    => $baseDir . '/src/Resource/CheckoutSession/TaxRate.php'
     116    ),
     117    'Flex\\Resource\\Coupon' => array(
     118        'version' => 'dev-main',
     119        'path'    => $baseDir . '/src/Resource/Coupon.php'
    112120    ),
    113121    'Flex\\Resource\\Price' => array(
     
    407415        'path'    => $vendorDir . '/psr/log/src/NullLogger.php'
    408416    ),
     417    'Sentry\\Attributes\\Attribute' => array(
     418        'version' => '4.12.0.0',
     419        'path'    => $vendorDir . '/sentry/sentry/src/Attributes/Attribute.php'
     420    ),
     421    'Sentry\\Attributes\\AttributeBag' => array(
     422        'version' => '4.12.0.0',
     423        'path'    => $vendorDir . '/sentry/sentry/src/Attributes/AttributeBag.php'
     424    ),
    409425    'Sentry\\Breadcrumb' => array(
    410         'version' => '4.11.1.0',
     426        'version' => '4.12.0.0',
    411427        'path'    => $vendorDir . '/sentry/sentry/src/Breadcrumb.php'
    412428    ),
    413429    'Sentry\\CheckIn' => array(
    414         'version' => '4.11.1.0',
     430        'version' => '4.12.0.0',
    415431        'path'    => $vendorDir . '/sentry/sentry/src/CheckIn.php'
    416432    ),
    417433    'Sentry\\CheckInStatus' => array(
    418         'version' => '4.11.1.0',
     434        'version' => '4.12.0.0',
    419435        'path'    => $vendorDir . '/sentry/sentry/src/CheckInStatus.php'
    420436    ),
    421437    'Sentry\\Client' => array(
    422         'version' => '4.11.1.0',
     438        'version' => '4.12.0.0',
    423439        'path'    => $vendorDir . '/sentry/sentry/src/Client.php'
    424440    ),
    425441    'Sentry\\ClientBuilder' => array(
    426         'version' => '4.11.1.0',
     442        'version' => '4.12.0.0',
    427443        'path'    => $vendorDir . '/sentry/sentry/src/ClientBuilder.php'
    428444    ),
    429445    'Sentry\\ClientInterface' => array(
    430         'version' => '4.11.1.0',
     446        'version' => '4.12.0.0',
    431447        'path'    => $vendorDir . '/sentry/sentry/src/ClientInterface.php'
    432448    ),
    433449    'Sentry\\Context\\OsContext' => array(
    434         'version' => '4.11.1.0',
     450        'version' => '4.12.0.0',
    435451        'path'    => $vendorDir . '/sentry/sentry/src/Context/OsContext.php'
    436452    ),
    437453    'Sentry\\Context\\RuntimeContext' => array(
    438         'version' => '4.11.1.0',
     454        'version' => '4.12.0.0',
    439455        'path'    => $vendorDir . '/sentry/sentry/src/Context/RuntimeContext.php'
    440456    ),
    441457    'Sentry\\Dsn' => array(
    442         'version' => '4.11.1.0',
     458        'version' => '4.12.0.0',
    443459        'path'    => $vendorDir . '/sentry/sentry/src/Dsn.php'
    444460    ),
    445461    'Sentry\\ErrorHandler' => array(
    446         'version' => '4.11.1.0',
     462        'version' => '4.12.0.0',
    447463        'path'    => $vendorDir . '/sentry/sentry/src/ErrorHandler.php'
    448464    ),
    449465    'Sentry\\Event' => array(
    450         'version' => '4.11.1.0',
     466        'version' => '4.12.0.0',
    451467        'path'    => $vendorDir . '/sentry/sentry/src/Event.php'
    452468    ),
    453469    'Sentry\\EventHint' => array(
    454         'version' => '4.11.1.0',
     470        'version' => '4.12.0.0',
    455471        'path'    => $vendorDir . '/sentry/sentry/src/EventHint.php'
    456472    ),
    457473    'Sentry\\EventId' => array(
    458         'version' => '4.11.1.0',
     474        'version' => '4.12.0.0',
    459475        'path'    => $vendorDir . '/sentry/sentry/src/EventId.php'
    460476    ),
    461477    'Sentry\\EventType' => array(
    462         'version' => '4.11.1.0',
     478        'version' => '4.12.0.0',
    463479        'path'    => $vendorDir . '/sentry/sentry/src/EventType.php'
    464480    ),
    465481    'Sentry\\ExceptionDataBag' => array(
    466         'version' => '4.11.1.0',
     482        'version' => '4.12.0.0',
    467483        'path'    => $vendorDir . '/sentry/sentry/src/ExceptionDataBag.php'
    468484    ),
    469485    'Sentry\\ExceptionMechanism' => array(
    470         'version' => '4.11.1.0',
     486        'version' => '4.12.0.0',
    471487        'path'    => $vendorDir . '/sentry/sentry/src/ExceptionMechanism.php'
    472488    ),
    473489    'Sentry\\Exception\\EventCreationException' => array(
    474         'version' => '4.11.1.0',
     490        'version' => '4.12.0.0',
    475491        'path'    => $vendorDir . '/sentry/sentry/src/Exception/EventCreationException.php'
    476492    ),
    477493    'Sentry\\Exception\\FatalErrorException' => array(
    478         'version' => '4.11.1.0',
     494        'version' => '4.12.0.0',
    479495        'path'    => $vendorDir . '/sentry/sentry/src/Exception/FatalErrorException.php'
    480496    ),
    481497    'Sentry\\Exception\\JsonException' => array(
    482         'version' => '4.11.1.0',
     498        'version' => '4.12.0.0',
    483499        'path'    => $vendorDir . '/sentry/sentry/src/Exception/JsonException.php'
    484500    ),
    485501    'Sentry\\Exception\\SilencedErrorException' => array(
    486         'version' => '4.11.1.0',
     502        'version' => '4.12.0.0',
    487503        'path'    => $vendorDir . '/sentry/sentry/src/Exception/SilencedErrorException.php'
    488504    ),
    489505    'Sentry\\Frame' => array(
    490         'version' => '4.11.1.0',
     506        'version' => '4.12.0.0',
    491507        'path'    => $vendorDir . '/sentry/sentry/src/Frame.php'
    492508    ),
    493509    'Sentry\\FrameBuilder' => array(
    494         'version' => '4.11.1.0',
     510        'version' => '4.12.0.0',
    495511        'path'    => $vendorDir . '/sentry/sentry/src/FrameBuilder.php'
    496512    ),
    497513    'Sentry\\HttpClient\\HttpClient' => array(
    498         'version' => '4.11.1.0',
     514        'version' => '4.12.0.0',
    499515        'path'    => $vendorDir . '/sentry/sentry/src/HttpClient/HttpClient.php'
    500516    ),
    501517    'Sentry\\HttpClient\\HttpClientInterface' => array(
    502         'version' => '4.11.1.0',
     518        'version' => '4.12.0.0',
    503519        'path'    => $vendorDir . '/sentry/sentry/src/HttpClient/HttpClientInterface.php'
    504520    ),
    505521    'Sentry\\HttpClient\\Request' => array(
    506         'version' => '4.11.1.0',
     522        'version' => '4.12.0.0',
    507523        'path'    => $vendorDir . '/sentry/sentry/src/HttpClient/Request.php'
    508524    ),
    509525    'Sentry\\HttpClient\\Response' => array(
    510         'version' => '4.11.1.0',
     526        'version' => '4.12.0.0',
    511527        'path'    => $vendorDir . '/sentry/sentry/src/HttpClient/Response.php'
    512528    ),
    513529    'Sentry\\Integration\\AbstractErrorListenerIntegration' => array(
    514         'version' => '4.11.1.0',
     530        'version' => '4.12.0.0',
    515531        'path'    => $vendorDir . '/sentry/sentry/src/Integration/AbstractErrorListenerIntegration.php'
    516532    ),
    517533    'Sentry\\Integration\\EnvironmentIntegration' => array(
    518         'version' => '4.11.1.0',
     534        'version' => '4.12.0.0',
    519535        'path'    => $vendorDir . '/sentry/sentry/src/Integration/EnvironmentIntegration.php'
    520536    ),
    521537    'Sentry\\Integration\\ErrorListenerIntegration' => array(
    522         'version' => '4.11.1.0',
     538        'version' => '4.12.0.0',
    523539        'path'    => $vendorDir . '/sentry/sentry/src/Integration/ErrorListenerIntegration.php'
    524540    ),
    525541    'Sentry\\Integration\\ExceptionListenerIntegration' => array(
    526         'version' => '4.11.1.0',
     542        'version' => '4.12.0.0',
    527543        'path'    => $vendorDir . '/sentry/sentry/src/Integration/ExceptionListenerIntegration.php'
    528544    ),
    529545    'Sentry\\Integration\\FatalErrorListenerIntegration' => array(
    530         'version' => '4.11.1.0',
     546        'version' => '4.12.0.0',
    531547        'path'    => $vendorDir . '/sentry/sentry/src/Integration/FatalErrorListenerIntegration.php'
    532548    ),
    533549    'Sentry\\Integration\\FrameContextifierIntegration' => array(
    534         'version' => '4.11.1.0',
     550        'version' => '4.12.0.0',
    535551        'path'    => $vendorDir . '/sentry/sentry/src/Integration/FrameContextifierIntegration.php'
    536552    ),
    537553    'Sentry\\Integration\\IntegrationInterface' => array(
    538         'version' => '4.11.1.0',
     554        'version' => '4.12.0.0',
    539555        'path'    => $vendorDir . '/sentry/sentry/src/Integration/IntegrationInterface.php'
    540556    ),
    541557    'Sentry\\Integration\\IntegrationRegistry' => array(
    542         'version' => '4.11.1.0',
     558        'version' => '4.12.0.0',
    543559        'path'    => $vendorDir . '/sentry/sentry/src/Integration/IntegrationRegistry.php'
    544560    ),
    545561    'Sentry\\Integration\\ModulesIntegration' => array(
    546         'version' => '4.11.1.0',
     562        'version' => '4.12.0.0',
    547563        'path'    => $vendorDir . '/sentry/sentry/src/Integration/ModulesIntegration.php'
    548564    ),
    549565    'Sentry\\Integration\\OptionAwareIntegrationInterface' => array(
    550         'version' => '4.11.1.0',
     566        'version' => '4.12.0.0',
    551567        'path'    => $vendorDir . '/sentry/sentry/src/Integration/OptionAwareIntegrationInterface.php'
    552568    ),
    553569    'Sentry\\Integration\\RequestFetcher' => array(
    554         'version' => '4.11.1.0',
     570        'version' => '4.12.0.0',
    555571        'path'    => $vendorDir . '/sentry/sentry/src/Integration/RequestFetcher.php'
    556572    ),
    557573    'Sentry\\Integration\\RequestFetcherInterface' => array(
    558         'version' => '4.11.1.0',
     574        'version' => '4.12.0.0',
    559575        'path'    => $vendorDir . '/sentry/sentry/src/Integration/RequestFetcherInterface.php'
    560576    ),
    561577    'Sentry\\Integration\\RequestIntegration' => array(
    562         'version' => '4.11.1.0',
     578        'version' => '4.12.0.0',
    563579        'path'    => $vendorDir . '/sentry/sentry/src/Integration/RequestIntegration.php'
    564580    ),
    565581    'Sentry\\Integration\\TransactionIntegration' => array(
    566         'version' => '4.11.1.0',
     582        'version' => '4.12.0.0',
    567583        'path'    => $vendorDir . '/sentry/sentry/src/Integration/TransactionIntegration.php'
    568584    ),
    569585    'Sentry\\Logger\\DebugFileLogger' => array(
    570         'version' => '4.11.1.0',
     586        'version' => '4.12.0.0',
    571587        'path'    => $vendorDir . '/sentry/sentry/src/Logger/DebugFileLogger.php'
    572588    ),
     589    'Sentry\\Logger\\DebugLogger' => array(
     590        'version' => '4.12.0.0',
     591        'path'    => $vendorDir . '/sentry/sentry/src/Logger/DebugLogger.php'
     592    ),
    573593    'Sentry\\Logger\\DebugStdOutLogger' => array(
    574         'version' => '4.11.1.0',
     594        'version' => '4.12.0.0',
    575595        'path'    => $vendorDir . '/sentry/sentry/src/Logger/DebugStdOutLogger.php'
    576596    ),
     597    'Sentry\\Logs\\Log' => array(
     598        'version' => '4.12.0.0',
     599        'path'    => $vendorDir . '/sentry/sentry/src/Logs/Log.php'
     600    ),
     601    'Sentry\\Logs\\LogLevel' => array(
     602        'version' => '4.12.0.0',
     603        'path'    => $vendorDir . '/sentry/sentry/src/Logs/LogLevel.php'
     604    ),
     605    'Sentry\\Logs\\Logs' => array(
     606        'version' => '4.12.0.0',
     607        'path'    => $vendorDir . '/sentry/sentry/src/Logs/Logs.php'
     608    ),
     609    'Sentry\\Logs\\LogsAggregator' => array(
     610        'version' => '4.12.0.0',
     611        'path'    => $vendorDir . '/sentry/sentry/src/Logs/LogsAggregator.php'
     612    ),
    577613    'Sentry\\Metrics\\Metrics' => array(
    578         'version' => '4.11.1.0',
     614        'version' => '4.12.0.0',
    579615        'path'    => $vendorDir . '/sentry/sentry/src/Metrics/Metrics.php'
    580616    ),
    581617    'Sentry\\Metrics\\MetricsUnit' => array(
    582         'version' => '4.11.1.0',
     618        'version' => '4.12.0.0',
    583619        'path'    => $vendorDir . '/sentry/sentry/src/Metrics/MetricsUnit.php'
    584620    ),
    585621    'Sentry\\MonitorConfig' => array(
    586         'version' => '4.11.1.0',
     622        'version' => '4.12.0.0',
    587623        'path'    => $vendorDir . '/sentry/sentry/src/MonitorConfig.php'
    588624    ),
    589625    'Sentry\\MonitorSchedule' => array(
    590         'version' => '4.11.1.0',
     626        'version' => '4.12.0.0',
    591627        'path'    => $vendorDir . '/sentry/sentry/src/MonitorSchedule.php'
    592628    ),
    593629    'Sentry\\MonitorScheduleUnit' => array(
    594         'version' => '4.11.1.0',
     630        'version' => '4.12.0.0',
    595631        'path'    => $vendorDir . '/sentry/sentry/src/MonitorScheduleUnit.php'
    596632    ),
    597633    'Sentry\\Monolog\\BreadcrumbHandler' => array(
    598         'version' => '4.11.1.0',
     634        'version' => '4.12.0.0',
    599635        'path'    => $vendorDir . '/sentry/sentry/src/Monolog/BreadcrumbHandler.php'
    600636    ),
    601637    'Sentry\\Monolog\\CompatibilityProcessingHandlerTrait' => array(
    602         'version' => '4.11.1.0',
     638        'version' => '4.12.0.0',
    603639        'path'    => $vendorDir . '/sentry/sentry/src/Monolog/CompatibilityProcessingHandlerTrait.php'
    604640    ),
    605641    'Sentry\\Monolog\\Handler' => array(
    606         'version' => '4.11.1.0',
     642        'version' => '4.12.0.0',
    607643        'path'    => $vendorDir . '/sentry/sentry/src/Monolog/Handler.php'
    608644    ),
    609645    'Sentry\\Options' => array(
    610         'version' => '4.11.1.0',
     646        'version' => '4.12.0.0',
    611647        'path'    => $vendorDir . '/sentry/sentry/src/Options.php'
    612648    ),
    613649    'Sentry\\Profiling\\Profile' => array(
    614         'version' => '4.11.1.0',
     650        'version' => '4.12.0.0',
    615651        'path'    => $vendorDir . '/sentry/sentry/src/Profiling/Profile.php'
    616652    ),
    617653    'Sentry\\Profiling\\Profiler' => array(
    618         'version' => '4.11.1.0',
     654        'version' => '4.12.0.0',
    619655        'path'    => $vendorDir . '/sentry/sentry/src/Profiling/Profiler.php'
    620656    ),
    621657    'Sentry\\SentrySdk' => array(
    622         'version' => '4.11.1.0',
     658        'version' => '4.12.0.0',
    623659        'path'    => $vendorDir . '/sentry/sentry/src/SentrySdk.php'
    624660    ),
    625661    'Sentry\\Serializer\\AbstractSerializer' => array(
    626         'version' => '4.11.1.0',
     662        'version' => '4.12.0.0',
    627663        'path'    => $vendorDir . '/sentry/sentry/src/Serializer/AbstractSerializer.php'
    628664    ),
    629665    'Sentry\\Serializer\\EnvelopItems\\CheckInItem' => array(
    630         'version' => '4.11.1.0',
     666        'version' => '4.12.0.0',
    631667        'path'    => $vendorDir . '/sentry/sentry/src/Serializer/EnvelopItems/CheckInItem.php'
    632668    ),
    633669    'Sentry\\Serializer\\EnvelopItems\\EnvelopeItemInterface' => array(
    634         'version' => '4.11.1.0',
     670        'version' => '4.12.0.0',
    635671        'path'    => $vendorDir . '/sentry/sentry/src/Serializer/EnvelopItems/EnvelopeItemInterface.php'
    636672    ),
    637673    'Sentry\\Serializer\\EnvelopItems\\EventItem' => array(
    638         'version' => '4.11.1.0',
     674        'version' => '4.12.0.0',
    639675        'path'    => $vendorDir . '/sentry/sentry/src/Serializer/EnvelopItems/EventItem.php'
    640676    ),
     677    'Sentry\\Serializer\\EnvelopItems\\LogsItem' => array(
     678        'version' => '4.12.0.0',
     679        'path'    => $vendorDir . '/sentry/sentry/src/Serializer/EnvelopItems/LogsItem.php'
     680    ),
    641681    'Sentry\\Serializer\\EnvelopItems\\ProfileItem' => array(
    642         'version' => '4.11.1.0',
     682        'version' => '4.12.0.0',
    643683        'path'    => $vendorDir . '/sentry/sentry/src/Serializer/EnvelopItems/ProfileItem.php'
    644684    ),
    645685    'Sentry\\Serializer\\EnvelopItems\\TransactionItem' => array(
    646         'version' => '4.11.1.0',
     686        'version' => '4.12.0.0',
    647687        'path'    => $vendorDir . '/sentry/sentry/src/Serializer/EnvelopItems/TransactionItem.php'
    648688    ),
    649689    'Sentry\\Serializer\\PayloadSerializer' => array(
    650         'version' => '4.11.1.0',
     690        'version' => '4.12.0.0',
    651691        'path'    => $vendorDir . '/sentry/sentry/src/Serializer/PayloadSerializer.php'
    652692    ),
    653693    'Sentry\\Serializer\\PayloadSerializerInterface' => array(
    654         'version' => '4.11.1.0',
     694        'version' => '4.12.0.0',
    655695        'path'    => $vendorDir . '/sentry/sentry/src/Serializer/PayloadSerializerInterface.php'
    656696    ),
    657697    'Sentry\\Serializer\\RepresentationSerializer' => array(
    658         'version' => '4.11.1.0',
     698        'version' => '4.12.0.0',
    659699        'path'    => $vendorDir . '/sentry/sentry/src/Serializer/RepresentationSerializer.php'
    660700    ),
    661701    'Sentry\\Serializer\\RepresentationSerializerInterface' => array(
    662         'version' => '4.11.1.0',
     702        'version' => '4.12.0.0',
    663703        'path'    => $vendorDir . '/sentry/sentry/src/Serializer/RepresentationSerializerInterface.php'
    664704    ),
    665705    'Sentry\\Serializer\\SerializableInterface' => array(
    666         'version' => '4.11.1.0',
     706        'version' => '4.12.0.0',
    667707        'path'    => $vendorDir . '/sentry/sentry/src/Serializer/SerializableInterface.php'
    668708    ),
    669709    'Sentry\\Serializer\\Serializer' => array(
    670         'version' => '4.11.1.0',
     710        'version' => '4.12.0.0',
    671711        'path'    => $vendorDir . '/sentry/sentry/src/Serializer/Serializer.php'
    672712    ),
    673713    'Sentry\\Serializer\\SerializerInterface' => array(
    674         'version' => '4.11.1.0',
     714        'version' => '4.12.0.0',
    675715        'path'    => $vendorDir . '/sentry/sentry/src/Serializer/SerializerInterface.php'
    676716    ),
    677717    'Sentry\\Serializer\\Traits\\BreadcrumbSeralizerTrait' => array(
    678         'version' => '4.11.1.0',
     718        'version' => '4.12.0.0',
    679719        'path'    => $vendorDir . '/sentry/sentry/src/Serializer/Traits/BreadcrumbSeralizerTrait.php'
    680720    ),
    681721    'Sentry\\Serializer\\Traits\\StacktraceFrameSeralizerTrait' => array(
    682         'version' => '4.11.1.0',
     722        'version' => '4.12.0.0',
    683723        'path'    => $vendorDir . '/sentry/sentry/src/Serializer/Traits/StacktraceFrameSeralizerTrait.php'
    684724    ),
    685725    'Sentry\\Severity' => array(
    686         'version' => '4.11.1.0',
     726        'version' => '4.12.0.0',
    687727        'path'    => $vendorDir . '/sentry/sentry/src/Severity.php'
    688728    ),
    689729    'Sentry\\Spotlight\\SpotlightClient' => array(
    690         'version' => '4.11.1.0',
     730        'version' => '4.12.0.0',
    691731        'path'    => $vendorDir . '/sentry/sentry/src/Spotlight/SpotlightClient.php'
    692732    ),
    693733    'Sentry\\Stacktrace' => array(
    694         'version' => '4.11.1.0',
     734        'version' => '4.12.0.0',
    695735        'path'    => $vendorDir . '/sentry/sentry/src/Stacktrace.php'
    696736    ),
    697737    'Sentry\\StacktraceBuilder' => array(
    698         'version' => '4.11.1.0',
     738        'version' => '4.12.0.0',
    699739        'path'    => $vendorDir . '/sentry/sentry/src/StacktraceBuilder.php'
    700740    ),
    701741    'Sentry\\State\\Hub' => array(
    702         'version' => '4.11.1.0',
     742        'version' => '4.12.0.0',
    703743        'path'    => $vendorDir . '/sentry/sentry/src/State/Hub.php'
    704744    ),
    705745    'Sentry\\State\\HubAdapter' => array(
    706         'version' => '4.11.1.0',
     746        'version' => '4.12.0.0',
    707747        'path'    => $vendorDir . '/sentry/sentry/src/State/HubAdapter.php'
    708748    ),
    709749    'Sentry\\State\\HubInterface' => array(
    710         'version' => '4.11.1.0',
     750        'version' => '4.12.0.0',
    711751        'path'    => $vendorDir . '/sentry/sentry/src/State/HubInterface.php'
    712752    ),
    713753    'Sentry\\State\\Layer' => array(
    714         'version' => '4.11.1.0',
     754        'version' => '4.12.0.0',
    715755        'path'    => $vendorDir . '/sentry/sentry/src/State/Layer.php'
    716756    ),
    717757    'Sentry\\State\\Scope' => array(
    718         'version' => '4.11.1.0',
     758        'version' => '4.12.0.0',
    719759        'path'    => $vendorDir . '/sentry/sentry/src/State/Scope.php'
    720760    ),
    721761    'Sentry\\Tracing\\DynamicSamplingContext' => array(
    722         'version' => '4.11.1.0',
     762        'version' => '4.12.0.0',
    723763        'path'    => $vendorDir . '/sentry/sentry/src/Tracing/DynamicSamplingContext.php'
    724764    ),
    725765    'Sentry\\Tracing\\GuzzleTracingMiddleware' => array(
    726         'version' => '4.11.1.0',
     766        'version' => '4.12.0.0',
    727767        'path'    => $vendorDir . '/sentry/sentry/src/Tracing/GuzzleTracingMiddleware.php'
    728768    ),
    729769    'Sentry\\Tracing\\PropagationContext' => array(
    730         'version' => '4.11.1.0',
     770        'version' => '4.12.0.0',
    731771        'path'    => $vendorDir . '/sentry/sentry/src/Tracing/PropagationContext.php'
    732772    ),
    733773    'Sentry\\Tracing\\SamplingContext' => array(
    734         'version' => '4.11.1.0',
     774        'version' => '4.12.0.0',
    735775        'path'    => $vendorDir . '/sentry/sentry/src/Tracing/SamplingContext.php'
    736776    ),
    737777    'Sentry\\Tracing\\Span' => array(
    738         'version' => '4.11.1.0',
     778        'version' => '4.12.0.0',
    739779        'path'    => $vendorDir . '/sentry/sentry/src/Tracing/Span.php'
    740780    ),
    741781    'Sentry\\Tracing\\SpanContext' => array(
    742         'version' => '4.11.1.0',
     782        'version' => '4.12.0.0',
    743783        'path'    => $vendorDir . '/sentry/sentry/src/Tracing/SpanContext.php'
    744784    ),
    745785    'Sentry\\Tracing\\SpanId' => array(
    746         'version' => '4.11.1.0',
     786        'version' => '4.12.0.0',
    747787        'path'    => $vendorDir . '/sentry/sentry/src/Tracing/SpanId.php'
    748788    ),
    749789    'Sentry\\Tracing\\SpanRecorder' => array(
    750         'version' => '4.11.1.0',
     790        'version' => '4.12.0.0',
    751791        'path'    => $vendorDir . '/sentry/sentry/src/Tracing/SpanRecorder.php'
    752792    ),
    753793    'Sentry\\Tracing\\SpanStatus' => array(
    754         'version' => '4.11.1.0',
     794        'version' => '4.12.0.0',
    755795        'path'    => $vendorDir . '/sentry/sentry/src/Tracing/SpanStatus.php'
    756796    ),
    757797    'Sentry\\Tracing\\TraceId' => array(
    758         'version' => '4.11.1.0',
     798        'version' => '4.12.0.0',
    759799        'path'    => $vendorDir . '/sentry/sentry/src/Tracing/TraceId.php'
    760800    ),
    761801    'Sentry\\Tracing\\Transaction' => array(
    762         'version' => '4.11.1.0',
     802        'version' => '4.12.0.0',
    763803        'path'    => $vendorDir . '/sentry/sentry/src/Tracing/Transaction.php'
    764804    ),
    765805    'Sentry\\Tracing\\TransactionContext' => array(
    766         'version' => '4.11.1.0',
     806        'version' => '4.12.0.0',
    767807        'path'    => $vendorDir . '/sentry/sentry/src/Tracing/TransactionContext.php'
    768808    ),
    769809    'Sentry\\Tracing\\TransactionMetadata' => array(
    770         'version' => '4.11.1.0',
     810        'version' => '4.12.0.0',
    771811        'path'    => $vendorDir . '/sentry/sentry/src/Tracing/TransactionMetadata.php'
    772812    ),
    773813    'Sentry\\Tracing\\TransactionSource' => array(
    774         'version' => '4.11.1.0',
     814        'version' => '4.12.0.0',
    775815        'path'    => $vendorDir . '/sentry/sentry/src/Tracing/TransactionSource.php'
    776816    ),
    777817    'Sentry\\Transport\\HttpTransport' => array(
    778         'version' => '4.11.1.0',
     818        'version' => '4.12.0.0',
    779819        'path'    => $vendorDir . '/sentry/sentry/src/Transport/HttpTransport.php'
    780820    ),
    781821    'Sentry\\Transport\\RateLimiter' => array(
    782         'version' => '4.11.1.0',
     822        'version' => '4.12.0.0',
    783823        'path'    => $vendorDir . '/sentry/sentry/src/Transport/RateLimiter.php'
    784824    ),
    785825    'Sentry\\Transport\\Result' => array(
    786         'version' => '4.11.1.0',
     826        'version' => '4.12.0.0',
    787827        'path'    => $vendorDir . '/sentry/sentry/src/Transport/Result.php'
    788828    ),
    789829    'Sentry\\Transport\\ResultStatus' => array(
    790         'version' => '4.11.1.0',
     830        'version' => '4.12.0.0',
    791831        'path'    => $vendorDir . '/sentry/sentry/src/Transport/ResultStatus.php'
    792832    ),
    793833    'Sentry\\Transport\\TransportInterface' => array(
    794         'version' => '4.11.1.0',
     834        'version' => '4.12.0.0',
    795835        'path'    => $vendorDir . '/sentry/sentry/src/Transport/TransportInterface.php'
    796836    ),
    797837    'Sentry\\UserDataBag' => array(
    798         'version' => '4.11.1.0',
     838        'version' => '4.12.0.0',
    799839        'path'    => $vendorDir . '/sentry/sentry/src/UserDataBag.php'
    800840    ),
     841    'Sentry\\Util\\Arr' => array(
     842        'version' => '4.12.0.0',
     843        'path'    => $vendorDir . '/sentry/sentry/src/Util/Arr.php'
     844    ),
    801845    'Sentry\\Util\\Http' => array(
    802         'version' => '4.11.1.0',
     846        'version' => '4.12.0.0',
    803847        'path'    => $vendorDir . '/sentry/sentry/src/Util/Http.php'
    804848    ),
    805849    'Sentry\\Util\\JSON' => array(
    806         'version' => '4.11.1.0',
     850        'version' => '4.12.0.0',
    807851        'path'    => $vendorDir . '/sentry/sentry/src/Util/JSON.php'
    808852    ),
    809853    'Sentry\\Util\\PHPConfiguration' => array(
    810         'version' => '4.11.1.0',
     854        'version' => '4.12.0.0',
    811855        'path'    => $vendorDir . '/sentry/sentry/src/Util/PHPConfiguration.php'
    812856    ),
    813857    'Sentry\\Util\\PHPVersion' => array(
    814         'version' => '4.11.1.0',
     858        'version' => '4.12.0.0',
    815859        'path'    => $vendorDir . '/sentry/sentry/src/Util/PHPVersion.php'
    816860    ),
    817861    'Sentry\\Util\\PrefixStripper' => array(
    818         'version' => '4.11.1.0',
     862        'version' => '4.12.0.0',
    819863        'path'    => $vendorDir . '/sentry/sentry/src/Util/PrefixStripper.php'
    820864    ),
    821865    'Sentry\\Util\\SentryUid' => array(
    822         'version' => '4.11.1.0',
     866        'version' => '4.12.0.0',
    823867        'path'    => $vendorDir . '/sentry/sentry/src/Util/SentryUid.php'
    824868    ),
  • pay-with-flex/trunk/vendor/composer/jetpack_autoload_filemap.php

    r3301881 r3308128  
    1616    ),
    1717    'fb4ca2d97fe7ba6af750497425204e70' => array(
    18         'version' => '4.11.1.0',
     18        'version' => '4.12.0.0',
    1919        'path'    => $vendorDir . '/sentry/sentry/src/functions.php'
    2020    ),
  • pay-with-flex/trunk/vendor/sentry/sentry/CHANGELOG.md

    r3299085 r3308128  
    11# CHANGELOG
     2
     3## 4.12.0
     4
     5The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.12.0.
     6
     7### Features
     8
     9- Add support for Sentry Structured Logs [(#1813)](https://github.com/getsentry/sentry-php/pull/1813)
     10
     11  You can now send logs directly to Sentry using the new logging API:
     12
     13  ```php
     14  Sentry\init([
     15      // Enable logs to be sent to Sentry
     16      'enable_logs' => true,
     17  ]);
     18  ```
     19
     20  ```php
     21  use function Sentry\logger;
     22
     23  // Log messages at different levels
     24  logger()->info('User logged in', ['user_id' => 123]);
     25  logger()->warn('Deprecated function used', ['function' => 'old_function']);
     26  logger()->error('Database connection failed', ['host' => 'db.example.com']);
     27  logger()->fatal('Critical system failure: %s', ['Out of memory'], ['component' => 'database']);
     28
     29  // Flush logs to Sentry
     30  logger()->flush();
     31
     32  // We recommend registering the flushing in a shutdown function
     33  register_shutdown_function(static fn () => logger()->flush());
     34  ```
     35
     36  To learn more, head over to our [docs](https://docs.sentry.io/platforms/php/logs/).
     37
     38### Bug Fixes
     39
     40- Log correct source of sampling decision [(#1836)](https://github.com/getsentry/sentry-php/pull/1836)
    241
    342## 4.11.1
  • pay-with-flex/trunk/vendor/sentry/sentry/UPGRADE-4.0.md

    r3299085 r3308128  
    5959- Removed `Dsn::getSecretKey()`.
    6060- Removed `Dsn::setSecretKey()`.
     61- Removed `Dsn::getStoreApiEndpointUrl()`.
    6162- Removed `EventType::default()`.
    6263- Removed adding the value of the `logger` option as a tag on the event. If you rely on this behaviour, add the tag manually.
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Client.php

    r3299085 r3308128  
    3333     * The version of the SDK.
    3434     */
    35     public const SDK_VERSION = '4.11.1';
     35    public const SDK_VERSION = '4.12.0';
    3636
    3737    /**
     
    256256    }
    257257
     258    public function getSdkIdentifier(): string
     259    {
     260        return $this->sdkIdentifier;
     261    }
     262
     263    public function getSdkVersion(): string
     264    {
     265        return $this->sdkVersion;
     266    }
     267
    258268    /**
    259269     * Assembles an event and prepares it to be sent of to Sentry.
     
    281291        $event->setSdkIdentifier($this->sdkIdentifier);
    282292        $event->setSdkVersion($this->sdkVersion);
     293
    283294        $event->setTags(array_merge($this->options->getTags(), $event->getTags()));
    284295
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Dsn.php

    r3299085 r3308128  
    1414{
    1515    /**
     16     * @var string Regex to match the organization ID in the host.
     17     *             This only applies to Sentry SaaS DSNs that contain the organization ID.
     18     */
     19    private const SENTRY_ORG_ID_REGEX = '/^o(\d+)\./';
     20
     21    /**
    1622     * @var string The protocol to be used to access the resource
    1723     */
     
    4248     */
    4349    private $path;
     50
     51    /**
     52     * @var int|null
     53     */
     54    private $orgId;
    4455
    4556    /**
     
    5263     * @param string $path      The specific resource that the web client wants to access
    5364     * @param string $publicKey The public key to authenticate the SDK
    54      */
    55     private function __construct(string $scheme, string $host, int $port, string $projectId, string $path, string $publicKey)
     65     * @param ?int   $orgId     The org ID
     66     */
     67    private function __construct(string $scheme, string $host, int $port, string $projectId, string $path, string $publicKey, ?int $orgId = null)
    5668    {
    5769        $this->scheme = $scheme;
    5870        $this->host = $host;
    5971        $this->port = $port;
     72        $this->projectId = $projectId;
     73        $this->path = $path;
    6074        $this->publicKey = $publicKey;
    61         $this->path = $path;
    62         $this->projectId = $projectId;
     75        $this->orgId = $orgId;
    6376    }
    6477
     
    93106        if ($lastSlashPosition !== false) {
    94107            $path = substr($parsedDsn['path'], 0, $lastSlashPosition);
     108        }
     109
     110        $orgId = null;
     111        if (preg_match(self::SENTRY_ORG_ID_REGEX, $parsedDsn['host'], $matches) == 1) {
     112            $orgId = (int) $matches[1];
    95113        }
    96114
     
    101119            $projectId,
    102120            $path,
    103             $parsedDsn['user']
     121            $parsedDsn['user'],
     122            $orgId
    104123        );
    105124    }
     
    151170    {
    152171        return $this->publicKey;
     172    }
     173
     174    public function getOrgId(): ?int
     175    {
     176        return $this->orgId;
    153177    }
    154178
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Event.php

    r3299085 r3308128  
    77use Sentry\Context\OsContext;
    88use Sentry\Context\RuntimeContext;
     9use Sentry\Logs\Log;
    910use Sentry\Profiling\Profile;
    1011use Sentry\Tracing\Span;
     
    6768
    6869    /**
     70     * @var Log[]
     71     */
     72    private $logs = [];
     73
     74    /**
    6975     * @var string|null The name of the server (e.g. the host name)
    7076     */
     
    231237    }
    232238
     239    public static function createLogs(?EventId $eventId = null): self
     240    {
     241        return new self($eventId, EventType::logs());
     242    }
     243
    233244    /**
    234245     * @deprecated Metrics are no longer supported. Metrics API is a no-op and will be removed in 5.x.
     
    418429
    419430    /**
     431     * @return Log[]
     432     */
     433    public function getLogs(): array
     434    {
     435        return $this->logs;
     436    }
     437
     438    /**
     439     * @param Log[] $logs
     440     */
     441    public function setLogs(array $logs): self
     442    {
     443        $this->logs = $logs;
     444
     445        return $this;
     446    }
     447
     448    /**
    420449     * @deprecated Metrics are no longer supported. Metrics API is a no-op and will be removed in 5.x.
    421450     */
  • pay-with-flex/trunk/vendor/sentry/sentry/src/EventType.php

    r3299085 r3308128  
    4343    }
    4444
     45    public static function logs(): self
     46    {
     47        return self::getInstance('log');
     48    }
     49
    4550    /**
    4651     * @deprecated Metrics are no longer supported. Metrics API is a no-op and will be removed in 5.x.
     
    6267            self::transaction(),
    6368            self::checkIn(),
     69            self::logs(),
    6470            self::metrics(),
    6571        ];
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Logger/DebugFileLogger.php

    r3299085 r3308128  
    55namespace Sentry\Logger;
    66
    7 use Psr\Log\AbstractLogger;
    8 
    9 class DebugFileLogger extends AbstractLogger
     7class DebugFileLogger extends DebugLogger
    108{
    119    /**
     
    1917    }
    2018
    21     /**
    22      * @param mixed              $level
    23      * @param string|\Stringable $message
    24      * @param mixed[]            $context
    25      */
    26     public function log($level, $message, array $context = []): void
     19    public function write(string $message): void
    2720    {
    28         file_put_contents($this->filePath, \sprintf("sentry/sentry: [%s] %s\n", $level, (string) $message), \FILE_APPEND);
     21        file_put_contents($this->filePath, $message, \FILE_APPEND);
    2922    }
    3023}
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Logger/DebugStdOutLogger.php

    r3299085 r3308128  
    55namespace Sentry\Logger;
    66
    7 use Psr\Log\AbstractLogger;
    8 
    9 class DebugStdOutLogger extends AbstractLogger
     7class DebugStdOutLogger extends DebugLogger
    108{
    11     /**
    12      * @param mixed              $level
    13      * @param string|\Stringable $message
    14      * @param mixed[]            $context
    15      */
    16     public function log($level, $message, array $context = []): void
     9    public function write(string $message): void
    1710    {
    18         file_put_contents('php://stdout', \sprintf("sentry/sentry: [%s] %s\n", $level, (string) $message));
     11        file_put_contents('php://stdout', $message);
    1912    }
    2013}
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Options.php

    r3299085 r3308128  
    1010use Sentry\Integration\ErrorListenerIntegration;
    1111use Sentry\Integration\IntegrationInterface;
     12use Sentry\Logs\Log;
    1213use Sentry\Transport\TransportInterface;
    1314use Symfony\Component\OptionsResolver\Options as SymfonyOptions;
     
    438439
    439440    /**
     441     * Gets the Org ID.
     442     */
     443    public function getOrgId(): ?int
     444    {
     445        return $this->options['org_id'];
     446    }
     447
     448    /**
     449     * Sets the Org ID.
     450     */
     451    public function setOrgId(int $orgId): self
     452    {
     453        $options = array_merge($this->options, ['org_id' => $orgId]);
     454
     455        $this->options = $this->resolver->resolve($options);
     456
     457        return $this;
     458    }
     459
     460    /**
    440461     * Gets the name of the server the SDK is running on (e.g. the hostname).
    441462     */
     
    643664    {
    644665        $options = array_merge($this->options, ['trace_propagation_targets' => $tracePropagationTargets]);
     666
     667        $this->options = $this->resolver->resolve($options);
     668
     669        return $this;
     670    }
     671
     672    /**
     673     * Returns whether strict trace propagation is enabled or not.
     674     */
     675    public function isStrictTracePropagationEnabled(): bool
     676    {
     677        return $this->options['strict_trace_propagation'];
     678    }
     679
     680    /**
     681     * Sets if strict trace propagation should be enabled or not.
     682     */
     683    public function enableStrictTracePropagation(bool $strictTracePropagation): self
     684    {
     685        $options = array_merge($this->options, ['strict_trace_propagation' => $strictTracePropagation]);
    645686
    646687        $this->options = $this->resolver->resolve($options);
     
    11111152
    11121153        return $this;
     1154    }
     1155
     1156    /**
     1157     * Sets if logs should be enabled or not.
     1158     *
     1159     * @param bool|null $enableLogs Boolean if logs should be enabled or not
     1160     */
     1161    public function setEnableLogs(?bool $enableLogs): self
     1162    {
     1163        $options = array_merge($this->options, ['enable_tracing' => $enableLogs]);
     1164
     1165        $this->options = $this->resolver->resolve($options);
     1166
     1167        return $this;
     1168    }
     1169
     1170    /**
     1171     * Gets if logs is enabled or not.
     1172     */
     1173    public function getEnableLogs(): bool
     1174    {
     1175        return $this->options['enable_logs'] ?? false;
     1176    }
     1177
     1178    /**
     1179     * Gets a callback that will be invoked before an log is sent to the server.
     1180     * If `null` is returned it won't be sent.
     1181     *
     1182     * @psalm-return callable(Log): ?Log
     1183     */
     1184    public function getBeforeSendLogCallback(): callable
     1185    {
     1186        return $this->options['before_send_log'];
    11131187    }
    11141188
     
    11471221            'release' => $_SERVER['SENTRY_RELEASE'] ?? $_SERVER['AWS_LAMBDA_FUNCTION_VERSION'] ?? null,
    11481222            'dsn' => $_SERVER['SENTRY_DSN'] ?? null,
     1223            'org_id' => null,
    11491224            'server_name' => gethostname(),
    11501225            'ignore_exceptions' => [],
     
    11661241            },
    11671242            'trace_propagation_targets' => null,
     1243            'strict_trace_propagation' => false,
    11681244            'tags' => [],
    11691245            'error_types' => null,
     
    11881264            'max_request_body_size' => 'medium',
    11891265            'class_serializers' => [],
     1266            'enable_logs' => false,
     1267            'before_send_log' => static function (Log $log): Log {
     1268                return $log;
     1269            },
    11901270        ]);
    11911271
     
    12071287        $resolver->setAllowedTypes('release', ['null', 'string']);
    12081288        $resolver->setAllowedTypes('dsn', ['null', 'string', 'bool', Dsn::class]);
     1289        $resolver->setAllowedTypes('org_id', ['null', 'int']);
    12091290        $resolver->setAllowedTypes('server_name', 'string');
    12101291        $resolver->setAllowedTypes('before_send', ['callable']);
     
    12131294        $resolver->setAllowedTypes('ignore_transactions', 'string[]');
    12141295        $resolver->setAllowedTypes('trace_propagation_targets', ['null', 'string[]']);
     1296        $resolver->setAllowedTypes('strict_trace_propagation', 'bool');
    12151297        $resolver->setAllowedTypes('tags', 'string[]');
    12161298        $resolver->setAllowedTypes('error_types', ['null', 'int']);
     
    12321314        $resolver->setAllowedTypes('max_request_body_size', 'string');
    12331315        $resolver->setAllowedTypes('class_serializers', 'array');
     1316        $resolver->setAllowedTypes('enable_logs', 'bool');
     1317        $resolver->setAllowedTypes('before_send_log', 'callable');
    12341318
    12351319        $resolver->setAllowedValues('max_request_body_size', ['none', 'never', 'small', 'medium', 'always']);
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Serializer/AbstractSerializer.php

    r3299085 r3308128  
    213213     * Serializes the given value to a string.
    214214     *
    215      * @param mixed $value The value to serialize
    216      */
    217     protected function serializeString($value): string
    218     {
    219         $value = (string) $value;
    220 
     215     * @param string $value The value to serialize
     216     */
     217    protected function serializeString(string $value): string
     218    {
    221219        // we always guarantee this is coerced, even if we can't detect encoding
    222220        if ($currentEncoding = mb_detect_encoding($value, $this->mbDetectOrder)) {
    223             $value = mb_convert_encoding($value, 'UTF-8', $currentEncoding);
     221            $encoded = mb_convert_encoding($value, 'UTF-8', $currentEncoding) ?: '<encoding error>';
    224222        } else {
    225             $value = mb_convert_encoding($value, 'UTF-8');
    226         }
    227 
    228         if (mb_strlen($value) > $this->options->getMaxValueLength()) {
    229             $value = mb_substr($value, 0, $this->options->getMaxValueLength() - 10, 'UTF-8') . ' {clipped}';
    230         }
    231 
    232         return $value;
     223            $encoded = mb_convert_encoding($value, 'UTF-8') ?: '<encoding error>';
     224        }
     225
     226        if (mb_strlen($encoded) > $this->options->getMaxValueLength()) {
     227            $encoded = mb_substr($encoded, 0, $this->options->getMaxValueLength() - 10, 'UTF-8') . ' {clipped}';
     228        }
     229
     230        return $encoded;
    233231    }
    234232
     
    277275        }
    278276
    279         return $this->serializeString($value);
     277        if (\is_string($value) || (\is_object($value) && method_exists($value, '__toString'))) {
     278            return $this->serializeString((string) $value);
     279        }
     280
     281        return null;
    280282    }
    281283
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Serializer/EnvelopItems/EnvelopeItemInterface.php

    r3299085 r3308128  
    1212interface EnvelopeItemInterface
    1313{
    14     public static function toEnvelopeItem(Event $event): string;
     14    public static function toEnvelopeItem(Event $event): ?string;
    1515}
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Serializer/EnvelopItems/ProfileItem.php

    r3299085 r3308128  
    1414class ProfileItem implements EnvelopeItemInterface
    1515{
    16     public static function toEnvelopeItem(Event $event): string
     16    public static function toEnvelopeItem(Event $event): ?string
    1717    {
    1818        $header = [
     
    2323        $profile = $event->getSdkMetadata('profile');
    2424        if (!$profile instanceof Profile) {
    25             return '';
     25            return null;
    2626        }
    2727
    2828        $payload = $profile->getFormattedData($event);
    2929        if ($payload === null) {
    30             return '';
     30            return null;
    3131        }
    3232
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Serializer/EnvelopItems/TransactionItem.php

    r3299085 r3308128  
    66
    77use Sentry\Event;
     8use Sentry\EventType;
    89use Sentry\Serializer\Traits\BreadcrumbSeralizerTrait;
    910use Sentry\Tracing\Span;
     
    2930    {
    3031        $header = [
    31             'type' => (string) $event->getType(),
     32            'type' => (string) EventType::transaction(),
    3233            'content_type' => 'application/json',
    3334        ];
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Serializer/PayloadSerializer.php

    r3299085 r3308128  
    1010use Sentry\Serializer\EnvelopItems\CheckInItem;
    1111use Sentry\Serializer\EnvelopItems\EventItem;
     12use Sentry\Serializer\EnvelopItems\LogsItem;
    1213use Sentry\Serializer\EnvelopItems\ProfileItem;
    1314use Sentry\Serializer\EnvelopItems\TransactionItem;
     
    5556        }
    5657
    57         $items = '';
     58        $items = [];
    5859
    5960        switch ($event->getType()) {
    6061            case EventType::event():
    61                 $items = EventItem::toEnvelopeItem($event);
     62                $items[] = EventItem::toEnvelopeItem($event);
    6263                break;
    6364            case EventType::transaction():
    64                 $transactionItem = TransactionItem::toEnvelopeItem($event);
     65                $items[] = TransactionItem::toEnvelopeItem($event);
    6566                if ($event->getSdkMetadata('profile') !== null) {
    66                     $profileItem = ProfileItem::toEnvelopeItem($event);
    67                     if ($profileItem !== '') {
    68                         $items = \sprintf("%s\n%s", $transactionItem, $profileItem);
    69                         break;
    70                     }
     67                    $items[] = ProfileItem::toEnvelopeItem($event);
    7168                }
    72                 $items = $transactionItem;
    7369                break;
    7470            case EventType::checkIn():
    75                 $items = CheckInItem::toEnvelopeItem($event);
     71                $items[] = CheckInItem::toEnvelopeItem($event);
     72                break;
     73            case EventType::logs():
     74                $items[] = LogsItem::toEnvelopeItem($event);
    7675                break;
    7776        }
    7877
    79         return \sprintf("%s\n%s", JSON::encode($envelopeHeader), $items);
     78        return \sprintf("%s\n%s", JSON::encode($envelopeHeader), implode("\n", array_filter($items)));
    8079    }
    8180}
  • pay-with-flex/trunk/vendor/sentry/sentry/src/State/Hub.php

    r3299085 r3308128  
    289289                        $options->getTracesSampleRate() ?? 0
    290290                    );
    291                     $sampleSource = $samplingContext->getParentSampled() ? 'parent:sampling_decision' : 'config:traces_sample_rate';
     291                    $sampleSource = $samplingContext->getParentSampled() !== null ? 'parent:sampling_decision' : 'config:traces_sample_rate';
    292292                }
    293293            }
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Tracing/DynamicSamplingContext.php

    r3299085 r3308128  
    173173                $samplingContext->set('public_key', $options->getDsn()->getPublicKey());
    174174            }
     175            if ($options->getDsn() !== null && $options->getDsn()->getOrgId() !== null) {
     176                $samplingContext->set('org_id', (string) $options->getDsn()->getOrgId());
     177            }
    175178
    176179            if ($options->getRelease() !== null) {
     
    210213        }
    211214
     215        if ($options->getDsn() !== null && $options->getDsn()->getOrgId() !== null) {
     216            $samplingContext->set('org_id', (string) $options->getDsn()->getOrgId());
     217        }
     218
    212219        if ($options->getRelease() !== null) {
    213220            $samplingContext->set('release', $options->getRelease());
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Tracing/GuzzleTracingMiddleware.php

    r3299085 r3308128  
    1616use function Sentry\getBaggage;
    1717use function Sentry\getTraceparent;
    18 use function Sentry\getW3CTraceparent;
    1918
    2019/**
     
    6766                    $request = $request
    6867                        ->withHeader('sentry-trace', getTraceparent())
    69                         ->withHeader('traceparent', getW3CTraceparent())
    7068                        ->withHeader('baggage', getBaggage());
    7169                }
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Tracing/PropagationContext.php

    r3299085 r3308128  
    1111{
    1212    private const SENTRY_TRACEPARENT_HEADER_REGEX = '/^[ \\t]*(?<trace_id>[0-9a-f]{32})?-?(?<span_id>[0-9a-f]{16})?-?(?<sampled>[01])?[ \\t]*$/i';
    13 
    14     private const W3C_TRACEPARENT_HEADER_REGEX = '/^[ \\t]*(?<version>[0]{2})?-?(?<trace_id>[0-9a-f]{32})?-?(?<span_id>[0-9a-f]{16})?-?(?<sampled>[01]{2})?[ \\t]*$/i';
    1513
    1614    /**
     
    8280    /**
    8381     * Returns a string that can be used for the W3C `traceparent` header & meta tag.
     82     *
     83     * @deprecated since version 4.12. To be removed in version 5.0.
    8484     */
    8585    public function toW3CTraceparent(): string
    8686    {
    87         return \sprintf('00-%s-%s-00', (string) $this->traceId, (string) $this->spanId);
     87        return '';
    8888    }
    8989
     
    203203            if (isset($matches['sampled'])) {
    204204                $context->parentSampled = $matches['sampled'] === '1';
    205                 $hasSentryTrace = true;
    206             }
    207         } elseif (preg_match(self::W3C_TRACEPARENT_HEADER_REGEX, $traceparent, $matches)) {
    208             if (!empty($matches['trace_id'])) {
    209                 $context->traceId = new TraceId($matches['trace_id']);
    210                 $hasSentryTrace = true;
    211             }
    212 
    213             if (!empty($matches['span_id'])) {
    214                 $context->parentSpanId = new SpanId($matches['span_id']);
    215                 $hasSentryTrace = true;
    216             }
    217 
    218             if (isset($matches['sampled'])) {
    219                 $context->parentSampled = $matches['sampled'] === '01';
    220205                $hasSentryTrace = true;
    221206            }
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Tracing/Span.php

    r3299085 r3308128  
    566566    /**
    567567     * Returns a string that can be used for the W3C `traceparent` header & meta tag.
     568     *
     569     * @deprecated since version 4.12. To be removed in version 5.0.
    568570     */
    569571    public function toW3CTraceparent(): string
    570572    {
    571         $sampled = '';
    572 
    573         if ($this->sampled !== null) {
    574             $sampled = $this->sampled ? '01' : '00';
    575         } else {
    576             // If no sampling decision was made, set the flag to 00
    577             $sampled = '00';
    578         }
    579 
    580         return \sprintf('00-%s-%s-%s', (string) $this->traceId, (string) $this->spanId, $sampled);
     573        return '';
    581574    }
    582575
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Tracing/TransactionContext.php

    r3299085 r3308128  
    88{
    99    private const SENTRY_TRACEPARENT_HEADER_REGEX = '/^[ \\t]*(?<trace_id>[0-9a-f]{32})?-?(?<span_id>[0-9a-f]{16})?-?(?<sampled>[01])?[ \\t]*$/i';
    10 
    11     private const W3C_TRACEPARENT_HEADER_REGEX = '/^[ \\t]*(?<version>[0]{2})?-?(?<trace_id>[0-9a-f]{32})?-?(?<span_id>[0-9a-f]{16})?-?(?<sampled>[01]{2})?[ \\t]*$/i';
    1210
    1311    public const DEFAULT_NAME = '<unlabeled transaction>';
     
    165163            if (isset($matches['sampled'])) {
    166164                $context->parentSampled = $matches['sampled'] === '1';
    167                 $hasSentryTrace = true;
    168             }
    169         } elseif (preg_match(self::W3C_TRACEPARENT_HEADER_REGEX, $sentryTrace, $matches)) {
    170             if (!empty($matches['trace_id'])) {
    171                 $context->traceId = new TraceId($matches['trace_id']);
    172                 $hasSentryTrace = true;
    173             }
    174 
    175             if (!empty($matches['span_id'])) {
    176                 $context->parentSpanId = new SpanId($matches['span_id']);
    177                 $hasSentryTrace = true;
    178             }
    179 
    180             if (isset($matches['sampled'])) {
    181                 $context->parentSampled = $matches['sampled'] === '01';
    182165                $hasSentryTrace = true;
    183166            }
  • pay-with-flex/trunk/vendor/sentry/sentry/src/Transport/RateLimiter.php

    r3299085 r3308128  
    1616     */
    1717    private const DATA_CATEGORY_ERROR = 'error';
     18
     19    /**
     20     * @var string
     21     */
     22    private const DATA_CATEGORY_LOG_ITEM = 'log_item';
    1823
    1924    /**
     
    113118        if ($eventType === 'event') {
    114119            $eventType = self::DATA_CATEGORY_ERROR;
     120        } elseif ($eventType === 'log') {
     121            $eventType = self::DATA_CATEGORY_LOG_ITEM;
    115122        }
    116123
  • pay-with-flex/trunk/vendor/sentry/sentry/src/functions.php

    r3299085 r3308128  
    88use Sentry\HttpClient\HttpClientInterface;
    99use Sentry\Integration\IntegrationInterface;
     10use Sentry\Logs\Logs;
    1011use Sentry\Metrics\Metrics;
    1112use Sentry\State\Scope;
     
    2425 *     before_send?: callable,
    2526 *     before_send_check_in?: callable,
     27 *     before_send_log?: callable,
    2628 *     before_send_transaction?: callable,
    2729 *     capture_silenced_errors?: bool,
     
    2931 *     default_integrations?: bool,
    3032 *     dsn?: string|bool|null|Dsn,
     33 *     enable_logs?: bool,
    3134 *     environment?: string|null,
    3235 *     error_types?: int|null,
     
    4750 *     max_request_body_size?: "none"|"never"|"small"|"medium"|"always",
    4851 *     max_value_length?: int,
     52 *     org_id?: int|null,
    4953 *     prefixes?: array<string>,
    5054 *     profiles_sample_rate?: int|float|null,
     
    5761 *     spotlight?: bool,
    5862 *     spotlight_url?: string,
     63 *     strict_trace_propagation?: bool,
    5964 *     tags?: array<string>,
    6065 *     trace_propagation_targets?: array<string>|null,
     
    306311 * This function is context aware, as in it either returns the traceparent based
    307312 * on the current span, or the scope's propagation context.
     313 *
     314 * @deprecated since version 4.12. To be removed in version 5.0.
    308315 */
    309316function getW3CTraceparent(): string
    310317{
    311     $hub = SentrySdk::getCurrentHub();
    312     $client = $hub->getClient();
    313 
    314     if ($client !== null) {
    315         $options = $client->getOptions();
    316 
    317         if ($options !== null && $options->isTracingEnabled()) {
    318             $span = SentrySdk::getCurrentHub()->getSpan();
    319             if ($span !== null) {
    320                 return $span->toW3CTraceparent();
    321             }
    322         }
    323     }
    324 
    325     $traceParent = '';
    326     $hub->configureScope(function (Scope $scope) use (&$traceParent) {
    327         $traceParent = $scope->getPropagationContext()->toW3CTraceparent();
    328     });
    329 
    330     return $traceParent;
     318    return '';
    331319}
    332320
     
    379367
    380368/**
     369 * Get the Sentry Logs client.
     370 */
     371function logger(): Logs
     372{
     373    return Logs::getInstance();
     374}
     375
     376/**
    381377 * @deprecated Metrics are no longer supported. Metrics API is a no-op and will be removed in 5.x.
    382378 */
Note: See TracChangeset for help on using the changeset viewer.