Dmitry Stogov
b2cdde0826
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macros
2019-05-28 20:19:15 +03:00
Dmitry Stogov
83804519df
Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macros
2019-05-28 20:10:02 +03:00
Nikita Popov
20e983d9ce
Merge branch 'PHP-7.4'
2019-05-14 14:59:36 +02:00
Nikita Popov
3f19f5112a
Add RETURN_EMPTY_ARRAY() / RETVAL_EMPTY_ARRAY()
...
The usual wrappers around ZVAL_EMPTY_ARRAY()...
2019-05-14 14:59:10 +02:00
Nikita Popov
9f87831470
Merge branch 'PHP-7.4'
2019-05-09 12:36:33 +02:00
Nikita Popov
4b40a46bf1
Merge branch 'PHP-7.3' into PHP-7.4
2019-05-09 12:36:20 +02:00
Nikita Popov
90318fbcbe
Merge branch 'PHP-7.2' into PHP-7.3
2019-05-09 12:35:11 +02:00
Nikita Popov
35c80583f0
Fixed bug #75186
2019-05-09 12:33:53 +02:00
Nikita Popov
969f238808
Merge branch 'PHP-7.4'
2019-05-09 12:03:29 +02:00
Nikita Popov
54be40113d
Fixed bug #77951
...
Treat singleton references as non-references in ReflectionReference
and return null for them.
2019-05-09 12:02:16 +02:00
Nikita Popov
be31a9468d
Merge branch 'PHP-7.4'
2019-05-08 17:06:34 +02:00
Nikita Popov
e4e6820d10
Use fast zpp for ReflectionClass constructor
...
At this point zpp overhead makes up a significant part of this
function.
2019-05-08 17:06:00 +02:00
Nikita Popov
230d3089b3
Merge branch 'PHP-7.4'
2019-05-08 15:44:29 +02:00
Nikita Popov
ee0fc1b5ae
Optimize $name/$class property population in reflection
...
Instead of going through write_property, directly assign to the
respective property slot.
2019-05-08 15:43:42 +02:00
Nikita Popov
2e186aa9dc
Merge branch 'PHP-7.4'
2019-04-15 10:25:27 +02:00
Nikita Popov
b2ec07e64c
Merge branch 'PHP-7.3' into PHP-7.4
2019-04-15 10:25:20 +02:00
Nikita Popov
14047b50b4
Merge branch 'PHP-7.2' into PHP-7.3
2019-04-15 10:25:11 +02:00
Nikita Popov
e9c0367fdc
Fixed bug #77882
2019-04-15 10:22:40 +02:00
Nikita Popov
787ecb6d56
Merge branch 'PHP-7.4'
2019-03-22 12:41:39 +01:00
Nikita Popov
9457cfca37
Merge branch 'PHP-7.3' into PHP-7.4
2019-03-22 12:41:34 +01:00
Nikita Popov
620a753185
Merge branch 'PHP-7.2' into PHP-7.3
2019-03-22 12:41:02 +01:00
Nikita Popov
da35fa2cb8
Fixed bug #77772
2019-03-22 12:39:27 +01:00
Nikita Popov
c5d9a44798
Merge branch 'PHP-7.4'
2019-02-28 15:46:58 +01:00
Nikita Popov
f4ded492c9
Don't return inside _DO_THROW macro
...
Returning inside _DO_THROW() is kind of pointless if we are going
to comment most uses with "this is gonna return".
2019-02-28 15:45:47 +01:00
Joe Watkins
0e391d14bf
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #77673 ReflectionClass::getDefaultProperties returns spooky array
2019-02-27 09:18:20 +01:00
Joe Watkins
1ca9d818b8
Fix #77673 ReflectionClass::getDefaultProperties returns spooky array
2019-02-27 09:17:09 +01:00
Nikita Popov
879cd04913
Merge branch 'PHP-7.4'
2019-02-18 17:51:41 +01:00
Tyson Andre
9249d82019
Fix typos in code comments [skip ci]
2019-02-18 17:48:12 +01:00
Nikita Popov
ec694a9e81
Merge branch 'PHP-7.4'
2019-02-14 11:48:06 +01:00
Nikita Popov
1a5cff334d
Remove bogus ctor checks in get_class_methods() + reflection
...
Contrary to the comments, these only hide constructors (old or new
style) if they a) are inherited b) come from a trait and c) are
aliased -- which doesn't make any sense at all.
2019-02-14 11:47:31 +01:00
Dmitry Stogov
4474cf43e6
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed bug #77613 (method visibility change) (reverted ZEND_ACC_CTOR and ZEND_ACC_DTOR flags removal)
2019-02-14 13:18:45 +03:00
Dmitry Stogov
43a7d95016
Fixed bug #77613 (method visibility change) (reverted ZEND_ACC_CTOR and ZEND_ACC_DTOR flags removal)
2019-02-14 13:12:50 +03:00
Nikita Popov
c53852dc0a
Merge branch 'PHP-7.4'
2019-02-13 12:25:27 +01:00
Nikita Popov
6347f0b937
Implement ReflectionReference
...
RFC: https://wiki.php.net/rfc/reference_reflection
2019-02-13 12:21:18 +01:00
Gabriel Caruso
35db1ccdd1
Fix variadic arginfos for Reflection functions
...
Fix arginfos of required arguments for some Reflection methods
2019-02-10 14:29:08 -02:00
Dmitry Stogov
f45e0ce928
Remove ZEND_OVERLOADED_FUNCTION and corresponding call_method object handler
2019-02-07 21:05:46 +03:00
Dmitry Stogov
91ef4124e5
Refactor zend_object_handlers API to pass zend_object* and zend_string* insted of zval(s).
2019-02-04 13:20:25 +03:00
Peter Kokot
92ac598aab
Remove local variables
...
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.
A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.
This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.
With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.
Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files. All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Zeev Suraski
0cf7de1c70
Remove yearly range from copyright notice
2019-01-30 11:03:12 +02:00
Nikita Popov
d0fd2be642
Revert removal of private __clone() methods
...
I thought these were redundant, because we already NULL out the
clone_obj object handler. However, it turns out that reflection is
using private __clone() to determine clonability (isCloneable) for
the case where we only have a class, rather than an object.
As such, removing these methods would be a BC break.
This reverts commit e7131a4e9f
.
This reverts commit 55bd88ce0d
.
2019-01-14 09:19:30 +01:00
Nikita Popov
e219ec144e
Implement typed properties
...
RFC: https://wiki.php.net/rfc/typed_properties_v2
This is a squash of PR #3734 , which is a squash of PR #3313 .
Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
Co-authored-by: Joe Watkins <krakjoe@php.net>
Co-authored-by: Dmitry Stogov <dmitry@zend.com>
2019-01-11 15:49:06 +01:00
jvoisin
fbdaabba62
Fix some sign-related issues in comparisons
2019-01-09 10:01:12 +01:00
Nikita Popov
ba5cb2eb32
Remove unnecessary uses of object_and_properties_init
...
Use object_init_ex instead if the properties are NULL.
2019-01-07 16:00:29 +01:00
Nikita Popov
55bd88ce0d
Remove redundant __clone() methods from Reflection
...
Reflection classes already use NULLed clone_obj to signal that they
cannot be cloned, so it's not necessary to additionally declare a
throwing __clone() method.
2018-11-26 14:00:42 +01:00
Dmitry Stogov
0f7f1498be
Use ZEND_THIS macro to hide implementation details in extensions code.
2018-11-15 19:54:19 +03:00
Dmitry Stogov
c6ad0b92b7
Replace getThis() by EX(This), when additional check is not necessary.
2018-11-14 02:44:25 +03:00
Dmitry Stogov
d57cd36e47
Immutable clases and op_arrays.
...
Squashed commit of the following:
commit cd0c36c3f9
Merge: 4740dabb84
ad6738e886
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Oct 17 14:43:38 2018 +0300
Merge branch 'master' into immutable
* master:
Remove the "auto" encoding
Fixed bug #77025
Add vtbls for EUC-TW encoding
commit 4740dabb84
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Oct 17 14:12:28 2018 +0300
Reverted back ce->iterator_funcs_ptr. Initialize ce->iterator_funcs_ptr fields in immutable classes.
commit ad7a78b253
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Oct 17 11:46:30 2018 +0300
Added comment
commit 0276ea5187
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Oct 17 11:42:43 2018 +0300
Added type cast
commit c63fc5d5f1
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Oct 17 11:36:51 2018 +0300
Moved static class members initialization into the proper place.
commit b945548e93
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Oct 17 11:21:03 2018 +0300
Removed redundand assertion
commit d5a4108840
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Oct 17 11:19:13 2018 +0300
Removed duplicate code
commit 8dadca8864
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Oct 17 11:05:43 2018 +0300
Hide offset encoding magic in ZEND_MAP_PTR_IS_OFFSET(), ZEND_MAP_PTR_OFFSET2PTR() and ZEND_MAP_PTR_PTR2OFFSET() macros.
commit 9ef07c88bd
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Oct 17 10:48:29 2018 +0300
typo
commit a06f0f3d3a
Merge: 94099586ec
3412345ffe
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Oct 17 10:47:07 2018 +0300
Merge branch 'master' into immutable
* master:
Remove unused variable makefile_am_files
Classify object handlers are required/optional
Add support for getting SKIP_TAGSTART and SKIP_WHITE options
Remove some obsolete config_vars.mk occurrences
Remove bsd_converted from .gitignore
Remove configuration parser and scanners ignores
Remove obsolete buildconf.stamp from .gitignore
[ci skip] Add magicdata.patch exception to .gitignore
Remove outdated ext/spl/examples items from .gitignore
Remove unused test.inc in ext/iconv/tests
commit 94099586ec
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Oct 15 23:34:01 2018 +0300
Immutable clases and op_arrays
2018-10-17 15:52:50 +03:00
Nikita Popov
1cfbb21790
Classify object handlers are required/optional
2018-10-16 20:53:59 +02:00
Peter Kokot
902d39a3a7
Trim trailing whitespace in source code files
2018-10-13 14:14:50 +02:00
Nikita Popov
f48ee1ff58
Clarify that the get_properties handler is required
...
Some places were checking for non-null get_properties, some weren't.
Make it clear that the handler is required and such checks are not
necessary.
2018-10-04 12:46:50 +02:00