Skip to content

Allow rybakit/msgpack 0.10, 0.11 and later 0.x releases (>=0.9.1 <1.0) - #236

Merged
sacOO7 merged 1 commit into
mainfrom
fix/allow-msgpack-0.10-0.11
Nov 25, 2026
Merged

sacOO7 merged 1 commit into
mainfrom
fix/allow-msgpack-0.10-0.11

Conversation

@sacOO7

@sacOO7 sacOO7 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Widen rybakit/msgpack from ^0.9.1 || ^1.0 to >=0.9.1 <1.0:

  • composer.json: "rybakit/msgpack": ">=0.9.1 <1.0".

  • tests/MessagePackEncodingTest.php: an offline test that pins the SDK's msgpack wire format. It covers:

    • the exact bytes the SDK sends: a single message, and a batch with a JSON message and a binary message;
    • the decoding of fixed Ably-shaped responses: uint64 timestamps, a float64, nested maps.

    It uses MessagePack::pack/unpack with PackOptions::FORCE_STR, as the SDK does.

No CI or workflow changes.

Fixes #235

Motivation

^0.9.1 on a 0.x version means <0.10, and no msgpack 1.x exists, so 2.0.0 is capped at 0.9.2 (current: 0.11.3). Users upgrading from ably/ably-php 1.x (>=0.9.1, which resolves 0.11.3) are moved back to 0.9.2. They lose 0.11.0's unpack hardening, see a composer outdated entry they can't clear, and can't install alongside anything that requires msgpack ^0.10/^0.11.

The cap came from bounding the old >=0.9.1 for composer validate --strict. It wasn't a compatibility decision. A bounded range satisfies --strict without a release of this package for every new msgpack 0.x minor. The SDK's msgpack surface (MessagePack::pack/unpack, PackOptions::FORCE_STR) has been the same since msgpack 0.4. The new test runs offline in every CI job, so a future 0.x release that changed the SDK's wire format would fail CI on the next PR or push to main. PHP 8.1 still resolves 0.9.2, because 0.10+ requires PHP 8.2.

Full analysis is in #235.

Testing

  • composer validate --strict: valid.
  • The new test plus the offline suites (HostCache, ClientOptions, Crypto, Miscellaneous, Defaults, Host, Log, Packaging, Types, Utils) pass, 59 tests each, locally on msgpack 0.9.1, 0.9.2 and 0.11.3, on both PHP 8.2 and 8.5.
  • In CI (unchanged check.yml, no lock file), the PHP 8.1 jobs resolve msgpack 0.9.2 and the 8.2–8.5 jobs resolve 0.11.3. CI never runs on 0.9.1; the floor was checked locally only.
  • On 2.0.0, the full sandbox suite with PROTOCOL=msgpack gave identical results on 0.9.2 and 0.11.3.
  • The CI failures seen on earlier pushes of this branch are msgpack-independent flakes. Each also occurs on main, or is a known random-order assertion:
    • PubSubHttpClientTest::testHttpTimeout, which needs a 20 ms request to time out;
    • sandbox app creation returning 500 or 504 ("Could not connect to API");
    • PubSubHttpClientTest::testFallbackHosts, whose shuffled fallback order can equal the original order.

Release note (for the release PR; CHANGELOG is updated there because PackagingTest ties the top entry to the lib version)

  • rybakit/msgpack is now constrained to >=0.9.1 <1.0, allowing 0.10, 0.11 and later 0.x releases. On 64-bit PHP 8.2+ this picks up msgpack 0.11's unpack hardening. PHP 8.1 continues to use 0.9.2.

Summary by CodeRabbit

  • Chores
    • Restricted the supported MessagePack dependency range to versions from 0.9.1 up to, but not including, 1.0.
    • Added weekly dependency update and compatibility checks.
  • Tests
    • Added checks for MessagePack encoding and decoding of messages, batches, timestamps, integers, and floating-point values.

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Composer constraint for rybakit/msgpack now excludes versions 1.0 and later. New tests assert MessagePack wire-format encoding and decoding. Dependabot and the CI workflow add weekly dependency checks, including a PHP 8.2 lowest-version job.

Changes

MessagePack Compatibility

Layer / File(s) Summary
Version constraint and wire-format tests
composer.json, tests/MessagePackEncodingTest.php
The rybakit/msgpack constraint now allows versions from 0.9.1 to below 1.0. Tests assert exact packed bytes and decoding for single messages, batches, history-style responses, and stats-style values.
Scheduled dependency checks
.github/dependabot.yml, .github/workflows/check.yml
Dependabot checks the Composer package weekly. The workflow runs weekly and adds a PHP 8.2 job that updates the package with --prefer-lowest.

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Other

Possibly related issues

  • Issue 235: The constraint change allows rybakit/msgpack 0.10 and 0.11, and the added CI and Dependabot checks provide the proposed guard rails.

Suggested reviewers: umair-ably, ttypic

Merge Risk: Minimal · up to 9e537

This change widens the allowed msgpack versions and adds tests and CI checks to guard compatibility. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title names the main change: widening the rybakit/msgpack constraint so that 0.10, 0.11 and later 0.x releases are allowed (>=0.9.1 <1.0). The composer.json change and the objectives both describe…
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title names the main change: widening the rybakit/msgpack constraint so that 0.10, 0.11 and later 0.x releases are allowed (>=0.9.1 <1.0). The composer.json change and the objectives both describe this widening, so the title matches the primary change. The title is 70 characters, which is within a reasonable length. Its wording is specific and not vague.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checks the packed-up bytes,
Then hops through messages in flight.
It tests the floats and timestamps,
And keeps the versions in range.
Each Monday brings a fresh check,
Then off it bounds beneath the moon.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 11d65c2c-244a-4276-b086-d6ca4133fc26
Commits

Reviewing files that changed from the base of the PR and between ae2b075 and 9e53705.

Files selected for processing: 4

  • .github/dependabot.yml
  • .github/workflows/check.yml
  • composer.json
  • tests/MessagePackEncodingTest.php

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Approval should wait until 32-bit PHP support is clarified, because the new uint64 decoding fixture is type-sensitive there while composer.json does not require a 64-bit runtime.

No open issues 🎉

What changed in this PR

This pull request broadens the supported rybakit/msgpack dependency to stable 0.x releases from 0.9.1 onward and adds compatibility coverage and automation.

Changes:

  • Updates the Composer constraint to >=0.9.1 <1.0.
  • Adds fixed-wire-format MessagePack encoding and decoding tests.
  • Adds lowest-version CI coverage, weekly scheduled checks, and targeted Dependabot updates.
File Description
tests/​MessagePackEncodingTest.php Adds fixed-wire-format tests for MessagePack encoding and decoding of messages, batches, timestamps, integers, floats, binary data, and nested responses.
composer.json W widens the supported rybakit/msgpack dependency range to >=0.9.1 <1.0.
.github/​workflows/​check.yml Adds weekly scheduled execution and a compatibility job using the lowest allowed MessagePack version.
.github/​dependabot.yml Configures weekly targeted Dependabot checks for rybakit/msgpack with range widening.

Review effort: Lite

@github-actions
github-actions Bot temporarily deployed to staging/pull/236/features November 24, 2026 14:31 Inactive
The 2.0.0 constraint `^0.9.1 || ^1.0` was meant to put an upper bound on
the old `>=0.9.1`, which `composer validate --strict` rejects. But Composer
reads a caret on 0.x as `<0.10`, so it excluded 0.10.0 and 0.11.x, and no
1.x exists to match `^1.0`. Upgrading from ably/ably-php 1.x therefore moved
users from msgpack 0.11.3 back to 0.9.2, losing 0.11.0's unpack hardening
(a 128-level nesting limit and timestamp-extension length checks). It also
made the SDK uninstallable alongside anything requiring msgpack ^0.10 or
^0.11.

`>=0.9.1 <1.0` is bounded, so `--strict` accepts it, and it admits future
0.x minors without a release of this package each time. The SDK uses only
`MessagePack::pack()` and `MessagePack::unpack()` with
`PackOptions::FORCE_STR`. Their signatures and that constant have been the
same since msgpack 0.4. PHP 8.1 still resolves 0.9.2, because 0.10+
requires PHP 8.2.

The new offline MessagePackEncodingTest pins the SDK's msgpack wire format.
It asserts the exact bytes the SDK sends and the decoding of fixed
Ably-shaped responses. It runs in every CI job, so a msgpack release that
changes either fails CI on the next PR or push. It passes on 0.9.1, 0.9.2
and 0.11.3.
@sacOO7
sacOO7 force-pushed the fix/allow-msgpack-0.10-0.11 branch from cf9d08e to cf74eb6 Compare November 24, 2026 14:36
@sacOO7 sacOO7 changed the title Allow rybakit/msgpack 0.10, 0.11 and later 0.x (>=0.9.1 <1.0) with CI guard rails Allow rybakit/msgpack 0.10, 0.11 and later 0.x releases (>=0.9.1 <1.0) Nov 24, 2026
@sacOO7
sacOO7 requested review from AndyTWF and ttypic November 24, 2026 14:38

@ttypic ttypic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sacOO7
sacOO7 merged commit a970cd4 into main Nov 25, 2026
23 of 24 checks passed
@sacOO7
sacOO7 deleted the fix/allow-msgpack-0.10-0.11 branch November 25, 2026 14:24
@sacOO7 sacOO7 mentioned this pull request Nov 25, 2026

This branch was successfully deployed

1 active deployment
staging/pull/236/features — cf74eb69 Deployed Nov 24, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

rybakit/msgpack constraint "^0.9.1 || ^1.0" blocks msgpack 0.10 and 0.11

3 participants