You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$envelope->with(new SomeStamp()) could add to a collection of SomeStamp stamps.
Same as HTTP allows the same header to be found several times with valid use cases.
Right now, we replace any previous value without notice. I feel like it's going to hit us sooner or later.
The text was updated successfully, but these errors were encountered:
nicolas-grekas
added
the
RFC
RFC = Request For Comments (proposals about features that you want to be discussed)
label
Nov 9, 2018
…llections (nicolas-grekas)
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] collect all stamps added on Envelope as collections
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29156
| License | MIT
| Doc PR | -
Late small BC break for Messenger:
* `Envelope::all()` takes a new optional `$stampFqcn` argument and returns the stamps for the specified FQCN, or all stamps by their class name
* `Envelope::get()` has been renamed `Envelope::last()`
This fixes the current behavior where we replace any previous stamp with the same type, which is unexpected to me as it silently loses data and more importantly blocks interesting use cases we're going to need in the near future.
Basically, that's the same as HTTP headers being allowed to exist several times: most of them make no sense as collections, but some are really useful as collections.
Commits
-------
2e98859 [Messenger] collect all stamps added on Envelope as collections
$envelope->with(new SomeStamp())
could add to a collection ofSomeStamp
stamps.Same as HTTP allows the same header to be found several times with valid use cases.
Right now, we replace any previous value without notice. I feel like it's going to hit us sooner or later.
The text was updated successfully, but these errors were encountered: