Default implementation for the 'headers' and 'trailers' message properties #3
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No project
No assignees
1 participant
Notifications
Total time spent: 4 hours 44 minutes
Due date
c.fahner
4 hours 44 minutes
No due date set.
Blocks
#6 Shorthands for cookie values
slendium/http
Reference
slendium/http#3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently the
Messageinterface has a type requirement ofArrayAccess&Countable&Traversablefor its$headersand$trailersproperties. Requiring each library user to create a custom class for these often-used properties is a lot of unnecessary work and may introduce errors and inconsistencies between implementations (since theArrayAccessimplementation has some atypical documented behavior requirements).This issue introduces a builder-like
FieldSetclass to improve consistency in behavior across implementations. This type is directly accepted by theMessage::$headersandMessage::$trailersproperties.Changed the
$headersand$trailersproperties ofMessageto simply require aniterable<Field>. Requiring a complex type likeArrayAccess&Countable&Traversablegives these properties too many responsibilities.The properties can still be implemented as an
ArrayAccess|arrayfor optimization purposes.