> On 31 Oct 2014, at 14:30, Sherif Ramadan <theanomaly...@gmail.com> wrote:
> 
> To be perfectly clear, the default behavior would remain the same, so no PHP 
> app you have ever written would break. The difference is, you would now be 
> able to override any part of the default behavior by extending the 
> HttpRequest class in your own code.

So there’s still a default implementation, then? So, if you want to parse in 
userland, how does that work? The default implementation fills in the variables 
and then your implementation parses it again, wasting CPU time and making the 
request take longer? Or does the default implementation do nothing at all 
unless asked to, breaking existing apps unless they’re modified to request 
parsing? Or is it INI-determined??

> The interfaces do exactly what you see here. They specified which methods the 
> HttpRequest and HttpResponse objects must implement.

OK. So they’re just interfaces, then? In which case, why not leave the PHP-FIG 
to finish its HTTP Message proposal instead?

> If you bothered to invest nearly as much time in reading the updates to the 
> RFC as you did to making blanket statements and objections, you might 
> actually find less reason to respond with objections so abruptly. The 
> HttpRequest and HttpResponse classes are intended to provide a central place 
> for message handling behaviors and their properties can be used to describe 
> these behaviors.
> 
> So, if you wanted to support a $_PUT superglobal, rather than adding one to 
> the language, you can simply add the behavior to do the processing of PUT 
> requests in your HttpRequest class, by extending HttpRequest and defining how 
> PUT variables are handled there.

So, all you’re proposing is a set of interfaces, to compete with the work the 
PHP-FIG is doing.

I don’t see how this is useful. How, exactly, does adding interfaces solve the 
problems with superglobals? Because you’re creating a common standard for 
alternative request implementations? But, we already have such a WIP standard 
in userland from the PSR people.

I really don’t get this RFC. If this was to add implementations of the PSR 
Request/Response stuff, that might be useful. But merely adding new interfaces… 
I don’t get it. Why duplicate effort? How does this fix superglobals?

--
Andrea Faulds
http://ajf.me/





--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to