Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-07 Thread Rowan Collins
Hi All, Johannes Schlüter wrote (on 07/10/2013): Why replace something? Are there flaws which can't be fixed? Adding too many ways to do the same thing is confusing for everybody. If you want it "object oriented" or such frameworks do great things. The language should offer a good foundation. (I

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-07 Thread Johannes Schlüter
On Fri, 2013-10-04 at 20:38 +0200, Christian Stadler wrote: > Actually I like the idea of having an API to handle everything important > for the HTTP-request and respectively for the response. > > e. g.: > HTTPRequest::getFormData(...), which could possibly be aliased by > HTTPRequest::getPOSTData

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-04 Thread Christian Stadler
Am 02.10.2013 23:40, schrieb Johannes Schlüter: > On Wed, 2013-10-02 at 19:59 +0200, Michael Wallner wrote: >> On 2 October 2013 16:10, Johannes Schlüter wrote: >> > On Wed, 2013-10-02 at 08:59 +0200, Michael Wallner wrote: >> >> Since ever people are confused by _GET and _POST superglobals, >> >>

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-03 Thread Pierre Joye
hi! On Wed, Oct 2, 2013 at 8:15 AM, Nikita Popov wrote: > On Wed, Oct 2, 2013 at 8:59 AM, Michael Wallner wrote: > >> Since ever people are confused by _GET and _POST superglobals, >> because, despite their name, they do not (really) depend on the >> request method. Therefor I propose to phase

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Johannes Schlüter
On Wed, 2013-10-02 at 19:59 +0200, Michael Wallner wrote: > On 2 October 2013 16:10, Johannes Schlüter wrote: > > On Wed, 2013-10-02 at 08:59 +0200, Michael Wallner wrote: > >> Since ever people are confused by _GET and _POST superglobals, > >> because, despite their name, they do not (really) dep

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Adam Harvey
> On 02.10.2013, at 10:59, Michael Wallner wrote: > >> Since ever people are confused by _GET and _POST superglobals, >> because, despite their name, they do not (really) depend on the >> request method. Therefor I propose to phase out $_GET and name it >> $_QUERY and I propose to phase out $_POS

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Nikita Popov
On Wed, Oct 2, 2013 at 8:02 PM, Michael Wallner wrote: > >> There are already parsers for application/x-www-form-urlencoded and > >> multipart/form-data in the core. One could think of providing an API > >> to add content type handlers from extensions, ext/json may be an > >> example, like it is

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Michael Wallner
On 2 October 2013 17:15, Nikita Popov wrote: > On Wed, Oct 2, 2013 at 8:59 AM, Michael Wallner wrote: >> >> Since ever people are confused by _GET and _POST superglobals, >> because, despite their name, they do not (really) depend on the >> request method. Therefor I propose to phase out $_GET a

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Michael Wallner
On 2 October 2013 16:10, Johannes Schlüter wrote: > On Wed, 2013-10-02 at 08:59 +0200, Michael Wallner wrote: >> Since ever people are confused by _GET and _POST superglobals, >> because, despite their name, they do not (really) depend on the >> request method. Therefor I propose to phase out $_G

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Dave
> Further, I propose to remove the POST method restriction for handling request bodies and solely rely on the content type to trigger the parser(s). (*) +1 This would solve the with parsing multi-form data with PUT requests (and possibly any future method types), thus enabling full REST support :)

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Nikita Popov
On Wed, Oct 2, 2013 at 8:59 AM, Michael Wallner wrote: > Since ever people are confused by _GET and _POST superglobals, > because, despite their name, they do not (really) depend on the > request method. Therefor I propose to phase out $_GET and name it > $_QUERY and I propose to phase out $_POS

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Johannes Schlüter
On Wed, 2013-10-02 at 08:59 +0200, Michael Wallner wrote: > Since ever people are confused by _GET and _POST superglobals, > because, despite their name, they do not (really) depend on the > request method. Therefor I propose to phase out $_GET and name it > $_QUERY and I propose to phase out $_PO

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Johannes Schlüter
On Wed, 2013-10-02 at 14:50 +0100, Andrea Faulds wrote: > > Le 2 octobre 2013 à 13:27, Michael Wallner a écrit : > > > > > > On 2 October 2013 13:12, Leigh wrote: > > > On 2 October 2013 07:59, Michael Wallner wrote: > > > > > > You certainly won't be able to remove $_GET / $_POST (implied by >

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Andrea Faulds
> Le 2 octobre 2013 à 13:27, Michael Wallner a écrit : > > > On 2 October 2013 13:12, Leigh wrote: > > On 2 October 2013 07:59, Michael Wallner wrote: > > > > You certainly won't be able to remove $_GET / $_POST (implied by > > "phase out") in any 5.x release, it's just too big of a BC break. >

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Michael Wallner
On 2 October 2013 13:12, Leigh wrote: > On 2 October 2013 07:59, Michael Wallner wrote: > >> I propose to phase out $_GET and name it $_QUERY and >> I propose to phase out $_POST and name it $_FORM > > I have to say I'm against this aspect of the proposal. While the names > may not be 100% accura

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Michael Wallner
On 2 October 2013 12:00, Andrea Faulds wrote: >> Le 2 octobre 2013 à 10:58, Michael Wallner a écrit : >> On 2 October 2013 11:56, Andrea Faulds wrote: >> > Backwards compatibility matters, so we should keep $_GET and $_POST but add >> > these as better aliases for them. >> >> That's why I said "

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Alexey Zakhlestin
On 02.10.2013, at 15:12, Leigh wrote: > On 2 October 2013 08:31, Michael Wallner wrote: >> >> I had it, but I'm not sure $_BODY fits either, because it should be an >> array. Currently only form data fits the purpose of de-serialisation >> of a request body. >> > > Not so sure about that. I

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Leigh
On 2 October 2013 07:59, Michael Wallner wrote: > I propose to phase out $_GET and name it $_QUERY and > I propose to phase out $_POST and name it $_FORM I have to say I'm against this aspect of the proposal. While the names may not be 100% accurate, _most_ people are used to their behaviour. Yo

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Andrea Faulds
> Le 2 octobre 2013 à 10:58, Michael Wallner a écrit : > On 2 October 2013 11:56, Andrea Faulds wrote: > > Backwards compatibility matters, so we should keep $_GET and $_POST but add > > these as better aliases for them. > > That's why I said "phase out"... or is it a german anglicism? It's not.

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Andrea Faulds
> Le 2 octobre 2013 à 07:59, Michael Wallner a écrit : > > Since ever people are confused by _GET and _POST superglobals, > because, despite their name, they do not (really) depend on the > request method.  Therefor I propose to phase out $_GET and name it > $_QUERY and I propose to phase out $_PO

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Alexey Zakhlestin
On 02.10.2013, at 11:24, Michael Wallner wrote: > On 2 October 2013 09:17, Alexey Zakhlestin wrote: > >> 3. expose body-parsers via php-level API >> >> +1. Hell, yes! Something like +1000, actually ;) > > Uhmmm... I actually meant an interal API not userland :) well, why not both? :) stri

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Michael Wallner
On 2 October 2013 09:25, Jannik Zschiesche wrote: > Hi, > > wouldn’t $_BODY be better - since it is the request body? > $_FORM is imho not very clear, since you can send data to $_POST without > using a form. I had it, but I'm not sure $_BODY fits either, because it should be an array. Currently

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Jannik Zschiesche
Hi, wouldn’t $_BODY be better - since it is the request body? $_FORM is imho not very clear, since you can send data to $_POST without using a form. -- Cheers Jannik Am Mittwoch, 2. Oktober 2013 um 09:17 schrieb Alexey Zakhlestin: > > On 02.10.2013, at 10:59, Michael Wallner mailto:m...@

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Michael Wallner
On 2 October 2013 09:17, Alexey Zakhlestin wrote: > 3. expose body-parsers via php-level API > > +1. Hell, yes! Something like +1000, actually ;) Uhmmm... I actually meant an interal API not userland :) -- Regards, Mike -- PHP Internals - PHP Runtime Development Mailing List To unsubscrib

Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Alexey Zakhlestin
On 02.10.2013, at 10:59, Michael Wallner wrote: > Since ever people are confused by _GET and _POST superglobals, > because, despite their name, they do not (really) depend on the > request method. Therefor I propose to phase out $_GET and name it > $_QUERY and I propose to phase out $_POST and