Skip to content

Release 3.0.53

Latest

Choose a tag to compare

@gonzaloebiz gonzaloebiz released this 21 Sep 10:50
· 0 commits to master since this release
beef5a6

Fixed bugs

  • Notify only a host that can listen (#96) — the library called saveNotification() and getGmtDate() on the host's helper without checking that the host has them. On an extension older than 103.4.65 that is a fatal on every API call, and it has been since 3.0.42.

    saveNotification() is the extension's, and it arrived there on 2024-12-03 in 103.4.65. The calls to it landed here the day after. Composer cannot hold that pairing together: an extension requires a minimum library version, a library cannot require a minimum extension version, and the extension's own constraint is a floor with no ceiling — so composer update hands an old extension the newest library published, and an app/code installation pairs the two under no constraint at all.

    Both call sites are affected, which is to say both outcomes of an API call: the answer, in Mailchimp::call(), and the failure, in Mailchimp_Error::getFriendlyMessage(). The failure path is the worse of the two — it is reached precisely because Mailchimp answered 4xx, so an installation that could not listen lost the message explaining the failure and the request that was carrying it.

    Guarded per method rather than per helper, which is the discipline the reporting path already followed in readContactAllowed() and readModuleVersion(). A host with no way to be notified is now left alone. getGmtDate() has been in the extension since 2018 and is guarded for the same reason rather than because it is likely to be absent: nothing here can assume the shape of the host it was handed.

    A gate over src now walks every file and refuses a call on a helper method that file has never checked for, so a call site added later cannot reintroduce this quietly.

Note for extension authors

Nothing to do, and nothing to call. This release changes only what happens when the host is missing a method: a current extension gets the same payload, in the same call, in the same order, and cannot tell this release from the last by its behaviour.

Which is the shape of the fix generally — what it changes happens on installations too old to report that anything was ever wrong.