Yikes, I didn't know about this issue.
To others who don't know what this is about, this thread has some information:
TL;DR Linux has a default limit of 1024 open file handles at the OS level.
Okay, but...
This can't become a choice between an incomplete model or a model that can't scale. Both are unacceptable.
The only sensible recourse I can think of, is we need special TempStream implementation that doesn't open an actual file handle until you write to it.
I think we could put this as a recommendation in the PSR? It's an easy work around.
Another possible work around is a custom stream implementation that uses a simple string as buffer.
Of course, this approach only works up to a certain file size, but you could further optimize by switching to a temp-stream when the buffer hits a certain size limit or somebody tries to detach the resource handle.
Yet another option is to lazy initialize in getBody() ...
So there are ways to work around this.
I don't think returning an incomplete, unusable model an acceptable solution.
For one, the type-hint of getBody() is StreamInterface, it's not StreamInterface|null - so you have to return an instance or you're not complying with the original spec in the first place.
This is a lot of information to put in an amendment though 🤔