Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127992 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 13FF01A00BC for ; Thu, 10 Jul 2025 11:44:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1752147786; bh=rGkFxEyUaNah2v/wcjtLHKwmBrAXbUbQWp2AIVzo+Dk=; h=Date:From:To:Subject:In-Reply-To:References:From; b=S8h7MN3sAv4D+UV77ZQq0prW22yNqsgY++q7qg8YyS9ixznxqi3SHDpSlhSJzoZj5 J8MImcLVTcAMloBBoUbzlFXMd598tmAx0cKDgwA7stz7QlASlu325DL2UIqyoAeI7Q 3Mg2TbDkzsbYjBNjOy8/45D5Ux4P5eC878O5ad8fvhDV5GGMqXABqZfqycsmJJnkdZ 9M1qO/ZOSZzoQn4QTeLM82t57eZFk4u1/0YLEfTL62NL5w/e8HYvAE49Knf1ccSw0H 9q18H5n/Cy49hcra/ZApGSYvTZh/ZpR0t7/eo4jm58ZsVidmW+YTW02tI6sMHvEcGf lUYimWYXgnwoQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 53011180088 for ; Thu, 10 Jul 2025 11:43:06 +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.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from fout-a6-smtp.messagingengine.com (fout-a6-smtp.messagingengine.com [103.168.172.149]) (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 ; Thu, 10 Jul 2025 11:42:56 +0000 (UTC) Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id 26DEDEC0243; Thu, 10 Jul 2025 07:44:45 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Thu, 10 Jul 2025 07:44:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rwec.co.uk; h=cc :content-transfer-encoding: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=fm2; t=1752147885; x=1752234285; bh=rGkFxEyUaNah2v/wcjtLHKwmBrAXbUbQWp2AIVzo+Dk=; b= Wwa4QojLvLlTnI+Wu6IoLf7G2nBI6iXmxYKOOvOkHaNRvOyTXNxcTyklBmzS8mME jMn0bsCHbrZxE4iRfAher75FKppKlsnJ8K/krOORpBVT2ChE3WtXLCOz79k71ToR NOiRpZMU//E5n6Srtwjj6TeOEj8lvVX65/vwOrfu4Q0wx7KKd3T8T6tc3PEAq67A CNKRwGurpbQia+ZdYw4++ga9agIeBXFJp1m1JuAg3rQT+v5Hg9vjrZqP9O8dUXJV iWnVMQ3E/f/IGMZIE9IEz4rMrjlRjBYfI2teuRHEWlLFSpUTw4u1IPLueEjTEzAW qwJeMgU6sgDmWo6yikig0w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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=fm2; t=1752147885; x=1752234285; bh=r GkFxEyUaNah2v/wcjtLHKwmBrAXbUbQWp2AIVzo+Dk=; b=Wg+OAUpC5KQdugH76 QpwRg+JIUuA+f3PeGbAKi9cA0sBMzHLXAmdJElp1eQxWzMK4sfr9kgoSdBc0RRVz wKDQc+BW6OBk4zIOQK2MQZOW4BUcrVAtZoPyUSCDqAodtzegMEexamrpqkgwOy2B lhGfvqsyLjeGN8TJTxaejPvxx+k5lw21mwrcyylq/9kYlpCojWSO4pJvgLl8Fmyv U5+WuStlgulnRYjyYfQ3v/sMFTf1fSM8ZpZAQTycP4ONFP+eMDKIUT+Swwefs/os RYWbWhJsUnvPp3cd/64BYqe3LoIRffDC9W5SEUH+26fyvAbGBjP1x3BgSRZ3+po/ NoFTg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdegtdefhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecunecujfgurhepfffhvffufggjfhfkgggtgfesthhqmhdttd erjeenucfhrhhomhepfdftohifrghnucfvohhmmhhinhhsucglkffoufhorfgnfdcuoehi mhhsohhprdhphhhpsehrfigvtgdrtghordhukheqnecuggftrfgrthhtvghrnhepheelff etiefgveduteefudegtdduveeludegueegleehiefhhefgtdekveevgfelnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepihhmshhophdrphhhph esrhifvggtrdgtohdruhhkpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhu thdprhgtphhtthhopehinhhtvghrnhgrlhhssehlihhsthhsrdhphhhprdhnvghtpdhrtg hpthhtohepuggvlhgvuhhghihnsehgmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 10 Jul 2025 07:44:44 -0400 (EDT) Date: Thu, 10 Jul 2025 12:44:41 +0100 To: internals@lists.php.net, Deleu Subject: Re: [PHP-DEV] ::from() and tryFrom() on Basic Enums User-Agent: K-9 Mail for Android In-Reply-To: References: <5a38b818-8366-4edc-93ab-a147e3a9aec3@app.fastmail.com> <88dfb74c-bf68-451c-bfe3-a8b1a0d12d58@rwec.co.uk> Message-ID: Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") On 10 July 2025 01:52:17 BST, Deleu wrote: >On Wed, Jul 9, 2025 at 7:23=E2=80=AFPM Rowan Tommins [IMSoP] >wrote: > >> On 09/07/2025 17:39, Deleu wrote: >> > It's currently undeniable that a Unit Enum name is a string=2E >> >> If you want to associate a single string value with each enum case, use >> a string-backed enum, and propose some short-hand syntax=2E Please leav= e >> unit enums as opaque objects for those of us who see value in that=2E >> >> >That's exactly what I'm doing :shrug: I apologise for the unnecessary tone of my previous email=2E I should know= better than to post when tired=2E Rowan Tommins [IMSoP]