Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120707 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 37925 invoked from network); 28 Jun 2023 06:18:52 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 28 Jun 2023 06:18:52 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EAE6B1804B0 for ; Tue, 27 Jun 2023 23:18:51 -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.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,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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-yw1-f180.google.com (mail-yw1-f180.google.com [209.85.128.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 27 Jun 2023 23:18:51 -0700 (PDT) Received: by mail-yw1-f180.google.com with SMTP id 00721157ae682-5701e8f2b79so57837247b3.0 for ; Tue, 27 Jun 2023 23:18:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687933131; x=1690525131; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=+DHa0vrLoGBiDcpixjhXy4+Kf+dYkMbQYowikLQSFvs=; b=DbeL05lbTNTyBbDbQUT0WSZrIoqhJBwUgln0Epm3Lz0DSApQQ8fCsCpCwt1V/OHqBK 5FyRB8g+G/yqMMKtGmQWlT3lWMItp8WzCmL+kZTV+YhXBie8dnLPY9yN8SOR5Va+VBg3 F0PWQPGTID9tBEhCNz1NVT2X280uBhZOeRDW2cTaj6TodM8dvHECPcxdG0FGrIkLUB64 o7YGm8DIgPDGHxYCqwYqXrPSfMcsIm+wb6FbidtdWeDLVIhTZ3NUVlmH6pgSwLYEInxv 72Fu1XBkL2VWf+75ZXrxsvPWbgK/jjkdDYf/hWbrIk0dhj7FYTNYq7w4FuwfgKgI4DYv laRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687933131; x=1690525131; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+DHa0vrLoGBiDcpixjhXy4+Kf+dYkMbQYowikLQSFvs=; b=euWFtHepwWpM8sDC1HflSejOrundB/h8ICcagauyOSe+Nc5E7nzmMcF0YQyfNMiyrO h5uauN0sDGWO/B6yZezycERUvMiGWGbG3x+RdIgAjg/ca9fKrEGk0zvhoVGW6B6nXLqM yoerCu0iir+IFIbP3BnHwMFxQgIEsUegttbSMqLKLS6AiLDQ6xJbT9sMN6eg1mIbdNrq kQlX0ZfRx7fW1sYDff5PDbINnG/6Sq7goRsgOkb6eCzwzRh9SxeUn3xHfxx5A8SnpzCu 4P0jko3V8IjPaGgYqZDEZa8RF7o01Dnrcm+zooduXx+UFHQVudkCXFKg7gBMuaXMqdoO tjig== X-Gm-Message-State: AC+VfDzynPEfpBGvUUhnKERnXajBz0I0CEc2Y4tsMbBDLhIJtWMUlqZc c9r1ivsjDnKnaZEg6b9g/ulzufSyWI6xLAkQ32NacN7lSJ0QKA== X-Google-Smtp-Source: ACHHUZ7fKAUCW1AH9+sLqWJ5x7ggyY/F3BGEU5tJ1ucl5CYiKRFwgTGRXF/vCLGcXOnVQUNDw853CYhUO6Idg308FeM= X-Received: by 2002:a81:6ac6:0:b0:56c:f6b5:a26d with SMTP id f189-20020a816ac6000000b0056cf6b5a26dmr34259150ywc.39.1687933130805; Tue, 27 Jun 2023 23:18:50 -0700 (PDT) MIME-Version: 1.0 References: <15D6E65D-97E3-4F82-8C8A-B8C1FB22D972@benramsey.com> <8FB3E9E9-7240-45BE-B060-C4ACCEDFDC50@koalephant.com> <06cefa3c-a314-415a-9f69-619ddc24b72d@app.fastmail.com> In-Reply-To: Date: Wed, 28 Jun 2023 08:18:37 +0200 Message-ID: To: Andreas Heigl Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000aa949205ff2a8e71" Subject: Re: [PHP-DEV] RFC1867 (multipart/form-data) PUT requests From: michal.brzuchalski@gmail.com (=?UTF-8?Q?Micha=C5=82_Marcin_Brzuchalski?=) --000000000000aa949205ff2a8e71 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Andreas, =C5=9Br., 28 cze 2023 o 07:55 Andreas Heigl napisa=C5= =82(a): > ... > While I like not adding more Superglobals, it seems like we are adding > more and more functions to retrieve the different parts of a > Request-Object... > > So when we are at it: Why don't we introduce exactly that? A > Request-Object that has all the methods. And which is immutable. > > And one method `request(): \Request` > I agree with the above, this would allow us to clean up the global namespace in the future. My personal use cases for PHP are mostly queue workers/event stream consumers, so the usual request/response model SAPI is used rarely. But I understand that it's not the most used case. Adding a couple of additional functions to a set of already ones just adds more symbols not always used. Ideally, I'd see an HTTP module in the future enabled in request/response-oriented SAPI but that's a different story. > > I deliberately didn't call it `getRequest` (or `get_request`) to not > confuse people why there isn't also a `post_request` or `put_request` or > ... you get the picture) > > One additional function in global namespace and then we can use one of > the request-objects that are already out in the wild. I don't think > there's a need to invent the wheel again. > > The advantage might be that no matter how many calls to `request()` you > will always get the same result. The Request as it came in. > That sounds like a use for a const?! Just my .50=E2=82=AC Cheers, Micha=C5=82 Marcin Brzuchalski --000000000000aa949205ff2a8e71--