Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109366 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 84718 invoked from network); 27 Mar 2020 00:57:54 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 27 Mar 2020 00:57:54 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7CC2B1804DD for ; Thu, 26 Mar 2020 16:22:55 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS20857 149.210.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from outbound1.mail.transip.nl (outbound1.mail.transip.nl [149.210.149.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 26 Mar 2020 16:22:54 -0700 (PDT) Received: from submission13.mail.transip.nl (unknown [10.103.8.164]) by outbound1.mail.transip.nl (Postfix) with ESMTP id 48pLcr2H8BzRjB1 for ; Fri, 27 Mar 2020 00:22:52 +0100 (CET) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by submission13.mail.transip.nl (Postfix) with ESMTPA id 48pLcp3mVSz1y2V for ; Fri, 27 Mar 2020 00:22:49 +0100 (CET) Received: by mail-wm1-f53.google.com with SMTP id z18so9538047wmk.2 for ; Thu, 26 Mar 2020 16:22:49 -0700 (PDT) X-Gm-Message-State: ANhLgQ1wWYNMs6dNh+Y19XJgga6mpLV8+oU2L5V9zzdx1ETIEvrUGtGL nYDDinKMdeGE10d4QV8O9bvGE86Y1jj7nixXcE8= X-Google-Smtp-Source: ADFU+vtElNTd0wBcU2OfiCorZUPJ5z3mPgyBV7H1ModnoGZwCEIsm5Owph+YECjMevsUguLcsNobkgPt4zwEDxMsxOQ= X-Received: by 2002:a7b:c8d0:: with SMTP id f16mr2507200wml.50.1585264966300; Thu, 26 Mar 2020 16:22:46 -0700 (PDT) MIME-Version: 1.0 References: <8B8A570A-545C-4CBF-9145-C9FC0B0E2AA1@pmjones.io> In-Reply-To: <8B8A570A-545C-4CBF-9145-C9FC0B0E2AA1@pmjones.io> Date: Thu, 26 Mar 2020 23:22:35 +0000 X-Gmail-Original-Message-ID: Message-ID: To: "Paul M. Jones" Cc: PHP Internals Content-Type: multipart/alternative; boundary="00000000000030fb2705a1ca43be" X-Scanned-By: ClueGetter at submission13.mail.transip.nl DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=transip-a; d=pmmaga.net; t=1585264972; h=from:subject:to:cc: references:in-reply-to:date:mime-version:content-type; bh=fS/THa9KDiPw8Hj1+C1k2BkGdfti8O0EC7JUgcKK3lc=; b=XPfKwEYNveE7YN4cJpc39DA0xFqAdJ4dbRNnKhE72DpyeNSaGd44MUX+gNC7bQATTXs1S0 lgqgf6VIKlWX4jmzLBTo6tfCf7Gi6c4TwURgdU0bm5qa/sWq0zzdVOsHfvNP/s0FwBtL6V PL64o8zSmQZA06AwQOhudhUf2kIonOzlpGmLU+I+eoLIGIK9AEi5ZPzkv0nt0dQtuJk2ns bftvrwpp5g3h6G3Yi11TBgzs4yR+7yYq74qjq/zTUHxDIrGHg0HjKo1KPqdlv+5sH0H0ta QnbXlVA+JZIUyiw/4NiKZVc1RXN+PGVKaF8zB3PtcuNpTYfNvgXaZ7eHrEcrog== X-Report-Abuse-To: abuse@transip.nl Subject: Re: [PHP-DEV] [VOTE] Server-Side Request and Response Objects (v2) From: mail@pmmaga.net (=?UTF-8?Q?Pedro_Magalh=C3=A3es?=) --00000000000030fb2705a1ca43be Content-Type: text/plain; charset="UTF-8" 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 --00000000000030fb2705a1ca43be--