Skip to content

[Webhook][Postmark][RemoteEvent] Date validation fails for sample payloads #53788

@aleho

Description

@aleho

Symfony version(s) affected

6.3

Description

The Postmark docs state "datetimes within webhook data will be in ISO 8601 format". They then proceed to use dates in samples containing fractions (like 2019-11-05T16:33:54.9070259Z). According to Wikipedia it's fine to use fractions of seconds.

The PostmarkPayloadConverter nevertheless only allows times to be specified without fractions. This causes all samples from their docs to fail when testing payloads locally.

How to reproduce

Use sample payload from Postmark docs to test a webhook locally.

Possible Solution

Either

  1. don't validate dates or
  2. allow fractions of seconds to be passed.

Additional Context

if (!$date = \DateTimeImmutable::createFromFormat('Y-m-d\TH:i:sT', $payloadDate)) {

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions