PSR-7 "getContents" is NOT idempotent

49 views
Skip to first unread message

William Entriken

unread,
Dec 30, 2024, 8:54:23 PM12/30/24
to PHP Framework Interoperability Group
The `getContents` function in PSR-7. Is not idempotent, calling changes state.

It is a dangerous function compared to its friendly name starting with "get".

It would be best to rename this with a more appropriate verb at the beginning. But we are not considering backwards incompatible changes here.

Instead, please recognize this break with best practice by updating documentation to use loud uppercase letters to warn that this is not idempotent.
Reply all
Reply to author
Forward
0 new messages