Hi. In this example: $response = $responseFactory->createResponse(200);
$body = $response->getBody(); $body2 = $streamFactory->createStream(); I've always assumed that $body and $body2 were empty writable streams, so it was safe to write in them. But PSR-17 says nothing about how the streams must be created in new http messages (request, serverRequest and responses). This problem appeared here https://github.com/middlewares/error-handler/pull/5/files#r227117082 and forces to always require a streamFactory along with a responseFactory any time that you have to create a response in a middleware. I think this makes the responseFactory less useful and reliable, forcing to require more dependencies just in case. So I propose to include in the spec a text indicating that the stream created in the responseFactory, requestFactory and serverRequestFactory should be the same than if they were created with streamFactory->createStream() What do you think? Oscar Otero. -- You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/ae026a4a-f29a-43ef-b2b6-36ce4b393f8f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
