Hi,

To justify my "no" vote. I agree that it would be nice if PHP would provide
these objects out of the box, but there are some inconsistencies in the
object properties that made me oppose this. For instance, not all headers
are treated equally, while some become properties of the request object,
others must be accessed in the headers array. And the line that divides
them seems a bit arbitrary. For instance, CONTENT_MD5 gets special
treatment in this object while it was never special in the $_SERVER
superglobal. Some other values are missing like REQUEST_TIME (it's missing
at least from the proposal and the linked README). Finally, making
decisions like overwriting method if a HTTP_X_HTTP_METHOD_OVERRIDE header
is present seem too opinionated for an object that should be more agnostic.
It does make sense, but it hides away information from the user in an
attempt to be helpful.

In conclusion, I do think PHP should offer an OOP oriented way to deal with
requests and responses, but those objects should be more consistent and
less opinionated.

Regards,
Pedro

Reply via email to