Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108860 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 28356 invoked from network); 5 Mar 2020 10:41:59 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 5 Mar 2020 10:41:59 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 36CC81804E6 for ; Thu, 5 Mar 2020 01:01:37 -0800 (PST) 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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-oi1-f170.google.com (mail-oi1-f170.google.com [209.85.167.170]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 5 Mar 2020 01:01:36 -0800 (PST) Received: by mail-oi1-f170.google.com with SMTP id l12so5203157oil.9 for ; Thu, 05 Mar 2020 01:01:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QcnPyTXB27tC2mmQTjKLP1tqWldY++GsZiu6lZbZnlM=; b=ICbZI9Ksypif2EOCWFbVxuif7HY11PluZs00f3gCnW6n8wiibhRa99DHrleNLNyqR9 CK07rpT18MeacpZn5tzuYUi1BtNiOqMtVDS+mudiBIikSybPmr+h7H88CjY4+iAdEdp0 fU2D61fVzSbyw3rttegGlA8t4HMhSEU1IWYU6lA4K1zvvNm0XWd0nixj2+vOca+IE0fe P7uEcVdc6g0Wqs+be6szWtSma0DJmf++Ela+yEFKS847FW4Iv255gjfNhoaniYsWLCUT cNgs9JIZ+CMJmS9V+2Yi5EFRBDk7mTxuM87K2ExbbZSAIfh/1CbEEuUKiMvOVBh9Q6bj w4fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QcnPyTXB27tC2mmQTjKLP1tqWldY++GsZiu6lZbZnlM=; b=sysdCJUZ6qL0OcAwjDUDeBTPWzf3lqk5xR/v3gWrpOrZrDu+Nfslo+bh7cBq+qg4Yj SMrFg855hQ4/AlnqetGMfKUgOJPJ6qQQmm3cMG94iOlXYYG+iE63T0h6xOsSzbB8xv3J zk24FilrEzgqGBjj3OwSKK7xYXbNEIicvlenulymefBzmjtNtEVUwalLPQQxRRnqQWd/ vBhR8yPpUaw28kZkhAj2A3WCeq5nfOhWdDR0QpFdkclp2M4zCaZALgNP2rrUIYtp9Pbw yWBPa2CIT7nWrNX8puKV5c1VFW7g30GoYxIPbQqOtocxqxMlnlTRjYSze/zIxFntgnAh 8AqQ== X-Gm-Message-State: ANhLgQ1koKnS4moiyiwRmwgAW8ZYfuG0Nx3Q+7cW4KGvsKltiFClOY2B io1gdYLUjIDmWOVGrycuklIIa6Ta X-Google-Smtp-Source: ADFU+vupGQhoSH1tkDErKfUdS0SmhwW7zWJNlfcXa7FS7I+SPK94KOdLt9ml7h8xb64GKtONjRdapg== X-Received: by 2002:aca:902:: with SMTP id 2mr3355723oij.88.1583398894197; Thu, 05 Mar 2020 01:01:34 -0800 (PST) Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com. [209.85.210.45]) by smtp.gmail.com with ESMTPSA id p5sm1217437otp.4.2020.03.05.01.01.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Mar 2020 01:01:33 -0800 (PST) Received: by mail-ot1-f45.google.com with SMTP id v19so4941604ote.8 for ; Thu, 05 Mar 2020 01:01:32 -0800 (PST) X-Received: by 2002:a05:6830:1313:: with SMTP id p19mr5883198otq.126.1583398892441; Thu, 05 Mar 2020 01:01:32 -0800 (PST) MIME-Version: 1.0 References: <50BD013E-CF72-414C-BBC0-A7A2E45CBDDB@pmjones.io> <1657AB79-5CAF-4BCA-96B5-1343EC703CCD@pmjones.io> In-Reply-To: <1657AB79-5CAF-4BCA-96B5-1343EC703CCD@pmjones.io> Date: Thu, 5 Mar 2020 09:00:56 +0000 X-Gmail-Original-Message-ID: Message-ID: To: "Paul M. Jones" Cc: php internals Content-Type: multipart/alternative; boundary="00000000000085a7ae05a017c842" Subject: Re: [PHP-DEV] RFC: Server-Side Request and Response Objects (v2) From: phpmailinglists@gmail.com (Peter Bowyer) --00000000000085a7ae05a017c842 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 28 Feb 2020 at 15:25, Paul M. Jones wrote: > Are there any members here who currently expect to vote "no", who have no= t > yet chimed in? I'd like to hear your criticisms and objections, so I can = at > least attempt to resolve your concerns. > I expect to vote "no". My thoughts are: 1. The chosen API. We have an OO approach, but headers and query parameters are accessed through an array-style mechanism. I'm not a fan of the way everything maps onto ServerRequest, with certain $_SERVER vars promoted to be part of it (but not all AFAICT). 2. The OO-ish approach. For a core feature which will be around for 20+ years I would like a pure(r) OO approach taken, and time to be taken to get that right. What you have is pragmatic, but as I say in (1) not something I'm a fan of. Rowan Tommins on 18 Feb 2020 at 20:21 expressed this well (link: https://externals.io/message/108436#108661). 3. WRT the RFC: a) there is no section on where this came from. With your involvement in PSR-7 it looks to be an area you've given much thought to. Why did you develop ext/request? What problem(s) did you see that this is the answer to? I skimmed the thread but didn't pick out a clear answer to this. b) Did you look at how other languages and/or frameworks deal with requests and responses, and was there inspiration and lessons you took from their successes (or failures)? [For me this is a key omission in most PHP RFCs] Thinking about porting existing codebases across, ServerRequest holding copies rather than references would make it hard to interop with existing code using the superglobals. I've had this rewriting legacy apps that use $_SESSION and the new framework uses an OO session handler; it's not fun but with references can usually be made to work. In this case, what would the migration path look like? Johannes Schl=C3=BCter commented on this on 2= 4 Feb but I didn't understand his comment (link: https://externals.io/message/108436#108737). In summary, I like the idea of steering people away from superglobals, appreciate the work you've put in, and am not persuaded by the approach. Peter --00000000000085a7ae05a017c842--