Bug #62204 [Opn->Asn]: Final keyword not enforced for methods from traits
| From: | felipe@php.net | Date: | Sun, 03 Jun 2012 17:21:13 +0000 |
| Subject: | Bug #62204 [Opn->Asn]: Final keyword not enforced for methods from traits | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-171000@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62204&edit=1
ID: 62204
Updated by: felipe@php.net
Reported by: gron@php.net
Summary: Final keyword not enforced for methods from traits
-Status: Open
+Status: Assigned
Type: Bug
-Package: *Compile Issues
+Package: Scripting Engine problem
PHP Version: 5.4Git-2012-06-01 (Git)
-Assigned To:
+Assigned To: gron
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2012-06-01 07:53:36] gron@php.net
Description:
------------
Reported by Scott MacVicar on the mailing list (May 4th).
Added here to not forget about it.
> On 04 May 2012, at 20:30, Scott MacVicar wrote:
>
> This caused a few bugs for us / confusion. The final keyword is accepted
inside a trait but it the class also
defines a method without the final keyword this takes precedence.
>
> Two solutions:
> Enforce final when a trait defines -
> https://whisky.macvicar.net/patches/0001-
If-a-trait-declares-a-method-
as-final-enforce-that.patch
>
> Prohibit final form being used in a trait -
https://whisky.macvicar.net/patches/002-traits-Disable-use-of-
final-keyword.patch
>
> I'm for the first solution here
>
> - S
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62204&edit=1