Re: RFC: Server-Side Request and Response Objects (v2)

From: Date: Tue, 11 Feb 2020 12:42:10 +0000
Subject: Re: RFC: Server-Side Request and Response Objects (v2)
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-108471@lists.php.net to get a copy of this message
This is very interesting, thanks! Would it make sense to also add an INI setting to disable superglobals and response functions? On Tue, Feb 11, 2020 at 10:34 AM Jan Schneider <jan@horde.org> wrote: > > Zitat von Paul M. Jones <pmjones@pmjones.io>: > > > Hi Internals, > > > > After a couple of years of incubation, I am happy to offer a second > > version of this RFC: > > > > https://wiki.php.net/rfc/request_response > > > > It proposes an object-oriented approach around request and response > > functionality already existing in PHP, in order to reduce the > > global-state problems that come with superglobals and the various > > response-related functions. > > I like this proposal a lot, since it provides a clear, concise > interface to these commonly uses, yet inconveniant to use, existing > functions and variables without having to always use a full-featured > userland library. > Speaking of interfaces: since you suggest using decoration and > composition over extension for ServerResponse, I am missing a > ServerResponseInterface, so that you can easily typehint such userland > decorators. > > -- > Jan Schneider > The Horde Project > https://www.horde.org/ > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.internals (#108471) next »