summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Fix memory error in reflection exportNikita Popov2017-01-121-15/+11
| | | | | | | | | | | | | | | Also simplify code while at it ... no point in going through a smart_str for a single printf.
* | | Update copyright headers to 2017Sammy Kaye Powers2017-01-021-1/+1
| | |
* | | Switch reflection to use smart_strNikita Popov2017-01-011-311/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of yet-another-smart-string-implementation. Expand the smart_str API by: * smart_str_extract() which gets a finalized zend_string* from a smart_str, including insertion of the zero byte and handling of the empty string case. This should be preferred over using smart_str_0() in conjunction with str.s. * smart_str_get_len() which gets the length of the smart_str with handling of the empty string case.
* | | Reduce redundant storage of required number of parameters to required flagBarbu Paul - Gheorghe2016-12-261-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The required field, until now, stored how many required parameters the function, it belongs to, has. I think this is rather problematic because it's a feature of the function to know how many required parameters it has, not of the parameter itself. The parameter should only say if it's required or optional (among other unrelated things). Also storing the function's number of required parameters in every parameter was redundant since the _zend_function structure already has that information. And storing the same value (number of required parameters) across multiple variables is inefficient and could lead to inconsistencies.
* | | Drop some dead code in ext/reflectionNikita Popov2016-12-211-17/+0
|/ /
* | Merge branch 'PHP-7.0' into PHP-7.1Nikita Popov2016-12-181-0/+10
|\ \ | |/
| * Fix bug #46103Nikita Popov2016-12-181-0/+10
| |
* | Intriduced ZEND_ACC_INHERITED class flag.Dmitry Stogov2016-11-011-1/+1
| | | | | | | | It's going to be helpful for static optimisations, when "parent" is not known yet.
* | Unwrap reference returns in cufa etcNikita Popov2016-09-301-0/+9
| |
* | Don't mark ReflectionType::__toString() as deprecated for nowNikita Popov2016-09-281-1/+4
| |
* | Revert ReflectionType::__toString() behavior + deprecateNikita Popov2016-09-281-12/+2
| |
* | Merge branch 'PHP-7.0' into PHP-7.1Andrea Faulds2016-09-111-6/+0
|\ \ | |/
| * Remove zpp fallback code (always use Fast ZPP)Andrea Faulds2016-09-111-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: commit 3e27fbb3d22b42d181e15c345f1c59a007b6b58c Author: Andrea Faulds <ajf@ajf.me> Date: Sun Sep 11 19:14:37 2016 +0100 Keep dummy FAST_ZPP macro for compatibility commit 8a7cfd00deaa4a3c5026c97580c49c886c72a5b4 Author: Andrea Faulds <ajf@ajf.me> Date: Mon Sep 5 22:36:03 2016 +0100 Remove FAST_ZPP macro and plain zpp fallback code
| * Fixed bug #72846 (getConstant for a array constant with constant values ↵Xinchen Hui2016-08-151-0/+2
| | | | | | | | returns NULL/NFC/UKNOWN)
* | Revert "Do not prepend ? on nullables in ReflectionType::__toString()"Levi Morrison2016-08-231-1/+11
| | | | | | | | This reverts commit 8855a2ce76e8bfba1d2eea1345c765fde7a9a441.
* | Do not prepend ? on nullables in ReflectionType::__toString()Aaron Piotrowski2016-08-211-20/+1
| | | | | | | | Better BC with 7.0.
* | Fix off-by-one in ReflectionType::__toString()Nikita Popov2016-08-201-4/+6
| | | | | | | | Review mistake...
* | Append \ to class name returned from ReflectionType::__toString()Aaron Piotrowski2016-08-161-0/+8
| |
* | ReflectionType improvementsAaron Piotrowski2016-08-111-17/+58
| | | | | | | | Added ReflectionNamedType and updated ReflectionType::__toString()
* | Implement #38992: invoke() and invokeArgs() static method calls should matchChristoph M. Becker2016-08-081-118/+50
| | | | | | | | | | | | | | | | | | | | | | | | We don't want ReflectionMethod::invoke() to simply ignore its first argument, if the method to invoke is a static method. Instead we match its ZPP with that of ReflectionMethod::invokeArgs(). Furthermore, we apply the DRY principle by factoring out the code to a common helper function to prevent inadvertent future divergence of the implementations of both methods. As can be seen from the necessity to adapt some test cases, this causes a BC break for some pathological cases. Therefore we apply this patch to PHP 7.1 only, which is still in beta phase.
* | Fixed bug #72661 (ReflectionType::__toString crashes with iterable)Xinchen Hui2016-07-241-0/+1
| |
* | Merge branch 'PHP-7.0'Nikita Popov2016-07-131-11/+19
|\ \ | |/
| * Merge branch 'PHP-5.6' into PHP-7.0Nikita Popov2016-07-131-5/+9
| |\ | | | | | | | | | | | | Conflicts: ext/reflection/php_reflection.c
| | * fix: bug72222 for PHP-5.6 reflection export of array constsnikita22062016-07-131-11/+16
| | |
* | | Merge branch 'throw-error-in-extensions'Aaron Piotrowski2016-07-051-10/+12
|\ \ \
| * | | Add missed return replacing bail outAaron Piotrowski2016-06-291-1/+1
| | | |
| * | | Replace zend_ce_error with NULL and replace more E_ERROR with thrown ErrorAaron Piotrowski2016-06-131-6/+6
| | | |
| * | | Merge branch 'master' into throw-error-in-extensionsAaron Piotrowski2016-06-101-243/+507
| |\ \ \
| * | | | Convert E_ERROR to thrown Error in extensionsAaron Piotrowski2015-07-051-10/+12
| | | | |
* | | | | Fixed compilation warningsDmitry Stogov2016-06-281-3/+1
| | | | |
* | | | | Fixed compilation warningsDmitry Stogov2016-06-221-1/+1
| |/ / / |/| | |
* | | | fix #72209 (ReflectionProperty::getValue() doesn't fail if object doesn't ↵Joe Watkins2016-05-141-0/+5
| | | | | | | | | | | | | | | | match type)
* | | | Merge branch 'PHP-7.0'Nikita Popov2016-05-101-3/+10
|\ \ \ \ | | |/ / | |/| | | | | | | | | | Conflicts: ext/reflection/php_reflection.c
| * | | Fixed bug #72174Nikita Popov2016-05-101-2/+6
| | | | | | | | | | | | | | | | Also fixes a memory leak if ::getValue() is used with __get().
| * | | Merge branch 'PHP-7.0' of https://github.com/php/php-src into PHP-7.0Joe Watkins2016-01-201-1/+1
| |\ \ \
| * | | | fix ReflectionClass::__toString doc block omittedJoe Watkins2016-01-201-1/+1
| | | | |
* | | | | Add missing update_constants in ReflectionClassConstantNikita Popov2016-05-021-5/+12
| | | | | | | | | | | | | | | | | | | | Also fix indentation of __toString().
* | | | | Revert code to use DUP instead of COPYNikita Popov2016-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a1c405e0c50c627cdd9a7695b4c7d644238b6b9b next to the actual fix I have also switched some (effective) ZVAL_DUPs to ZVAL_COPYs. I'm reverting this part as those were probably there for a reason (presumably issues with non-atomic refcounting on ZTS).
* | | | | Fix usages of zend_update_constant_exNikita Popov2016-04-291-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | If an in-place update in an external zval is performed, it needs to incref'd beforehand, not afterwards.
* | | | | - get rid of EG(scope). zend_get_executed_scope() should be used instead.Dmitry Stogov2016-04-281-25/+17
| | | | | | | | | | | | | | | | | | | | - ichanged zval_update_constant_ex(). Use IS_TYPE_IMMUTABLE flag on shared constants and AST, instead of "inline_change" parameter.
* | | | | Removed "zend_fcall_info.function_table". It was assigned in many places, ↵Dmitry Stogov2016-04-271-8/+0
| | | | | | | | | | | | | | | | | | | | but is never used.
* | | | | Remove IS_VAR_RET_REF flagNikita Popov2016-04-151-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead decide whether a function returned by reference or by value by checking whether the return value has REFERENCE type. This means that functions returning by reference must always return a reference and functions returning by value must not return a reference.
* | | | | Merge zend_execute_data->called_scope into zend_execute_data->This.Dmitry Stogov2016-04-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "called_scope" made sense only for static method calls, for dynamic calls it was always equal to the class of $this. Now EG(This) may store IS_OBJECT + $this or IS_UNUSED + "called_scope" (of course, "called_scope" may be NULL). Some code might need to be adopted to support this change. Checks (Z_OBJ(EX(This))) might need to be converted into (Z_TYPE(EX(This)) == IS_OBJECT).
* | | | | Removed zend_fcall_info.symbol_tableDmitry Stogov2016-03-021-7/+0
| | | | |
* | | | | Support void return type in reflectionAndrea Faulds2016-01-281-0/+1
| | | | |
* | | | | fix ReflectionClass::__toString doc block omittedJoe Watkins2016-01-201-1/+1
| | | | |
* | | | | Merge branch 'PHP-7.0'Lior Kaplan2016-01-011-1/+1
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | * PHP-7.0: Update header to PHP Version 7 Happy new year (Update copyright to 2016) Happy new year (Update copyright to 2016)
| * | | | Merge branch 'PHP-5.6' into PHP-7.0Lior Kaplan2016-01-011-1/+1
| |\ \ \ \ | | |/ / / | |/| | / | | | |/ | | |/| * PHP-5.6: Happy new year (Update copyright to 2016)
| | * | Happy new year (Update copyright to 2016)Lior Kaplan2016-01-011-1/+1
| | | |
| | * | Fixed the third one of (segfault in gc_remove_from_buffer())Xinchen Hui2015-10-031-9/+15
| | | | | | | | | | | | | | | | | | | | This one maybe only used in debug mode, so no bug report and no test script provided