Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129295 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 7D6E41A00BC for ; Wed, 19 Nov 2025 09:48:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1763545744; bh=EpFxbkHoU47VI/ocBecJ4AF/KaMTY76w/BlyIxa3c08=; h=References:In-Reply-To:From:Date:Subject:To:From; b=iIP89w55yliYj9enFbK4oYRxiPmrCyMIaF5OkBWyNWJ2GnGf0Z1lCSOc16x0E7YM8 0uvvHHla4WZvIlTezbBLIYjjAobLBcQCxE/sqL8Ckx6j/zr0W6XSbffjR/cpHcc482 89jdm7PnamyCJhiG89lvJXLRKF4qYb427VY3p6h4yGFvCD9hD6goK3kEddYpLPNV2P BEyfo7uzyiiJ7Mehml5LumSYURrV+5ZSV/KKWoDONmlqAlv2D98oEffiUNBhH3JqZc hB+fjp47Qo6aFqicTp/VFacDnoKqO14Hl2/MpFigl/M0ASqZbSNZgALTI7rnyNOFpO KH0+fI165OweQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8141A18003E for ; Wed, 19 Nov 2025 09:49:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-io1-f48.google.com (mail-io1-f48.google.com [209.85.166.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 19 Nov 2025 09:49:03 +0000 (UTC) Received: by mail-io1-f48.google.com with SMTP id ca18e2360f4ac-92aee734585so254754439f.3 for ; Wed, 19 Nov 2025 01:48:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763545738; x=1764150538; darn=lists.php.net; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=EpFxbkHoU47VI/ocBecJ4AF/KaMTY76w/BlyIxa3c08=; b=dRAz096BpfDsw/9Msp9YxDnH0pqh6Dcy7Y9XmAcEaRXhbfcndqXJWHfwOeJUu0o6r4 1pzl5tf15X993bb2PzSjD0aE6l0JKG0CrWCUepc58NDy7Qf/qwWp+MO/CCtVkKZUeYm7 FhicgOogtTYwIl9Er6kWSCPfrJQyTUcSF+SMOcQS8zBu2JZ5lWqQZ2GnExoZYkUDG+N0 mONv1BN9xDesOgQB/d6kljdetdrOqdS9AA7TuU24R5dj0e4wCp6n3MZNAuG3ZRHuysUi s/2IyH8a29cjvfX4oBBW9yTbFcm78oRu04fyTMBDHxXK2/7CEWt+V+EeHG4kGJA3oJPG VzOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763545738; x=1764150538; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EpFxbkHoU47VI/ocBecJ4AF/KaMTY76w/BlyIxa3c08=; b=h6+zNaYczmsUotMe3hAA9hCxJVtx2+vKCAxqKVl2reYhvF/j3nsB8uBGpRvN2G2Fvm SCHbJE6N14rVWxs8no7dcW40N3evPhViBf5FwVAFD/s1Ua2Abx2V3H8XpvCWVJ9+JDI5 /3gBlC2RD8ANYmtvTYl3z8HvCzslW2iFVzszBumOHtDbPplAgOx6RQInGekX0y+TLw/4 2lN7iXJAfaFh7x2ej4s+tK5ZzOsbH/mSvI1D+yrDyuR54K6o1iDKANv4mWE6g81f4jjG WqtA9sXbjVpGk9heUPzSZ7Hdu8J4GXTJeV2E72Uhp2dymRQGKNYDO9GuTcQgv8UXKAcM NmLQ== X-Forwarded-Encrypted: i=1; AJvYcCXeRVgP9rxJ5t9twb4RixhehwBzLXuAa936Ffp77PwBG/7XjZeWvqFxlJ5eIjazQ3K6f48koGBohlE=@lists.php.net X-Gm-Message-State: AOJu0YyxUabg+ZLL+eqCHpZwBEygo4MRzfpiFgyZyrR+tgZeAUd0R4K2 oPJvVATKXwaX8A9XWYcmvnj+GlpjCkN7+fCmCAYlLNS6zgWlAOu6A+Xb/X0oWbckKcuZ0egoSyI kXmHgZWo8vonsYckxAjuHLptXEQ7XzJI= X-Gm-Gg: ASbGncsw0y2m86CIkY/4qnkN6d2QgliY6Un6pVB4NSKHzWJOqMqJsT//cg7MfLXsIsS dVQWzUAzH1HRr6y76izsmBQirQdBeaZwqsPQt0sKVawPfgFzx0o1OCZOzVPy2GxSweAmlYQ1WvQ v8SXj3J/utzeSVI4OuHZCrUqHsiJNGAqGaH7MC546CEkz+9gwMjsG6G4GOPi37riVaBB7cdgDU2 LN4EaG3FisGvVo1NpPartkERbtJ108G61gzoAs2Efqma+ED1eGfHEiwEEzvhu+DKXx7qOzm9TnK VVeuLzxkSfEchtWsqB+RV20SN3hvmH5BJNmXXg34 X-Google-Smtp-Source: AGHT+IG5r0oatEDSqolIp/ttw4APWdlDdtIvf82t9jtZ2DxNeJhGiEIIKWKxwIyzSO9l8jDYwuczcNTHPsqH6S14Qs4= X-Received: by 2002:a05:6638:6a04:b0:5b7:c1af:a6d0 with SMTP id 8926c6da1cb9f-5b7c9c89a9dmr12014789173.7.1763545737662; Wed, 19 Nov 2025 01:48:57 -0800 (PST) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 19 Nov 2025 10:48:46 +0100 X-Gm-Features: AWmQ_bnIPRRk00NC8vBDM5CaIB19yNRJ5ffoxTLngKKpzqUGPjD4EOi0kO2Y408 Message-ID: Subject: Re: [PHP-DEV] [RFC] Stream Error Handling Improvements To: Lynn , PHP Internals List Content-Type: multipart/alternative; boundary="0000000000003d15100643ef7dbe" From: nyamsprod@gmail.com (ignace nyamagana butera) --0000000000003d15100643ef7dbe Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Nov 19, 2025 at 10:45=E2=80=AFAM Lynn wrote: > > > On Tue, Nov 18, 2025 at 7:40=E2=80=AFPM Jakub Zelenka wro= te: > >> Hello, >> >> I would like to introduce a new stream error handling RFC that is part o= f >> my stream evolution work (PHP Foundation project funded by Sovereign Tec= h >> Fund) : >> >> https://wiki.php.net/rfc/stream_errors >> >> Kind regards, >> >> Jakub >> >> > The naming of "terminal" is a little confusing to me. Reading the name > with a bool made me think it was whether or not the CLI was being used, > which made little sense in the context of stream errors. After reading th= e > explanation "Terminal errors are those that prevent an operation from > completing (e.g., file not found, permission denied). Non-terminal errors > are warnings or notices that don't stop execution (e.g., buffer > truncation).", I feel like it might be more clear if this property was > named after what the result is, perhaps something like "operationBlocked" > or "operationPrevented". > I believe these types of issues can be resolved by replacing boolean values by Enums, hence my suggestion. Enum would be more self explanatory and would provide better insight on the outcome. I also like Jordi's suggestion, anything that can help static analysis is the way to go IMHO. Best regards, Ignace --0000000000003d15100643ef7dbe Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Wed, Nov 19, 2025 at 10:45=E2=80=AFAM L= ynn <kjarli@gmail.com> wrote:=


On Tue, Nov 18, 2025 at 7:40=E2=80=AFPM Jakub Zelenk= a <bukka@php.net&= gt; wrote:
Hello,

I would like to introduce a new stream error hand= ling RFC that is part of my stream evolution work (PHP Foundation project f= unded by Sovereign Tech Fund) :

https://wiki.php.net/rfc/stream_errors=

Kind regards,

Jakub

The naming of "terminal" is a little confusing to me= . Reading the name with a bool made me think it was whether or not the CLI = was being used, which made little sense in the context of stream errors. Af= ter reading the explanation "Terminal errors are those that prevent an= operation from completing (e.g., file not found, permission denied). Non-t= erminal errors are warnings or notices that don't stop execution (e.g.,= buffer truncation).", I feel like it might be more clear if this prop= erty was named after what the result is, perhaps something like "opera= tionBlocked" or "operationPrevented".


I believe these type= s of issues can be resolved by replacing boolean values by Enums, hence my = suggestion. Enum would be more self explanatory and would provide better in= sight on the outcome. I also like Jordi's suggestion,=C2=A0anything tha= t can help static analysis is the way=C2=A0to go IMHO.

B= est regards,
Ignace=C2=A0
--0000000000003d15100643ef7dbe--