Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109003 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 13670 invoked from network); 13 Mar 2020 20:19:00 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Mar 2020 20:19:00 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 143CA1804AB for ; Fri, 13 Mar 2020 11:40:42 -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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE 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-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (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 ; Fri, 13 Mar 2020 11:40:41 -0700 (PDT) Received: by mail-qt1-f173.google.com with SMTP id d22so8436806qtn.0 for ; Fri, 13 Mar 2020 11:40:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newclarity-net.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=5uphrCkQsWdBZvm2rPaJ50B4q+iO6+KsV6qQE0osJ7o=; b=VTywUOniMsqSAE447PHfB0w0m7z7mhwC+MW8gymRnogNQRk/zWMRIBNpCSJ/cTb4dz jFXLE/W3Fc6VQMh/0fsTCWPXu/D0+ysGkSOHkrDjX9BRLAN3oihL0Tv2qZ9IvL61zu1C lJ4IvQnXJbtSK4CS4yjk48hdsOBxq+j8jq7WSPn64JYvoMOLfDkQdKvNwkGAbc1S7i78 nX0Ec/hIuYJpNhoQof4AvSO349s6AU0zsPiDMslC76R2rWnrfpVDX8um1nG1fV48JlJj rbhgF1sJXJHD5FR0SN4sM0xVgi/sF9T4m5ZW8gPZQC4nilIdYShpUMbyStKljFRSC6z+ pHdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=5uphrCkQsWdBZvm2rPaJ50B4q+iO6+KsV6qQE0osJ7o=; b=bW0vVZOmhvONamQeAIECee9jSJNpGJvMhC58uqazbfM617ZS/HIB76bxv//3cVgnMC hdr7V+Xo0rvpSEc7OCx5JOXATMk+HQY9uzqy8wYPT7R+Wp9eU5vS9lB8aSVfl0EUrwkx YXaXaPFJolzJ92GUNAy0ATAfIEh59A0svY5wTadaUuabB41QNasY3f2HvUgFADviho2K yTYuBaxCTjDlCMG3iCqbpC+oMdx/24RmEsiJGwOvPz5mAIObnFyf+TSQu5ma/NDhhTJ2 B7x9YDhWFGs+5rkIWRZwCqp0xS6gRo1tnLNREj+i7Q02JHkP6tU2uBgdjqV73u7Z1E+/ OFDA== X-Gm-Message-State: ANhLgQ0vIzCym5wFWpy7pjmvpDHy0I7Yw3uVqkQy3trb4sS2YzxOiO2o Lt9ANAaeCOUtiY2w6MKUePBgi/0/4wzCog== X-Google-Smtp-Source: ADFU+vtORV3qOzRVRqmZ+PKeGLpG1akRAJDZCCEzk7d7y/OeLy60nn9rb07BCJCkVMx3dgk3x7wbwg== X-Received: by 2002:ac8:534c:: with SMTP id d12mr13803951qto.345.1584124838121; Fri, 13 Mar 2020 11:40:38 -0700 (PDT) Received: from ?IPv6:2601:c0:c680:5cc0:7893:a744:637c:91bf? ([2601:c0:c680:5cc0:7893:a744:637c:91bf]) by smtp.gmail.com with ESMTPSA id f13sm25477213qkm.42.2020.03.13.11.40.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Mar 2020 11:40:37 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) In-Reply-To: <102D234E-BC5D-42B2-ABC4-93980C1F76A4@pmjones.io> Date: Fri, 13 Mar 2020 14:40:36 -0400 Cc: Stephen Reay , PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: References: <50BD013E-CF72-414C-BBC0-A7A2E45CBDDB@pmjones.io> <0B40E6E5-342F-4D81-9CAA-A0C0739A7718@pmjones.io> <102D234E-BC5D-42B2-ABC4-93980C1F76A4@pmjones.io> To: "Paul M. Jones" X-Mailer: Apple Mail (2.3445.104.11) Subject: Re: [PHP-DEV] RFC: Server-Side Request and Response Objects (v2) From: mike@newclarity.net (Mike Schinkel) > On Mar 13, 2020, at 10:55 AM, Paul M. Jones = wrote: >=20 > One other alternative John & I contemplated was = `Web{Request,Response,ResponseSender}` -- do you think that might be a = reasonable alternative to HTTP, one that is "adjacent" but not = overly-specific? That would net us: >=20 > - WebRequest > - WebResponse > - WebResponseSender >=20 > I didn't like the look of it previously, and I don't think I like the = look of it now, but ... (/me shrugs). >=20 >=20 >> However, that also may be confusing if people expect it to be a = construct for making outgoing requests.=20 >=20 > Yes, that's another tricky bit in the naming -- making a distinction = between the objects as representative of client operations (send = request, receive response) and server operations (receive request, send = response). Thus the current `Server` prefix (however unsatisfactory it = may be) to indicate their operational context. >=20 > Your `Incoming` and `Outgoing` prefixes, minus the HTTP, would net us: >=20 > - IncomingRequest > - OutgoingResponse > - OutgoingResponseSender >=20 > I will need to ponder on those. >=20 >> The user land implementation I=E2=80=99ve been using =E2=80=99solves=E2= =80=99 this by using a `HTTP` namespace, and then provides `Request` and = `Response` (for an outgoing - i.e. curl - HTTP Request, and the = corresponding HTTP Response) objects and then `CurrentRequest` and = `CurrentResponse` for what your RFC proposes (i.e. the active request = made to php).=20 >=20 > Yes, userland does operate that way. However, I think adding an HTTP = namespace to PHP itself is something to be avoided, so emulating = userland here is not an option. >=20 >=20 >> As with anything any of us has written, I=E2=80=99m not 100% sold on = =E2=80=98Current{Request,Response}` even after writing it, but I think = it=E2=80=99s at least a little more specific about what they do, when = the namespace is taken into account. >=20 > `Current{...}` is not something we had previously considered; that = would net us, in the global namespace: >=20 > - CurrentRequest > - CurrentResponse > - CurrentResponseSender >=20 > I will need to ponder on those as well. >=20 > Any further thoughts or opinions on this, Stephen? Or from anyone = else? One issue that I have is, if we are going to fine-tune the naming to = make sure it matches *exactly* then I think that CurrentRequest->server = does not make sense. Maybe if you choose one of these names you should break out the = server-specific items into their own class/object? -Mike=