Repository navigation
fix: make consumer cachedInfo cache-only - #68
Merged
Merged
Conversation
matkomat
force-pushed
the
fix/jetstream-cached-info-semantics
branch
from
March 30, 2026 14:19
67b1ceb to
91cb47c
Compare
There was a problem hiding this comment.
I left one inline note about ordered-consumer coverage. I did not find a functional regression in the implementation itself.
Verified locally with:
vendor/bin/phpunit tests/Integration/JetStream/ConsumerTest.phpvendor/bin/phpunit tests/Integration/JetStream/PushConsumerTest.phpvendor/bin/phpunit tests/Integration/JetStream/OrderedConsumerTest.phpvendor/bin/phpunit tests/Integration/JetStreamvendor/bin/phpstan analyse src --no-progress
There was a problem hiding this comment.
The new ordered-consumer cachedInfo test in 46e7955 addresses my previous coverage note. Rechecked on the latest head and reran vendor/bin/phpunit tests/Integration/JetStream/OrderedConsumerTest.php plus vendor/bin/phpunit tests/Integration/JetStream; no further issues from me.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #64
Summary
ConsumerInterface::cachedInfo()andPushConsumerInterface::cachedInfo()truly cache-only by returningnullfor cold handles instead of performing implicit I/OConsumerInfois already available from create/info API responses so stream and JetStream handle factories still return warm handlesVerification
./vendor/bin/phpunit tests/Integration/JetStream/ConsumerTest.php tests/Integration/JetStream/PushConsumerTest.php --testdox./vendor/bin/phpunit tests/Integration/JetStream/StreamTest.php tests/Integration/JetStream/StreamExtendedTest.php --testdox./vendor/bin/phpunit tests/Unit/JetStream/Consumer/PushConsumerTest.php --testdox./vendor/bin/phpstan analyse --no-progress./vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php --dry-run --diff src/JetStream/Consumer/Consumer.php src/JetStream/Consumer/PushConsumer.php src/JetStream/Consumer/OrderedConsumer.php src/JetStream/Consumer/ConsumerInterface.php src/JetStream/Consumer/PushConsumerInterface.php src/JetStream/Stream/Stream.php src/JetStream/Stream/StreamInterface.php src/JetStream/JetStreamContext.php tests/Integration/JetStream/ConsumerTest.php tests/Integration/JetStream/PushConsumerTest.php