Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88906 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50070 invoked from network); 21 Oct 2015 16:17:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Oct 2015 16:17:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=sean@siobud.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=sean@siobud.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain siobud.com designates 104.236.58.159 as permitted sender) X-PHP-List-Original-Sender: sean@siobud.com X-Host-Fingerprint: 104.236.58.159 siobud.com Received: from [104.236.58.159] ([104.236.58.159:22686] helo=siobud.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E5/01-43914-8AAB7265 for ; Wed, 21 Oct 2015 12:17:45 -0400 Received: from 3006.local (c-73-8-76-141.hsd1.il.comcast.net [73.8.76.141]) by siobud.com (Postfix) with ESMTPSA id 68046D7CED; Wed, 21 Oct 2015 16:17:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=siobud.com; s=mail; t=1445444262; bh=BO3p81Jvpg2V1AkL9mYK7QfxT8dNv+R2GjUyV3tr4sU=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=CVDc7Fcl26lKhvk6wIxTN8X45MwNdreSGHp12MZbVoorQhtlUOVfxjt3aPZIKFvke WE8RusHAWkCGk/Zz0LP0uvWNSJPHbWlM45F/YpPjSENSQEvVqjho42PiYsEUmupdUY 1qYC+jN4N92CsSbauT6STo2avq+glesqbyTFCapY= Date: Wed, 21 Oct 2015 11:17:40 -0500 To: Dan Ackroyd Cc: "internals@lists.php.net" Message-ID: <20151021161740.GA23933@3006.local> References: <20151020173602.GA92318@3006.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [PHP-DEV] [RFC] [VOTE] Class Constant Visibility From: sean@siobud.com (Sean DuBois) On Wed, Oct 21, 2015 at 03:54:48PM +0000, Dan Ackroyd wrote: > Hi Sean, internals, > > While I support this RFC, it seems that the actual implementation is > still under discussion. > > In particular, whether the RFC is going to allow protected constants > in an interface is not clear. > > In the text of the RFC, on one line it says: "This RFC propose PHP > support class constant visibility that mirror the behaviour of method > and property visibility." This would imply that protected constants > are not allowed, as protected methods are not allowed in interfaces. > > Just below it says: "//Interfaces only support protected/public const, > and a compile time error will be throw for privates" Which says > clearly that protected constants _would_ be allowed. > > Please can you update the text of the RFC? > > Unfortunately, that may need a restart of the voting :-\ However that > should just be a formality as it seems to be a popular RFC. > > cheers > Dan > > -- Hi! That is an unfortunate mistake on my part. The *proper* way to adjust visibility of a trait from a class constant is the following. trait myTrait { public const FOO = 'bar' } class myClass { use myTrait { FOO as protected; } } class myClass { use myTrait { FOO as private; } } We should not allow anything besides public in trait, this mirrors the design of methods. If this is right (mind just sending an ACK to make sure I got it right this time) I will update the RFC. Who decides if/when we should restart voting? thanks