summaryrefslogtreecommitdiff
path: root/Zend/tests/traits
Commit message (Collapse)AuthorAgeFilesLines
* Fix some misspellingsGabriel Caruso2018-02-064-6/+6
|
* Remove some references to E_STRICT in testsNikita Popov2018-02-039-20/+9
| | | | | | | run-tests.php enforces error_reporting=E_ALL (including E_STRICT), setting this explicitly in not necessary. Conversely, after the removal of some E_STRICT errors, explicitly excluding it is no longer necessary in some places.
* Merge branch 'PHP-7.2'Nikita Popov2017-12-162-0/+61
|\
| * Fix #75607 - Check if existing static trait property is a ref before comparingPedro Magalhães2017-12-162-0/+61
| |
* | 63911: Compare opcodes of the op_array to determine different functionsPedro Magalhães2017-11-221-0/+26
| |
* | Fix #74922 - Try to resolve constants when importing trait propertiesPedro Magalhães2017-11-025-0/+76
|/
* Fix bug #74607: Don't check for bi-directional compatibility in traitsPedro Magalhães2017-06-034-2/+46
|
* Fix SKIPIF conditionsNikita Popov2017-03-141-1/+1
|
* Fix CRLF line-endings in testsNikita Popov2016-11-209-225/+225
| | | | Also fix a single instance of CRLF in ibase_query.c.
* Merge branch 'PHP-7.0' into PHP-7.1Nikita Popov2016-09-224-9/+31
|\
| * Fix bug #69579John Boehr2016-09-224-9/+31
| |
* | Fix static method arg binding in traitsNikita Popov2016-04-081-0/+28
|/
* fix #71414 (Interface method override inherited method and implemented in a ↵Joe Watkins2016-03-261-1/+1
| | | | trait causes fatal error)
* Update exception names in tests after formatting changes.Aaron Piotrowski2015-05-176-6/+6
|
* Tweak uncaught exception message displayNikita Popov2015-05-176-6/+6
| | | | | | | | | | | | | This implements a reduced variant of #1226 with just the following change: -Fatal error: Uncaught exception 'EngineException' with message 'Call to private method foo::bar() from context ''' in %s:%d +Fatal error: Uncaught EngineException: Call to private method foo::bar() from context '' in %s:%d The '' wrapper around messages is very weird if the exception message itself contains ''. Futhermore having the message wrapped in '' doesn't work for the "and defined" suffix of TypeExceptions.
* Display EngineExceptions like ordinary exceptionsNikita Popov2015-05-156-6/+25
| | | | | | | | | TypeException stays as-is for now because it uses messages that are incompatible with the way exception messages are displayed. closure_038.phpt and a few others now show that we're generating too many exceptions for compound operations on undefined properties -- this needs to be fixed in a followup.
* Reclassify E_STRICT noticesNikita Popov2015-04-015-13/+1
| | | | | | | Per RFC https://wiki.php.net/rfc/reclassify_e_strict While reviewing this, found that there are still three E_STRICTs left in libraries - need to discuss those.
* Finish PHP 4 constructor deprecationNikita Popov2015-03-312-1/+4
|
* Removed parsing support traits to have extends and implements.Guilherme Blanco2015-01-092-2/+2
|
* Merge branch 'PHP-5.6'Julien Pauli2014-12-122-0/+64
|\ | | | | | | | | | | | | | | | | | | * PHP-5.6: Updated NEWS Updated NEWS Fixed Bug #65576 (Constructor from trait conflicts with inherited constructor) Conflicts: Zend/zend_compile.c
| * Fixed Bug #65576 (Constructor from trait conflicts with inherited constructor)Kévin Dunglas2014-12-122-0/+64
| |
* | typo fixes - https://github.com/vlajos/misspell_fixerVeres Lajos2014-11-191-1/+1
|/
* non living code related typo fixesVeres Lajos2013-08-041-1/+1
|
* Fixed bug #64235 (Insteadof not work for class method in 5.4.11)Xinchen Hui2013-02-215-3/+72
| | | | | | As we discussed with stefan, we think previous of allowing use with classes is a bug, should be forbided, anyway, the error message should be improved.
* Fixed bug #64070 (Inheritance with Traits failed with error)Dmitry Stogov2013-02-181-0/+36
|
* spellingDmitry Stogov2012-12-251-1/+1
|
* Traits refactoringDmitry Stogov2012-12-2513-12/+119
|
* Fixed bug #61998 (Using traits with method aliases appears to result in ↵Dmitry Stogov2012-05-211-0/+68
| | | | crash during execution)
* Fixed Bug #61052 (Missing error check in trait 'insteadof' clause)Stefan Marr2012-03-041-0/+18
|
* Fixed Bug #60911 (Confusing error message when extending traits)Stefan Marr2012-03-041-1/+1
|
* Fixed Bug #60717 (Order of traits in use statement can cause a fatal error)Stefan Marr2012-03-042-1/+74
| | | | | | # Compatibility is now correctly checked in both directions. # Introduced helper method for the test.
* Fixed Bug #60809 (TRAITS - PHPDoc Comment Style Bug)Dmitry Stogov2012-01-201-0/+36
| | | | | | Fixed some other traits related bugs (uninitialized variable, return => continue) Removed some trait related redundant code and variables
* Improved traits implementation. Now to support __CLASS__ constant in traits ↵Dmitry Stogov2012-01-171-0/+23
| | | | 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.
* Fixed inconsistent and broken handling of private properties in traits.Stefan Marr2011-12-175-13/+199
| | | | | | | | | # 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.
* Fixed Bug #60369 Crash with static property in traitStefan Marr2011-11-231-0/+17
|
* Fixes Bug #54441 (Handling of changing modifiers on a trait alias)Stefan Marr2011-11-181-0/+19
| | | | | # this now results also in a compilation error, since it would open the door for inconsistencies, and violates the DRY principle.
* Fixed Bug #60165 (Aliasing unexisting trait should throw/trigger the ↵Stefan Marr2011-11-175-2/+79
| | | | | | | | | | | | | | | | | 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.
* Fixed Bug #60217 (Requiring the same method from different traits)Stefan Marr2011-11-053-0/+78
| | | | | - also added test to check for inconsistent abstract method definitions, they need to be compatible
* Fixed Bug #60153 (Interface method prototypes not enforced when implementd ↵Stefan Marr2011-11-012-1/+20
| | | | | | | | | | 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.
* Added missing consistency check for abstract methods required by one trait ↵Stefan Marr2011-11-012-0/+51
| | | | and implemented by another.
* Fixed Bug #60145 (Usage of trait's use statement inside interfaces not ↵Stefan Marr2011-11-011-0/+17
| | | | properly checked.)
* Fixed Bug #60173 (Wrong error message on reflective trait instantiation)Stefan Marr2011-10-311-0/+12
|
* Fixed Bug #55554 (Legacy constructors not handled properly) [TRAITS] [DOC]Stefan Marr2011-10-098-2/+258
| | | | | | | | | | | | | # 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.
* Improve the warning message of incompatible arguments. (#55719)Xinchen Hui2011-09-231-1/+1
| | | | | And fix tests related.
* Fixed bug #55524 Traits should not be able to extend a classStefan Marr2011-08-291-0/+15
| | | | | # also used the Z_STRVAL where it seemed appropriate
* Bug #55424 Fatal error when calling a method from a trait that is defined in ↵Stefan Marr2011-08-151-0/+35
| | | | | | | parent class and required by using an abstract method in the trait. # The method got unconditionally deleted from the class, since it was assumed that we override it, but we did not in case of abstract methods coming from a trait. Thus, dont delete when we try to merge in an abstract method.
* Fixed Bug #55355: Inheritance chain was not regarded when checking whether ↵Stefan Marr2011-08-151-0/+46
| | | | the abstract method of a trait is satisfied.
* Fixed Bug #55372 Incorrect handling of literals led to memory corruption.Stefan Marr2011-08-151-0/+28
| | | | | | # Dmitry you might want to review this patch, since I split up zend_add_literal # and added a version for post-pass_two() usage.
* Fixed Bug #55214 use of __CLASS__ within trait returns trait name not class ↵Stefan Marr2011-07-311-0/+48
| | | | name [TRAITS] [DOC]
* Added __TRAIT__ magic constant [TRAITS] [DOC]Stefan Marr2011-07-312-0/+63
| | | | | | | # __TRAIT__ behaves like __CLASS__ more or less but is constraint to traits. # Since traits are not types, there are not many valid use cases, and trying # to use __TRAIT__ to make traits more like classes is discouraged.