Repository navigation
Allow rybakit/msgpack 0.10, 0.11 and later 0.x releases (>=0.9.1 <1.0) - #236
Conversation
|
No actionable comments were generated in the recent review. WalkthroughThe Composer constraint for ChangesMessagePack Compatibility
Estimated code review effort: 2 (Simple) | ~12 minutes Change: Other Possibly related issues
Suggested reviewers: Merge Risk:
|
There was a problem hiding this comment.
🔵 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
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.
cf9d08e to
cf74eb6
Compare
Summary
Widen
rybakit/msgpackfrom^0.9.1 || ^1.0to>=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:It uses
MessagePack::pack/unpackwithPackOptions::FORCE_STR, as the SDK does.No CI or workflow changes.
Fixes #235
Motivation
^0.9.1on 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 fromably/ably-php1.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 acomposer outdatedentry 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.1forcomposer validate --strict. It wasn't a compatibility decision. A bounded range satisfies--strictwithout 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 tomain. 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.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.PROTOCOL=msgpackgave identical results on 0.9.2 and 0.11.3.main, or is a known random-order assertion:PubSubHttpClientTest::testHttpTimeout, which needs a 20 ms request to time out;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/msgpackis 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