Skip to content

Conversation

@huangdijia
Copy link
Member

Summary

  • Remove deprecated backward compatibility code from JobMessage serialization
  • Remove legacy array-based format support marked for removal in v3.2
  • Simplify __serialize() and __unserialize() methods to use only associative array format

Changes

  • Removed legacy indexed array elements from __serialize() method
  • Removed array_is_list() compatibility check from __unserialize() method
  • Kept only the modern associative array format with 'job' and 'attempts' keys

Test plan

  • Verify that JobMessage serialization/unserialization works correctly with the new format
  • Ensure async queue functionality remains intact
  • Run existing test suite to validate no regressions

Remove deprecated backward compatibility code from JobMessage class that was maintaining support for the old serialization format. This code was marked for removal in v3.2 and is no longer needed.

Changes:
- Remove legacy array-based serialization format from __serialize()
- Remove compatibility check in __unserialize() for array_is_list format
- Keep only the associative array format with 'job' and 'attempts' keys
@huangdijia huangdijia changed the base branch from master to 3.2 November 10, 2025 07:47
Removed the OldJobMessage stub and related compatibility tests from JobMessageTest. Updated serialization assertions and adjusted RedisDriverTest to reflect new serialized length. This streamlines the test suite and removes legacy code.
@huangdijia huangdijia added this to the v3.2 milestone Nov 10, 2025
@limingxinleo limingxinleo merged commit 8951111 into hyperf:3.2 Nov 10, 2025
85 of 86 checks passed
@huangdijia huangdijia deleted the refactor/async-queue-remove-jobmessage-compatibility branch November 10, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants