I definitely feel that modern PHP we should be type hinting as much as possible, especially in PSRs!
Kind Regards Steve McDougall On Tue, 12 Aug 2025, 17:13 , <php-fig@googlegroups.com> wrote: > php-fig@googlegroups.com > <https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/php-fig/topics> > Google > Groups > <https://groups.google.com/forum/?utm_source=digest&utm_medium=email/#!overview> > [image: > Google Groups Logo] > <https://groups.google.com/forum/?utm_source=digest&utm_medium=email/#!overview> > Topic digest > View all topics > <https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/php-fig/topics> > > - PSR-7: HTTP message interfaces > <#m_-5017636695476066962_group_thread_0> - 1 Update > > PSR-7: HTTP message interfaces > <http://groups.google.com/group/php-fig/t/45dfe985e05ee21e?utm_source=digest&utm_medium=email> > Emad Al-mahdi <emad.st...@gmail.com>: Aug 12 01:24AM -0700 > > Hello, > > I wonder why the method [withParsedBody] is not type hinted in the > interface [ServerRequestInterface]. Se below: > > /** > * Return an instance with the specified body parameters. > * > * These MAY be injected during instantiation. > * > * If the request Content-Type is either > application/x-www-form-urlencoded > * or multipart/form-data, and the request method is POST, use this > method > * ONLY to inject the contents of $_POST. > * > * The data IS NOT REQUIRED to come from $_POST, but MUST be the > results of > * deserializing the request body content. Deserialization/parsing > returns > * structured data, and, as such, this method ONLY accepts arrays or > objects, > * or a null value if nothing was available to parse. > * > * As an example, if content negotiation determines that the request > data > * is a JSON payload, this method could be used to create a request > * instance with the deserialized parameters. > * > * This method MUST be implemented in such a way as to retain the > * immutability of the message, and MUST return an instance that has the > * updated body parameters. > * > * @param null|array|object $data The deserialized body data. This will > * typically be in an array or object. > * @return static > * @throws \InvalidArgumentException if an unsupported argument type is > * provided. > */ > public function withParsedBody($data): ServerRequestInterface; > Back to top <#m_-5017636695476066962_digest_top> > You received this digest because you're subscribed to updates for this > group. You can change your settings on the group membership page > <https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/php-fig/join> > . > To unsubscribe from this group and stop receiving emails from it send an > email to php-fig+unsubscr...@googlegroups.com. > -- 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 php-fig+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/php-fig/CACB5p2t8ZajoWKFYF_JF0Wdg89%3D73dPLJa-PPmvQCUW-YSBxtw%40mail.gmail.com.