Edit report at https://bugs.php.net/bug.php?id=60717&edit=1
ID: 60717 Updated by: g...@php.net Reported by: Jared dot Williams1 at ntlworld dot com Summary: Order of traits in use statement can cause a fatal error -Status: Assigned +Status: Closed Type: Bug Package: Class/Object related Operating System: Ubuntu 11.10 PHP Version: 5.4.0RC5 Assigned To: gron Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2012-03-04 18:26:04] g...@php.net Automatic comment from SVN on behalf of gron Revision: http://svn.php.net/viewvc/?view=revision&revision=323891 Log: Fixed Bug #60717 (Order of traits in use statement can cause a fatal error) # Compatibility is now correctly checked in both directions. # Introduced helper method for the test. ------------------------------------------------------------------------ [2012-01-30 23:00:29] g...@php.net The following patch has been added/updated: Patch Name: Fix-conflict-detection.patch Revision: 1327964429 URL: https://bugs.php.net/patch-display.php?bug=60717&patch=Fix-conflict-detection.patch&revision=1327964429 ------------------------------------------------------------------------ [2012-01-11 17:24:31] Jared dot Williams1 at ntlworld dot com Description: ------------ The fatal trigger only occurs when the order of the use statement is class HTMLHelper implements Helper { use TextUTF8, TextArea, HTMLAttributes; } If the use statement is reordered... class HTMLHelper implements Helper { use TextArea, HTMLAttributes, TextUTF8; } then code is fine. I guess that some testing of abstract methods is missing somewhere? Test script: --------------- https://gist.github.com/1595674 Expected result: ---------------- No fatal error Actual result: -------------- PHP Fatal error: Can't inherit abstract function HTML\HTMLAttributes::text() (previously declared abstract in HTML\TextArea) in /var/www/framework.localhost/htdocs/bug.php on line 55 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=60717&edit=1