Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97530 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57768 invoked from network); 6 Jan 2017 16:56:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jan 2017 16:56:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=pthreads@pthreads.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=pthreads@pthreads.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pthreads.org from 74.125.82.44 cause and error) X-PHP-List-Original-Sender: pthreads@pthreads.org X-Host-Fingerprint: 74.125.82.44 mail-wm0-f44.google.com Received: from [74.125.82.44] ([74.125.82.44:38867] helo=mail-wm0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DA/65-23307-D3CCF685 for ; Fri, 06 Jan 2017 11:56:30 -0500 Received: by mail-wm0-f44.google.com with SMTP id k184so37935142wme.1 for ; Fri, 06 Jan 2017 08:56:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pthreads-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=xVVhCJlU/VIFI9omCskc/AybKaCBSjOcNSP8EKjE9C8=; b=Wnd+687zPb/hFrncllo1fsQDA5kovzokIRWtlpKajtdbJ5pZNY0bW6lz+mqDEFV5tE gAwf1520YuImzvnNXmmx5Ft8nNPy2Czw9iQZXoE6VRUIGKUEcDL49g5mr7YMeNCazE4u n4UGV0oCJcSWvA2DVyg+dE08166C8rETq1EiQTKYqPqjY6V/d2azzXgYT3TCa1huJHZH SklgxUHBVFUDwJHoxisCla65t28TpaN9AZOZAN7Jj32lrYjgdqF+Qo1KBBVGmHT39lPh S9+Pd4pqB/ToQQ73C9bdYmDOaUCgkaHjZrLIRa3TVKc1pmUOkOdUrFkajrJMhkYr3JJq Yp6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xVVhCJlU/VIFI9omCskc/AybKaCBSjOcNSP8EKjE9C8=; b=mlRNPYTycdCy3AX1Y9UwMRWLZ/7qHlZBXEnt2iUTtujk0BPegfMvMcAes9H1hffZR1 a2KPNzE2asDB9bC/bQ21VxI92m1Nel0HG6nzPeOXflJXwDiBcZQZMLXnsf0U/gmUxoZ8 U4DF1jrfrGDFP2+9K5hTrO2Us9P3KxjKMKNnqfUbNHfejE2Pg/yw18QwXpd7VgU9nYmK T/s+Mamaqo9enGSYB9wHbqaBtmv+1ZwRzb5lELjXJ67wZeR5xBAO8+7OekZ5KPGOFqsP 7+zUOzb/tG3cpf7uPvbJYTbgijE/Ij33AC53t6W7VrLEL1s5a5PQjRzYS8EndHiuNfWg 6jQg== X-Gm-Message-State: AIkVDXJs1/pcYnSiOYMvHAjkFUfc+SmQ0Xx6FwWIk6coDnr7WMOC1Q6t/b3YQTY+1tXnHUjsIC1kGO+s4cuLCg== X-Received: by 10.28.9.80 with SMTP id 77mr4358289wmj.68.1483721786528; Fri, 06 Jan 2017 08:56:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.176.4 with HTTP; Fri, 6 Jan 2017 08:56:25 -0800 (PST) X-Originating-IP: [86.178.168.203] In-Reply-To: References: <0D388F9E-98FA-4C1F-95FA-759C4D4731C6@gmail.com> <2A.04.04761.F9A9D585@pb1.pair.com> <2017010414120739532-pmjones88@gmail.com> Date: Fri, 6 Jan 2017 16:56:25 +0000 Message-ID: To: Marco Pivetta Cc: Paul Jones , PHP Internals List Content-Type: multipart/alternative; boundary=001a11444da808457405456fe6d0 Subject: Re: [PHP-DEV] Re: [RFC] ServerRequest and ServerResponse objects From: pthreads@pthreads.org (Joe Watkins) --001a11444da808457405456fe6d0 Content-Type: text/plain; charset=UTF-8 Afternoon Paul, Indeed there was a huge glitch ... everywhere ... Leap seconds, and goblins are worth considering, but also, the mail server recently switched software. Since there seems to be links getting through now, I think we are through the storm ... although nobody has directly told me that. It would be safe to assume the only people that recv'd comms have replied already. It may be that you need to leave it two weeks from about now, to be on the safe side. I'm sure that's not too different from what you were planning anyway. Cheers Joe [tag:ignore] http://news.php.net <- this is nonsense - me testing if this will be delivered. [tag:ignore] On Fri, Jan 6, 2017 at 4:47 PM, Marco Pivetta wrote: > Hi Paul, > > On 6 Jan 2017 3:19 p.m., "Paul Jones" wrote: > > Hi all, > > Today marks two weeks since this RFC was introduced. As I said at the > start, it's the holidays, so I expect to keep the discussion period open > for longer than two weeks, but I am surprised at how little discussion > there has been. > > I find it hard to imagine that all criticisms have been raised, and that > the remainder of the RFC is otherwise unobjectionable. So, if there are > further questions, please let me know! > > > As mentioned before, the fact that the RFC proposes *yet another* (XKCD > 927) request/response API simply increases fragmentation within the > ecosystem. > > This is not useful, especially now that a common interoperability interface > for request and response that works quite decently and is getting traction > (PSR-7) exists. > > Bundling the interface is no biggie, so I suggest steering away and going > that way, or else you are just adding API that everyone would just need to > build wasteful adapters for. > > There are several technical issues too: > > * A magic constructor that fetches data from global state: add a factory > for that, leave the constructor open for modifications or new instantiation > ways, or make it private. > * Magic read-only properties that go against the language semantics: make > 'em accessors, or do whatever you want, but don't invent new language > semantics just for your own extension. > * A series of non-exhaustive properties that give some "helper" API to see > if it's XHR or not, violating basic SRP. Are you abstracting a request or > what you want to do with the request? You can define separate utility > functions for that. Yes, functions. > * As per current API, I'd expect the ctor to throw an exception when used > outside the web SAPI context > * You use the *with* prefix for setting values, while you know exactly > that *with* was used to differentiate from a mutable and a non-mutable API > in the existing request abstractions: this makes things confusing again > * There's no interface for these classes, and they are not marked as > final, as far as I can see. This means that users will extend them (unwise > choice), and with that they will have a class with reflection bits in the > extension (extremely bad idea!). An interface and final are needed here. > > Anyway, this is just a partial review of what I got to read with a few > minutes of time, yet loads of issues are evident. > > I am obviously defensive and biased here, but if something new is being > designed for inclusion in php-src, and it has to reach millions of > developers, it better be *reeeeeealli* good. The issues above are just the > tip of the iceberg, and many developers obviously didn't use nor try this > extension so far. > > IMO needs another few design iterations, and a lot more adoption, in order > to become interesting. Orrrrr you provide us with a factory for an > implementation of these concepts that already has adoption, traction and > extremely careful design behind it. > > Greets, > > Marco Pivetta > --001a11444da808457405456fe6d0--