Repository navigation
Fix documentation references to non-existent API - #339
Open
KalimeroMK wants to merge 2 commits into
Open
KalimeroMK wants to merge 2 commits into
KalimeroMK wants to merge 2 commits into
Conversation
- `EnvelopeInterface` does not exist; envelopes extend the abstract `Envelope`. - `getMetadata()` is `getMeta()` on `MessageInterface`. - `Envelope::fromPayload()` always throws, it is not an alternative way to build an envelope. - The push pipeline no longer carries a `PushRequest` or an adapter, and `AdapterNotConfiguredException` does not exist. - Envelope stack reconstruction is not implemented: envelopes flatten into metadata and are not rebuilt on unserialize. Rewrite the internals page to describe what actually happens. - `configuration-manual.md` mapped the message type to `FileDownloader`, which is the handler's dependency elsewhere in the docs, not the handler.
The overview still promised push middlewares an adapter and a queue to switch, which `processPush(MessageInterface, PushHandlerInterface)` does not offer; `FailureHandlingRequest` carries a queue name, not an instance; and the envelope-stacking tip warned about per-layer overhead that cannot exist, since `Envelope::__construct()` flattens. `new Message(...)` also appeared in 15 examples across two files. `Message` is abstract and holds only metadata; the examples mean `GenericMessage`.
Author
|
Second pass, after re-reading the files the first commit touches:
|
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.
What does this PR do?
Brings the guide back in line with the code on
master. Every item below was checked againstsrc/and reproduced by running the package, not read off the prose.Yiisoft\Queue\Message\EnvelopeInterfacedoes not exist — envelopes extend the abstractEnvelope.getMetadata()does not exist —MessageInterfacedeclaresgetMeta(). It appeared in two copy-paste-ready snippets (performance-tuning.md,best-practices.md).Envelope::fromPayload()was documented as a second way to create an envelope; it isfinaland always throwsLogicException.PushRequest,withAdapter()andYiisoft\Queue\Exception\AdapterNotConfiguredException. None exist:processPush()takes and returns aMessageInterface, and the adapter is fixed when the producer is built.envelopes-metadata-internals.mddescribed an envelope stack kept underENVELOPE_STACK_KEY("envelopes") and rebuilt by the serializer. There is no such key or logic anywhere insrc/. The page is rewritten to describe what the code does: envelopes merge intometaand flatten (getMessage()returns the innermost message), serialization carriestype/payload/metaonly, and the wrapper classes are not rebuilt — values are read back throughIdEnvelope::fromMessage()/DelayEnvelope::fromMessage().configuration-manual.mdmappedDownloadFileMessage::TYPEtoFileDownloader, which is the handler's injected dependency everywhere else in the docs; the handler isRemoteFileHandler.The rewritten page also warns against registering an
Envelopesubclass in the message class resolver:unserialize()then callsEnvelope::fromPayload()and dies with aLogicException.Note on #338
The push pipeline section is written against
master. If #338 lands and reintroducesPushRequest, that section needs another pass — happy to follow up either way.