queue icon indicating copy to clipboard operation
queue copied to clipboard

Simplify envelopes

Open viktorprogger opened this issue 1 year ago • 0 comments

Q A
Is bugfix?
New feature?
Breaks BC?

This PR simplifies the Envelope concept. The main changes are:

  • EnvelopeTrait is converted into AbstractEnvelope class.
  • 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();

viktorprogger avatar Sep 20 '24 13:09 viktorprogger