Commit Graph

996 Commits

Author SHA1 Message Date
Xinchen Hui
3d86e6d881 Fixed bug #63726 (Memleak with static properties and internal/user classes)
No test scripts provided (will try to find one)
2012-12-10 20:29:51 +08:00
Dmitry Stogov
65585b3aa2 Fixed compiler reenterability 2012-11-14 17:45:10 +04:00
Xinchen Hui
74228c5151 Fixed bug #63305 (zend_mm_heap corrupted with traits) 2012-10-23 11:34:25 +08:00
Xinchen Hui
67611c67fa Fixed bug #63219 (Segfault when aliasing trait method when autoloader throws excpetion) 2012-10-08 22:59:52 +08:00
Dmitry Stogov
6c0508f8d5 Fixed bug #62907 (Double free when use traits) 2012-09-05 09:58:22 +04:00
Lars Strojny
f82dd2c774 Bug #62956: fixing private method signature validation
In inheritance, if both methods are private, don not enforce the same
signature.
2012-08-28 14:06:18 +02:00
Xinchen Hui
87785c7d5a tabs 2012-08-23 16:13:34 +08:00
Xinchen Hui
d39aa984ad Refix #62358, previous has side-affect 2012-08-23 16:06:17 +08:00
Xinchen Hui
6d1bebfcb0 Fixed bug #62358 (Segfault when using traits a lot) 2012-08-23 15:41:49 +08:00
Marc Easen
896ac689c9 Fixed the common misspelling of the word occurred (occured -> occurred) 2012-06-30 16:54:03 -07:00
Stanislav Malyshev
ba8333cdb0 typo 2012-06-08 12:23:51 -07:00
Xinchen Hui
bbcea230e1 Use emalloc instead of malloc 2012-05-21 18:58:19 +08:00
Dmitry Stogov
2ae8d2fbfb Fixed bug #61998 (Using traits with method aliases appears to result in crash during execution) 2012-05-21 13:57:41 +04:00
Xinchen Hui
da6465a268 Fixed bug #61761 ('Overriding' a private static method with a different signature causes crash) 2012-04-18 18:13:27 +08:00
Stefan Marr
ffded0020b Fixed Bug #61052 (Missing error check in trait 'insteadof' clause) 2012-03-04 19:34:19 +00:00
Stefan Marr
34fe62619d Fixed Bug #60911 (Confusing error message when extending traits) 2012-03-04 18:33:33 +00:00
Stefan Marr
60dfd64bf2 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-03-04 18:26:11 +00:00
Xinchen Hui
046e3e3889 MFH: Fixed bug #60573 (type hinting with "self" keyword causes weird errors) 2012-03-02 03:32:12 +00:00
Dmitry Stogov
3299a2673c Fixed Bug #60809 (TRAITS - PHPDoc Comment Style Bug)
Fixed some other traits related bugs (uninitialized variable, return => continue)
Removed some trait related redundant code and variables
2012-01-20 12:30:57 +00:00
Dmitry Stogov
b515bfbdfb Improved traits implementation. Now to support __CLASS__ constant in traits php doesn't have to copy the complete compiled method, but can reuse the same code. The resolution of __CLASS__ constants in methods defined in traits are delayed till run-time. This approach also made possible to use __CLASS__ constant as default value for traits properties and method arguments. 2012-01-17 08:09:13 +00:00
Felipe Pena
4e19825281 - Year++ 2012-01-01 13:15:04 +00:00
Dmitry Stogov
c058385112 Fixed bug #60613 (Segmentation fault with $cls->{expr}() syntax) 2011-12-28 09:59:39 +00:00
Xinchen Hui
84ce790437 Fix #60613 (Segmentation fault with $cls->{expr}() syntax)
#now the behavior is like 5.3, a COMPILER_ERROR will be triggered
2011-12-28 06:46:12 +00:00
Xinchen Hui
2f4875bf92 Fix bug #60611 (Segmentation fault with Cls::{expr}() syntax) 2011-12-27 08:38:18 +00:00
Xinchen Hui
2f62602c03 Fixed bug #60558 (Invalid read and writes)
Re-Fixed bug #60536 (Traits Segfault)
#Thanks to tony2001, I found the previous fix -r321089 is actually not a correct one.
#The key problem there is because the traits didn't correct set the property_info.offset
#for private properties. so here come the new fix.
2011-12-19 16:48:18 +00:00
Xinchen Hui
1a4a527c37 Codes standard & Remove useless empty lines 2011-12-19 10:05:48 +00:00
Stefan Marr
3dc9f0abe6 Fixed inconsistent and broken handling of private properties in traits.
# The handling of private properties in classes is now consistent with private properties in traits.
# Perviously, privates could cause strict warnings, are were not properly merged into the class when
# the parent class had a private property of the same name. Now, we introduce it without notice,
# since it is a new and independent property, just like in normal classes.
# This problem was diagnosed while working on Bug #60536.
2011-12-17 14:26:39 +00:00
Pierrick Charron
3f2bcb7723 Coding standard 2011-12-06 06:44:22 +00:00
Xinchen Hui
d18a61aefb Fix typo 2011-12-05 12:33:56 +00:00
Dmitry Stogov
1d6c98a136 Fixed bug #60444 (Segmentation fault with include & class extending) 2011-12-05 09:20:12 +00:00
Stefan Marr
db0888dfc1 Fixed Bug #60369 Crash with static property in trait 2011-11-23 21:24:34 +00:00
Felipe Pena
bc810a443d - Fixed bug #43200 (Interface implementation / inheritence not possible in abstract classes) 2011-11-19 13:36:03 +00:00
Felipe Pena
cc8573e7a5 - CS 2011-11-18 13:56:41 +00:00
Stefan Marr
76772dc20d Fixes Bug #54441 (Handling of changing modifiers on a trait alias)
# this now results also in a compilation error, since it would open the door for inconsistencies, and violates the DRY principle.
2011-11-18 13:49:07 +00:00
Felipe Pena
c5ec9dd650 - Fix build 2011-11-17 21:07:52 +00:00
Stefan Marr
c5ba229617 Fixed Bug #60165 (Aliasing unexisting trait should throw/trigger the exception/error)
- aliases that are not actually matching anything are treated as errors now. This
  will make sure that all methods that are expected to be in a class are actually
  there, or in case a trait changed for instance, that the code breaks already
  on composition
- Precedence declarations are also checked to ensure that the method
  which is supposed to take precedence actually exists, however,
  the other traits mentioned in the declaration are not regarded.
  We are more lenient here, since this avoids unnecessary fragility.
- fixed another seamingly unrelated test which broke in the progress
  but wasn't clear before either.
2011-11-17 21:04:15 +00:00
Felipe Pena
3c7a573a2c - Fixed bug #60099 (__halt_compiler() works in braced namespaces) 2011-11-16 17:41:40 +00:00
Stefan Marr
5745f95372 Fixed inconsistent whitespace.
# Belongs to svn rev. 318793.
2011-11-05 02:05:28 +00:00
Stefan Marr
7334dfd7eb Fixed Bug #60217 (Requiring the same method from different traits)
- also added test to check for inconsistent abstract method definitions, they need to be compatible
2011-11-05 01:46:40 +00:00
Antony Dovgal
36103d1236 use jmp_addr only when it's initialized 2011-11-03 08:39:12 +00:00
Antony Dovgal
ed276758f7 fix folding, ws and cs 2011-11-02 21:12:13 +00:00
Antony Dovgal
8d520d6296 initialize variable and fix segfaulting tests 2011-11-02 21:05:36 +00:00
Stefan Marr
4591498df7 Fixed Bug #60153 (Interface method prototypes not enforced when implementd via traits.)
# Moved the freeing of overriden functions to a point after the check.
# The new check comes after the normal inheritance check to give the first check
# the opportunity to abort with a more detailed error.
# Also fixed a small type in an unrelated test.
2011-11-01 15:25:24 +00:00
Stefan Marr
9b0d73af1d Added missing consistency check for abstract methods required by one trait and implemented by another. 2011-11-01 13:42:53 +00:00
Stefan Marr
b5f15ef561 Fixed Bug #60145 (Usage of trait's use statement inside interfaces not properly checked.) 2011-11-01 00:39:10 +00:00
Xinchen Hui
5921e73a37 Fixed bug #60174 (Notice when array in method prototype error)
this should also exists in ext/reflection. since the new warning of "array to string convert" is introduced in zend_make_printable_zval which is used in ext/reflection too
2011-10-31 03:47:11 +00:00
Arnaud Le Blanc
07b7ba8b40 Improved ternary operator performance when returning arrays 2011-10-18 19:42:42 +00:00
Stanislav Malyshev
05c5c8958e Bug #55754 - Only variables should be passed by reference for ZEND_SEND_PREFER_REF params 2011-10-16 00:34:01 +00:00
Stefan Marr
e14354af21 Fixed Bug #55554 (Legacy constructors not handled properly) [TRAITS] [DOC]
# The handling of legacy constructors defined by traits was corrected.
# They are now properly registered and used on instantiation.
# The situation for conflicting legacy and __construct constructors is
# mostly identical. If they are defined in the class, they override conflicts
# and do not collide. However, in case different styles are mixed, between
# class and trait definition, we assume a programmer's mistake and report
# a collision.
#
# BTW: +1 for all the fixed tests! `make test` is fun again.
2011-10-09 11:13:27 +00:00
Stefan Marr
469fc0a341 Use ZEND_ constants instead of plain strings for names of magic methods.
# No functional changes.
2011-10-08 23:47:16 +00:00