Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112629 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 72580 invoked from network); 29 Dec 2020 03:03:21 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Dec 2020 03:03:21 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E8036180384 for ; Mon, 28 Dec 2020 18:37:41 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 28 Dec 2020 18:37:41 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 86ABB5C00A1 for ; Mon, 28 Dec 2020 21:37:40 -0500 (EST) Received: from imap26 ([10.202.2.76]) by compute4.internal (MEProxy); Mon, 28 Dec 2020 21:37:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=HdTNuC em7Ke1hARawkIEFGD+NORDFERwzVbi3q9ZX9A=; b=PTFc+xKG3DGQUDWnUaePw4 TvkBFAaL+SfnXQ+gy3VSM4TY0lT0nG6beywJPtyojGYsr6dev5+XJD6MMye4MaRJ Qxdn4fmkll8bM2rEyprE69dKOmdarc/7vnX0fQEBx9G6KfkszSps1x+8GgkHHkJW VoIpif+/PlCez/ost9k31DpO9mAMxHLlnI50NRRMrs0Rj7MUl38oM8z2LlsqEqjL CrHvbR2I2mRte9Nqxx76NdLdrEyFYnlwvQoNmaoacXRi+OJLyzFdWqOARnpx/xgn 7VOfCqtoJThc73Ll6QcawrKUMmg5vQHQFNCgRYhuT7pyZh6PDHk1YPxKVVnxGgvA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddvtddggeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdfnrghr rhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtoh hmqeenucggtffrrghtthgvrhhnpeeglefgkeduiedvvdetffeujefftdfhjeeiveehgfff keduveektddvledvvdfffeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id F313614200A2; Mon, 28 Dec 2020 21:37:39 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.1-61-gb52c239-fm-20201210.001-gb52c2396 Mime-Version: 1.0 Message-ID: <9b1fdd49-f576-4128-b9b9-c61bf8f58d63@www.fastmail.com> In-Reply-To: References: Date: Mon, 28 Dec 2020 20:37:18 -0600 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] [RFC] Enumerations, Round 2 From: larry@garfieldtech.com ("Larry Garfield") On Mon, Dec 28, 2020, at 6:40 PM, Benjamin Morel wrote: > Hi Larry, thank you for the updated RFC! > I love it, and having played with the implementation, I can say I love it > so far as well. > > I have one suggestion regarding reflection: > Shouldn't ReflectionCase expose an additional getInstance() method, that > would return the case instance, such as Suit::HEARTS? I... thought we had that in there. Did I remove the wrong method? I know it's in there somewhere. Let me double check with Ilija on what it's supposed to be called. Will update when that's sorted out. > Also, I noticed 2 typos in the code samples: > > - in "Enumerated Methods", 1st code block: missing "implements Colorful" > after "enum Suit" > - in "Enumerated Methods", 2nd code block: missing "public function > color()" after "private function __construct() {}" Both fixed, thanks. > Finally, I got a segmentation fault while trying to use what I think is an > unsupported syntax (removing the ":string" from a scalar enum), where is > the correct place to report this? The GitHub PR? On the PR, please. Sounds like we need a few more negative tests to make sure it fails gracefully. --Larry Garfield