summaryrefslogtreecommitdiff
path: root/ext/reflection
Commit message (Collapse)AuthorAgeFilesLines
* Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-1554-68/+29
| | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* Trim trailing whitespace in *.phptPeter Kokot2018-10-14108-235/+235
|
* Sync leading and final newlines in source code filesPeter Kokot2018-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2018-10-031-7/+5
|\
| * Merge branch 'PHP-7.1' into PHP-7.2Nikita Popov2018-10-031-7/+5
| |\
| | * Reflection: Copy invoke function also in the variadic caseNikita Popov2018-10-031-7/+5
| | | | | | | | | | | | | | | It doesn't matter how the parameters are provided, we always have to copy the trampoline invoke function.
* | | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2018-10-022-0/+52
|\ \ \ | |/ /
| * | Fixed bug #66430Nikita Popov2018-10-022-0/+52
| | |
* | | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2018-10-021-0/+45
|\ \ \ | |/ /
| * | Fixed bug #76936Nikita Popov2018-10-021-0/+45
| | |
* | | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2018-09-053-2/+27
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Fix #74454: Wrong exception being thrown when using ReflectionMethod
| * | Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-09-053-2/+27
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Fix #74454: Wrong exception being thrown when using ReflectionMethod
| | * Fix #74454: Wrong exception being thrown when using ReflectionMethodChristoph M. Becker2018-09-053-2/+27
| | | | | | | | | | | | | | | If zend_throw_exception_ex() already threw an exception, we should not throw again.
* | | Pack zend_constant.flags and zend_constant.module_number into reserved space ↵Dmitry Stogov2018-07-261-2/+2
| | | | | | | | | | | | inside zend_constant.value.
* | | Remove unused Git attributes identPeter Kokot2018-07-253-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The $Id$ keywords were used in Subversion where they can be substituted with filename, last revision number change, last changed date, and last user who changed it. In Git this functionality is different and can be done with Git attribute ident. These need to be defined manually for each file in the .gitattributes file and are afterwards replaced with 40-character hexadecimal blob object name which is based only on the particular file contents. This patch simplifies handling of $Id$ keywords by removing them since they are not used anymore.
* | | Changed structure of zend_class_entry.trait_aliases and ↵Dmitry Stogov2018-07-111-3/+3
| | | | | | | | | | | | zend_class_entry.trait_precedences to avoid keeping "intermediate" trait references, that are used only during inheritance.
* | | Uze ZVAL_COPY_DEREF() instead of ZVAL_DEREF() and ZVAL_COPY()Dmitry Stogov2018-07-091-10/+5
| | |
* | | Use zval_ptr_dtor() instead of zval_dtor() in internal functions that ↵Dmitry Stogov2018-07-051-2/+2
| | | | | | | | | | | | destroy new created object (This is safer and produces less code)
* | | Use zval_ptr_dtor() instead of zval_dtor() in internal functions that ↵Dmitry Stogov2018-07-051-5/+5
| | | | | | | | | | | | destroy new created object (This is safer and produces less code)
* | | Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized ↵Dmitry Stogov2018-07-041-4/+4
| | | | | | | | | | | | | | | | | | | | | destructors. zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places. Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
* | | Fix check for invoking abstract methodNikita Popov2018-07-022-15/+33
| | |
* | | Add $ before property name in error messageNikita Popov2018-07-027-32/+32
| | |
* | | Merge branch 'PHP-7.2'Nikita Popov2018-07-022-1/+26
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.1' into PHP-7.2Nikita Popov2018-07-022-1/+26
| |\ \ | | |/
| | * Fixed bug #75231Nikita Popov2018-07-022-1/+26
| | | | | | | | | | | | The behavior is now consistent with ReflectionMethod.
* | | Remove unnecessary explicit argc checkNikita Popov2018-07-021-18/+6
| | | | | | | | | | | | | | | Instead specify a default value for the argument, which is more idiomatic.
* | | Remove METHOD_NOTSTATIC checks in reflectionNikita Popov2018-07-021-42/+0
| | | | | | | | | | | | | | | PHP does not allow static calls to non-static internal methods anyway, so these checks are redundant.
* | | Add zend_update_static_property_ex APINikita Popov2018-06-291-15/+1
| | | | | | | | | | | | | | | And cleanup the implementation to perform a normal by-value assignment.
* | | Add zend_read_static_property_ex APINikita Popov2018-06-291-5/+1
| | | | | | | | | | | | For symmetry with zend_read_property_ex.
* | | Fix ReflectionProperty::get/setValue() on internal static propertyNikita Popov2018-06-282-31/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | This was broken by 6dc0cd868d972885249ce40f2d64097cd0ba6c1f, which moved static property initialization outside of constant updating. Instead of replicating logic, use zend_get_static_property() API in the reflection implementation, just like we're using read_property for non-static proprety access.
* | | Merge branch 'PHP-7.2'Xinchen Hui2018-06-282-1/+21
|\ \ \ | |/ / | | | | | | | | | | | | * PHP-7.2: Update NEWS Fixed bug #76536 (PHP crashes with core dump when throwing exception in error handler). (Laruence)
| * | Merge branch 'PHP-7.1' into PHP-7.2Xinchen Hui2018-06-282-1/+21
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Fixed bug #76536 (PHP crashes with core dump when throwing exception in error handler). (Laruence)
| | * Fixed bug #76536 (PHP crashes with core dump when throwing exception in ↵Xinchen Hui2018-06-282-1/+21
| | | | | | | | | | | | error handler). (Laruence)
| | * year++Xinchen Hui2018-01-022-2/+2
| | |
| * | year++Xinchen Hui2018-01-022-2/+2
| | |
* | | Store unmangled name in ReflectionPropertyNikita Popov2018-06-271-47/+37
| | | | | | | | | | | | Avoid redundant unmangles and string copies, where possible.
* | | Optimize ReflectionProperty constructorNikita Popov2018-06-271-12/+8
| | | | | | | | | | | | | | | | | | | | | Perform HT lookups using a zend_string. Don't copy the name for the "name" property. We can always use the original name directly, as properties case case-sensitive, so the original name should always match the unmangled name of the fetched property info.
* | | Lazy function copying from op_cache SHM into process memoryDmitry Stogov2018-06-251-2/+2
| | |
* | | Micro-optimizationDmitry Stogov2018-06-251-15/+16
| | |
* | | Fixed bug #76509Nikita Popov2018-06-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In PHP static properties are shared between inheriting classes, unless they are explicitly overwritten. However, because this functionality was implemented using reference, it was possible to break the implementation by reassigning the static property reference. This is fixed by switching the implementation from using references to using INDIRECTs, which cannot be affected by userland code.
* | | Avoid reusing zend_function.common.prototype for magic things (use reserved ↵Dmitry Stogov2018-06-211-16/+0
| | | | | | | | | | | | fields instead).
* | | Normalize Reflection phpinfo() outputPeter Kokot2018-06-042-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch normalizes the Reflection extension version in the phpinfo output. It removes the Git attributes ident blob object name from Git repository as an extension version. Also the table output is synced with other extensions (i.e. enabled in a row instead of table header).
* | | Export standard object handlers, to avoid indirect accessDmitry Stogov2018-05-311-5/+2
| | |
* | | Removed useless zval_ptr_dtor()Dmitry Stogov2018-05-291-1/+1
| | |
* | | Use zend_string_release_ex() instread of zend_string_release() in places, ↵Dmitry Stogov2018-05-281-9/+9
| | | | | | | | | | | | where we sure about string persistence.
* | | Avoid useless checks, using zend_string_efree(), in cases where the string ↵Dmitry Stogov2018-05-081-1/+1
| | | | | | | | | | | | is known to be a temporary allocated zend_string.
* | | zend_fcall_info_cache.calling_scope is not used by zend_call_function() and ↵Dmitry Stogov2018-05-031-6/+0
| | | | | | | | | | | | | | | | | | doesn't have to be initialized. It's used only as a result of zend_is_callable() in forward_static_call and spl_autoload.
* | | Keep initialized object_handlers structures in read-only memory.Dmitry Stogov2018-03-141-1/+1
| | |
* | | Test ReflectionZendExtension classDmitry Stogov2018-03-092-0/+40
| | |
* | | Remove unused assignmentAnatol Belski2018-03-071-1/+0
| | |