queue
queue copied to clipboard
Simplify envelopes
| Q | A |
|---|---|
| Is bugfix? | ❌ |
| New feature? | ❌ |
| Breaks BC? | ❌ |
This PR simplifies the Envelope concept. The main changes are:
-
EnvelopeTraitis converted intoAbstractEnvelopeclass. - If an envelope uses the new abstract class, there is no more envelope stack, which requires recursive data search. There is always a single envelope around a message.
With these changes it's dimpler to debug an application with envelopes. It's also becomes simple and meaningful to use unique method of envelopes be envelope creation in place like this, because there is no more a deep envelope stack with a recursive data search:
$id = IdEnvelope::fromMessage($message)->getId();