Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108996 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 26145 invoked from network); 12 Mar 2020 16:12:02 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Mar 2020 16:12:02 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 421CC18055A for ; Thu, 12 Mar 2020 07:33:28 -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.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS29169 217.70.176.0/20 X-Spam-Virus: No X-Envelope-From: Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (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, 12 Mar 2020 07:33:27 -0700 (PDT) X-Originating-IP: 107.223.28.39 Received: from samurai.attlocal.net (107-223-28-39.lightspeed.nsvltn.sbcglobal.net [107.223.28.39]) (Authenticated sender: pmjones@pmjones.io) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 62A106001E for ; Thu, 12 Mar 2020 14:33:24 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Date: Thu, 12 Mar 2020 09:33:23 -0500 References: <50BD013E-CF72-414C-BBC0-A7A2E45CBDDB@pmjones.io> To: PHP Internals In-Reply-To: Message-ID: X-Mailer: Apple Mail (2.3608.60.0.2.5) Subject: Re: [PHP-DEV] RFC: Server-Side Request and Response Objects (v2) From: pmjones@pmjones.io ("Paul M. Jones") Hi all, > On Mar 11, 2020, at 11:36, Paul M. Jones wrote: >=20 > Conversation on this RFC seems to have diminished. As far as I know, I = have answered all criticisms/concerns/complaints one way or another. FWIW, I have updated the Q&A points based on new discussion over the = past day or so. The updated points are: Q: The proposal compares and contrasts with HttpFoundation and the = various PSR-7 implementations; how does it compare to other projects? A: See this message for a starting point: = https://externals.io/message/108436#108889. In short, the proposed = functionality is representative of functionality common to the = dozen-plus researched projects. Q: Are these global single-instance objects? A: No, you can create as many instances as you like, in whatever scopes = you like. Q: Do these objects replace the superglobals? A: No. Q: Do these objects deal with $_SESSION and the session functions? A: No; it is explicitly out of scope for this RFC. Q: Readonly properties are unusual for PHP. A: Granted, though not unheard of. PdoStatement::$queryString is one = precedent here. Further, of the researched userland projects, more than = half of them present the relevant superglobals as nominally readonly in = the public scope, making readonly access a reasonable choice here. Q: Why is ServerRequest readonly, and ServerResponse mutable? A: It makes sense that you would not want to change what you have = received as a request; however, as you are in charge of creating the = response, modifying it as needed seems reasonable. Further, the = =E2=80=9Creadonly request with mutable response=E2=80=9D matches half or = more of the researched userland projects. Q: What would a migration path look like? A: Something like the one outlined in the later portion of this message: = https://externals.io/message/108436#108893 --=20 Paul M. Jones pmjones@pmjones.io http://paul-m-jones.com Modernizing Legacy Applications in PHP https://leanpub.com/mlaphp Solving the N+1 Problem in PHP https://leanpub.com/sn1php