Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125017 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 qa.php.net (Postfix) with ESMTPS id BA0E21A00BD for ; Sat, 17 Aug 2024 00:53:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1723856143; bh=I2iirvAwvD+lCU7eHgPi9mk68T7Ggk3/jvpPvQBKoKQ=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=QpSCLmTlKRh79SJt0mOAxRekJ3xp/wULbzlHqSqfL3bb1wue/o34d1sl2C66HHlgB dkBygqe/jWSOZNc4eOmS9COZk7FWMbYkpQHr2Hcsr/mHnbnBxldyYLVZSoOcrr4pHn auKlr+5sr9yz60PsR1Li1/DiBWY58B7H7q3F9kmJOpiS5+fugGCLWUkqvxzfv3vbk/ m9j+lLVdHx7p1dabV5ZhZRVtptLfdt1cC8ec7zRwfNR7g7Md5gqL5kp21kzFl2Hddi ovZsLnS9YwVJJq4yoXvhTiAMcyemW8Kt/c9hDrM/42l2rg+GU7VB6Msdi18vgmqolJ CLMZwpiIQnFwg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CD4581804D0 for ; Sat, 17 Aug 2024 00:55:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: ** X-Spam-Status: No, score=2.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_50, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING, HTML_MESSAGE,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_SOFTFAIL,STOX_BOUND_090909_B autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from dragonfly.birch.relay.mailchannels.net (dragonfly.birch.relay.mailchannels.net [23.83.209.51]) (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 ; Sat, 17 Aug 2024 00:55:39 +0000 (UTC) X-Sender-Id: a2hosting|x-authuser|juliette@adviesenzo.nl Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id ED3EE6C64C8 for ; Sat, 17 Aug 2024 00:53:50 +0000 (UTC) Received: from nl1-ss105.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id 0E0896C62A3 for ; Sat, 17 Aug 2024 00:53:49 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1723856030; a=rsa-sha256; cv=none; b=UUzyeRV1n9/Z2PGDH8pkXkgz6wSSeo2bvl+kk2pLW4nOBW/qkgTw/sNJ6dmt+Xxv9hMBKZ jREtWxZBw0j4gvxOQmrQTo3/xnuFEn3vEDWI8C4GQoHZUHpRzzrjjW9WuA4MaxWvEjC6Tf 3v+wGYjhblIh4WavKzELulqvcNnhwt45D/5dasyvxYogpq1wlbHLajwJ7SJzg1AQnJCtZz ky2xjVgtY1US7i3/DrRxJiWy5ns6emU2quLvPTHiRKAJO461WAX0IFrPyTeuDNgrvd+YJH Xmaaehulw4ild7W7+9ihBKH4BOsVxnkXVKV7P0H8yxer0uieAXUlPw/rYCVbLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1723856030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=+/B32BOlEhZSVx31DgVqiupYnrat5yao9Fg1tpgdawA=; b=CbIDmSPTyIRvYEPhUCmm2QWfRE28SC/Y2WgVsyOX8GsLcodFTt6FKuqDZHFYqBQtD9fyLl 3hpX+lAeVJo0EfgaO4XBeYOQHy1wWuUoMnjHw0WtO+bzAwIXhbrAbzzl7ztIUx4gVxjJvI 9ZSflPPitJsztD8me778/EyexrH5ADttV1/GavtMneOBkDiy/PRUfzupJme302RtHR28J5 HzwKZ42eesSBQvZ4I3gmS6FaokfUxB7gj0xg/SfRLPZzknZhg5xzkt4MIDyzgjXYBgX/HR 8JvsAzl0v3pxcVx4+Qd6Bgh3tHOta1/RwD6T+KnfZFHotrjuceBLdd/KGdPKQw== ARC-Authentication-Results: i=1; rspamd-c4b59d8dc-sdnbv; auth=pass smtp.auth=a2hosting smtp.mailfrom=php-internals_nospam@adviesenzo.nl X-Sender-Id: a2hosting|x-authuser|juliette@adviesenzo.nl X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|juliette@adviesenzo.nl X-MailChannels-Auth-Id: a2hosting X-Left-Irritate: 2efc7132175976c9_1723856030695_2010954255 X-MC-Loop-Signature: 1723856030695:4049787214 X-MC-Ingress-Time: 1723856030695 Received: from nl1-ss105.a2hosting.com (nl1-ss105.a2hosting.com [85.187.142.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.121.124.227 (trex/7.0.2); Sat, 17 Aug 2024 00:53:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=adviesenzo.nl; s=default; h=Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:Cc:References:To:Subject:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=+/B32BOlEhZSVx31DgVqiupYnrat5yao9Fg1tpgdawA=; b=gDFpENw9c7tmssB+sw9sVk3KKk pXkMhYJSmwawmM0TdDY7vuyb7yCSQXbNTPTZk+xnF50E7oFav7J78Jd9M56uaM8/Y3WUZ+cGDajll 4eqJaURmK2cBG32gbJUqLyDXQgfcheqYSBHDRT8q1L53H324pUF7WY0Y8L0KykhL+RDA=; Received: from mailnull by nl1-ss105.a2hosting.com with spam-scanner (Exim 4.97.1) (envelope-from ) id 1sf7hT-0000000A4tX-2v19 for internals@lists.php.net; Sat, 17 Aug 2024 02:53:47 +0200 X-ImunifyEmail-Filter-Info: UkNQVF9DT1VOVF9UV08gVE9fRE5fQUxMIFJDVkRfVklBX1NN VFBfQVV USCBSQ1ZEX1RMU19BTEwgU1VCSkVDVF9FTkRTX1FVRVNUSU9OIFZFUk lMT0NLX0NCIE1JRF9SSFNfTUFUQ0hfRlJPTSBCQVlFU19IQU0gRlJPT V9FUV9FTlZGUk9NIFRPX01BVENIX0VOVlJDUFRfU09NRSBGUk9NX0hB U19ETiBNSU1FX1RSQUNFIFJDVkRfQ09VTlRfT05FIElFX1ZMX1BCTF9 BQ0NPVU5UXzAxIEFTTiBBUkNfTkEgTUlNRV9VTktOT1dO X-ImunifyEmail-Filter-Action: no action X-ImunifyEmail-Filter-Score: 0.64 X-ImunifyEmail-Filter-Version: 3.8.4/202408161000 Received: from [31.201.40.213] (port=55118 helo=[192.168.1.16]) by nl1-ss105.a2hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.97.1) (envelope-from ) id 1sf7hU-0000000A4tC-288K; Sat, 17 Aug 2024 02:53:47 +0200 Subject: Re: [PHP-DEV] Should there be a `get_declared_enums()` function ? To: PHP internals References: <66BD5F05.8010409@adviesenzo.nl> <8dc51539-20bb-4017-b859-76066e2287e5@gmx.de> Cc: Ayesh Karunaratne Message-ID: <66BFF486.3020707@adviesenzo.nl> Date: Sat, 17 Aug 2024 02:53:26 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------040605020706050801040708" X-AuthUser: juliette@adviesenzo.nl From: php-internals_nospam@adviesenzo.nl (Juliette Reinders Folmer) This is a multi-part message in MIME format. --------------040605020706050801040708 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 16-8-2024 17:01, Ayesh Karunaratne wrote: > I went ahead and created PR https://github.com/php/php-src/pull/15443 > along with tests, UPGRADE notice, etc. I think having a > `get_declared_enums` function will be helpful. The implementation is > simple and straightforward too. Thanks for creating the PR Ayesh! I'm presuming it's too late for PHP 8.4, what with feature freeze having come & gone this week. Based on the mostly supportive responses on the list, I wonder whether an RFC is needed. If so, I'd be happy to create an initial draft (for PHP 8.5). Smile, Juliette --------------040605020706050801040708 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit On 16-8-2024 17:01, Ayesh Karunaratne wrote:
I went ahead and created PR https://github.com/php/php-src/pull/15443 along with tests, UPGRADE notice, etc. I think having a `get_declared_enums` function will be helpful. The implementation is simple and straightforward too.

Thanks for creating the PR Ayesh!

I'm presuming it's too late for PHP 8.4, what with feature freeze having come & gone this week.

Based on the mostly supportive responses on the list, I wonder whether an RFC is needed. If so, I'd be happy to create an initial draft (for PHP 8.5).

Smile,
Juliette


--------------040605020706050801040708--