Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129100 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 11E6A1A00BC for ; Wed, 5 Nov 2025 23:08:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1762384108; bh=bdLnEm6yK8g7skudtli+v4r5HG5Jtn02UplXjs9xaWc=; h=Date:Subject:To:References:From:In-Reply-To:From; b=GZxTu2OChPOrVjRIh5Ebet6lgu7fHvlzfKs7qA324QgFt1LsY33YpVJfat+xc5ifV G51dIW+ERlHdFCGHGD/OIhW+h5xOvnPm0QXYpTbis7cstnd32GtlVyBbVg6kPREaAo OK5iLhHpbaH9HstBwxmfldRLHurks0eRfH0CQYaPQ7O5TyShzVGi8cpR0C83EgCX6N r4Utu2qsITXLJunJ1emzROFthEHwxY0FjqKCAhGcXEgYUWASJtrVmJaxN9buLEfAlN MV7ow3yPbUJL52b9F3zyO7Z3mdHb5EXsHCNjS9cPZN2GQcx8HRRwysZdEthHV3wKSz zaOotTNL8dmvA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1D3EF18004F for ; Wed, 5 Nov 2025 23:08:28 +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=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-b7-smtp.messagingengine.com (fhigh-b7-smtp.messagingengine.com [202.12.124.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 5 Nov 2025 23:08:27 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id B6E547A01C1 for ; Wed, 5 Nov 2025 18:08:22 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Wed, 05 Nov 2025 18:08:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rwec.co.uk; h=cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1762384102; x=1762470502; bh=apb0wsMB/G xXIKuwNz5wetNepqlm5G6+3NfG2+Mifes=; b=ivXO7HAd6G6z8bkQjkgtGhGuV1 DH5T65Yg+hSBeFNAuY3kXzg6M66woljCNQvOiqiseY2s/3zb2fXsI8N4ihO7qbco e8UdmKyhq7zo1gjWTMqDnSwrCdqLUKszvoX6kjdhxeCwCTsZhkWAVZ89lY0Z6fdZ 09hyVcLoHhtcxs/Mt6p2ADjVIkUsK0F9t5EuJBzRFjJGdPze9SAtxAUaVi81DIn4 rrcdFnOKkLSLtuoympKqa6phZtYCoAnH79rmFKapcg7Bg3Itumo4edW+rQ9iOGxM r6ntoiXFQX3+vM5b3bYWWxFO54kqRB9bthTG0zU2FSd5OvMFhSaRByPngFDw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1762384102; x=1762470502; bh=apb0wsMB/GxXIKuwNz5wetNepqlm5G6+3Nf G2+Mifes=; b=viCn20YLiuycA3LqwZlX3kr56W0DOH4DChPUvHziR8lxKxMOiWg hJqTQtGwGs5uHtjE8y6t9MurAJ+OOROrU0CMKWTe9FqG4Wquh9TSZ3Qb5lhUr4w3 Nfd9OCgck9T/viTe8OlfWvSNfNnSY4zZATG6t5DfKHgFQEu/MR7X3L0Xjd7zxL46 /SxQsBf7MpWriSdS13bV68NBkzGBZiKcaXsTzxOS5oxOru3SMP/BhYBpyAdpOwtS +I8S8wR1bpCIX+seprbPKUyBxIoDSogcPre9CqR/456kDHaIgz+gZ6xRkeTb0Z3g 3n+HakZJh4W4ZH6o1JySRZrAOpv7orR4PQA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddukeehudekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpegtkfffgggfuffvfhfhjgesrgdtreertd dvjeenucfhrhhomhepfdftohifrghnucfvohhmmhhinhhsucglkffoufhorfgnfdcuoehi mhhsohhprdhphhhpsehrfigvtgdrtghordhukheqnecuggftrfgrthhtvghrnhepgefghf dvgeefueffteekkeelfeduvdegjeetudevveetgedvfeejleefgedtkeevnecuffhomhgr ihhnpehphhhprdhnvghtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepihhmshhophdrphhhphesrhifvggtrdgtohdruhhkpdhnsggprhgtphht thhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehinhhtvghrnhgrlhhsse hlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Wed, 5 Nov 2025 18:08:21 -0500 (EST) Content-Type: multipart/alternative; boundary="------------HwARPML0A6S0Q03rbZ049WLh" Message-ID: <1c5112c7-b3ea-46ab-8203-26a82fc07366@rwec.co.uk> Date: Wed, 5 Nov 2025 23:08:20 +0000 Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] [RFC] Context Managers Content-Language: en-GB To: internals@lists.php.net References: In-Reply-To: From: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") This is a multi-part message in MIME format. --------------HwARPML0A6S0Q03rbZ049WLh Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 04/11/2025 20:13, Larry Garfield wrote: > Arnaud and I would like to present another RFC for consideration: Context Managers. > > https://wiki.php.net/rfc/context-managers I haven't had a chance to read the RFC in detail yet, but am really pleased to see it. Ever since I read the description (and design rationale) for Python's implementation, I have been thinking this would be a useful addition to PHP. One small thing I noticed: you list "Generator decorator managers" in Future Scope, and while I agree that a magic attribute would need a bit of thought, including the "standard boilerplate class" under some suitable name seems worth considering. -- Rowan Tommins [IMSoP] --------------HwARPML0A6S0Q03rbZ049WLh Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
On 04/11/2025 20:13, Larry Garfield wrote:
Arnaud and I would like to present another RFC for consideration: Context Managers.

https://wiki.php.net/rfc/context-managers


I haven't had a chance to read the RFC in detail yet, but am really pleased to see it. Ever since I read the description (and design rationale) for Python's implementation, I have been thinking this would be a useful addition to PHP.

One small thing I noticed: you list "Generator decorator managers" in Future Scope, and while I agree that a magic attribute would need a bit of thought, including the "standard boilerplate class" under some suitable name seems worth considering.


-- 
Rowan Tommins
[IMSoP]
--------------HwARPML0A6S0Q03rbZ049WLh--