From: gron Operating system: PHP version: 5.4Git-2012-06-01 (Git) Package: *Compile Issues Bug Type: Bug Bug description:Final keyword not enforced for methods from traits
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 bug report at https://bugs.php.net/bug.php?id=62204&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62204&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62204&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62204&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62204&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62204&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62204&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62204&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62204&r=needscript Try newer version: https://bugs.php.net/fix.php?id=62204&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62204&r=support Expected behavior: https://bugs.php.net/fix.php?id=62204&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62204&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62204&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62204&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62204&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=62204&r=dst IIS Stability: https://bugs.php.net/fix.php?id=62204&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62204&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62204&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62204&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62204&r=mysqlcfg