Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129299 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 D3F931A00BC for ; Wed, 19 Nov 2025 11:56:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1763553382; bh=k4kOnIHXjG6kn/7srwMSfay5xugPmNDws4+LPWyJTiQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=TmotEtZl4VEG5IiW5K4PS1g/fDnq0wS6g+SbTYZqmW2y7RW1annba7u2JTGiX/Lmf 8mhkpyPuQ7uGgdrak8j46Rah1XFImVXSDcfFbI/4vxOWpk+4QanTHJquRXKu+toVfG p3flQMH3Go4tC7VO4CuTK/OSG2XCPYtNdAeBmfTtAl1SbU8C749UWo++jNXuXCpU2k jEmmSo43GsCAAOY935E/k8jrXFUErE6VzfWV15pnbl4Pmq/J+2S0W9SM/3hBiYAyXC 37CLoNM4QIP948BKNLJtErcj6mJdpz87xiYetjATaPWROZyLfuIGXtynEewtltDIfc N84NdyddvgV5A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 27AB31801E1 for ; Wed, 19 Nov 2025 11:56:20 +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=1.8 required=5.0 tests=BAYES_50,DMARC_NONE, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-oa1-f54.google.com (mail-oa1-f54.google.com [209.85.160.54]) (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 11:56:15 +0000 (UTC) Received: by mail-oa1-f54.google.com with SMTP id 586e51a60fabf-3e3dac349easo3918061fac.2 for ; Wed, 19 Nov 2025 03:56:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763553370; x=1764158170; h=cc: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=k4kOnIHXjG6kn/7srwMSfay5xugPmNDws4+LPWyJTiQ=; b=m+zJ5f5tDDdOWg35lQ5Ugj9WRyfAlOhBqpC28P3EL02Yl0Zw2483s9DhxTPl0Se1No 7sq5Q80qQnaJYzRtcQIq5OHRkwCbD5hAEMT3/2cV/WgAqmEu7haPt6D66eTSL23SOyGm h95+fKoPwGtJnh84APw0cjq/4yNGDjtlgF5czsEwpINF2iZOh6bibIqck57UmhIO2nIF A3scQMYUiKbD6FPdWF8vshtplCZ2T6/ay8C9lXcL6qUr3V3K3UokNyhAfR+t7/Aq0mPj Dq1lWyTLqkHdzycpy6HM3EGzE4RCq775j/t5/KU/EX9LgbPf55DA5+SP5MbpWyrIr8Jg hvVw== X-Forwarded-Encrypted: i=1; AJvYcCWRixd91q2SVJkRZWkmt300jUdkIchISg6eWnZN1JAWlnvNY/OQ9nJZNsAljvPAoXfeQFfhz80YRBY=@lists.php.net X-Gm-Message-State: AOJu0YyBF5zFxfi3LYJDTnpzCOuIUsBDwUFeIIai9aDIS+nkUsrE0yNn gQVywTv2iO58zYuyJeE2JZTjFGTEspB81vRM3RkSEd0mgJtKb/hIZWwkQTHOK4X64OfkXPeqAli jnSiKbVQOmyptWVjsC4eAEsFuCqUK8zc= X-Gm-Gg: ASbGncu48oGxDkl8TqUdpBdmC9JJi1AcTyOM7A2NRyPQcbG2MgmHZdhyMmybMwZaFjT Sz7rt0F1Jspzd6rD/QdN8VumcJuS/CCK9S96f8VSb5dfbK7xXVEP04SYdbspHDsDKlyw/1sz2gr 6e9szAw2NLKSMp/DHawzEF3JEGySdFSKhyVCtJ3bsBNyi0cpbP5RyPN5iO9giL+lrD82OOU/DbZ m8C0Lq7FiJNo1te0vxhsyObtSp31wImZvTop9MEz/eN0lv17ibQJhdYH/fY5511FjZ7iA== X-Google-Smtp-Source: AGHT+IHcNJXxyNPjyBB6RAjJCuGgzzyzIjeK2oqaWahEgn245JJjd1613Y8tHaAGeQuZ26vyDrbDJdJX2a2PplzeIrU= X-Received: by 2002:a05:6870:41d0:b0:3d3:4338:bbab with SMTP id 586e51a60fabf-3e868efabe9mr7625212fac.18.1763553370079; Wed, 19 Nov 2025 03:56:10 -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 12:55:58 +0100 X-Gm-Features: AWmQ_bkX2eR1uSgOhT7ih_VoUST9c3Nw9GX41eNiOnqluNzRXp5kTDmz36Jqjxo Message-ID: Subject: Re: [PHP-DEV] [RFC] Stream Error Handling Improvements To: Lynn Cc: ignace nyamagana butera , PHP Internals List Content-Type: multipart/alternative; boundary="0000000000002a86fd0643f144f8" From: bukka@php.net (Jakub Zelenka) --0000000000002a86fd0643f144f8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Wed, Nov 19, 2025 at 10:57=E2=80=AFAM Lynn wrote: > > > On Wed, Nov 19, 2025 at 10:48=E2=80=AFAM ignace nyamagana butera < > nyamsprod@gmail.com> wrote: > >> >> 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 w= rote: >>> >>>> Hello, >>>> >>>> I would like to introduce a new stream error handling RFC that is part >>>> of my stream evolution work (PHP Foundation project funded by Sovereig= n >>>> 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. After reading = the >>> explanation "Terminal errors are those that prevent an operation from >>> completing (e.g., file not found, permission denied). Non-terminal erro= rs >>> 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 "operationBlocke= d" >>> 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 explanator= y >> 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 >> > > I ended up removing this from my first reply, but an enum was also what I > thought of as it wouldn't surprise me if a 3rd state could be introduced: > fully prevented, fully executed but with warnings, and partially executed > like a buffer truncation. I just don't know enough about the underlying > errors/warnings to suggest this as alternative implementation. > I don't think we will add another state. The enum based approach seems most reasonable to me. I should also change the name terminal / non terminal to terminating / non terminating as I think that's the correct name for this..= . Cheers, Jakub --0000000000002a86fd0643f144f8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

On Wed, Nov 19, 2025 at 10:5= 7=E2=80=AFAM Lynn <kjarli@gmail.com<= /a>> wrote:
<= div dir=3D"ltr">



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


On Tue, Nov 18, 2025= at 7:40=E2=80=AFPM Jakub Zelenka <bukka@php.net> wrote:
Hello,

I would like to i= ntroduce a new stream error handling RFC that is part of my stream evolutio= n work (PHP Foundation project funded by Sovereign Tech Fund) :

https://wi= ki.php.net/rfc/stream_errors

Kind regards,

Jakub

=

The naming of "terminal&q= uot; is a little confusing to me. Reading the name with a bool made me thin= k it was whether or not the CLI was being used, which made little sense in = the context of stream errors. After reading the 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, pe= rhaps something like "operationBlocked" or "operationPrevent= ed".


I believe these types of issues can be resolved by replacing bo= olean values by Enums, hence my suggestion. Enum would be more self explana= tory and would provide better insight on the outcome. I also like Jordi'= ;s suggestion,=C2=A0anything that can help static analysis is the way=C2=A0= to go IMHO.

Best regards,
Ignace=C2=A0

I ended up removing this f= rom my first reply, but an enum was also what I thought of as it wouldn'= ;t surprise me if a 3rd state could be introduced: fully prevented, fully e= xecuted but with warnings, and partially executed like a buffer truncation.= I just don't know enough about the underlying errors/warnings to sugge= st this as alternative implementation.
<= br>
I don't think we will add another state. The enum based a= pproach seems most reasonable to me. I should also change the name terminal= / non terminal to terminating / non terminating as I think that's the = correct name for this...

Cheers,

Jakub
--0000000000002a86fd0643f144f8--