Nikita Popov
227a9c75ec
Add types to a couple of builtin functions
2019-06-17 14:47:20 +02:00
Nikita Popov
7d98dd9c1c
Merge branch 'PHP-7.4'
2019-06-11 10:29:20 +02:00
Nikita Popov
eecd8961d9
Add get_mangled_object_vars() function
2019-06-11 10:28:29 +02:00
Nikita Popov
252216b2de
Remove possible false return value from get_object_vars()
...
I'm not sure this one ever happens in practice (and we might want
to forbid NULL return from get_properties), but if it does, return
an empty array instead of false.
2019-06-06 09:49:25 +02:00
Dmitry Stogov
e029cc4dd4
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Cheaper checks for exceptions thrown from __toString()
2019-06-06 02:23:17 +03:00
Dmitry Stogov
457392fa64
Cheaper checks for exceptions thrown from __toString()
2019-06-06 01:47:22 +03:00
Nikita Popov
7686b0b889
Merge branch 'PHP-7.4'
2019-06-05 14:53:50 +02:00
Nikita Popov
a31f46421d
Allow exceptions in __toString()
...
RFC: https://wiki.php.net/rfc/tostring_exceptions
And convert some object to string conversion related recoverable
fatal errors into Error exceptions.
Improve exception safety of internal code performing string
conversions.
2019-06-05 14:25:07 +02:00
Nikita Popov
45a0656e95
Remove get() object handler
...
Now that set() is gone, there is little point in keeping get(), as
it is essentially just a different way of writing cast_object()
now.
Closes GH-4202.
2019-05-29 17:15:19 +02:00
Dmitry Stogov
c64fe84f8b
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Avoid double copying
2019-05-28 13:35:29 +03:00
Dmitry Stogov
b2cb6a4a27
Avoid double copying
2019-05-28 13:35:00 +03:00
Nikita Popov
1493c73582
Update MAY_BE_NULL func_info for Zend functions
...
These cannot return NULL anymore in PHP 8.
2019-05-28 11:43:23 +02:00
Nikita Popov
13f675b858
Merge branch 'PHP-7.4'
2019-05-27 09:38:33 +02:00
Nikita Popov
e6fac86dc3
Accept flags argument in zend_lookup_class_ex()
...
Instead of a single boolean, so we have space for extension here.
2019-05-27 09:36:25 +02: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
8ccdb8282e
Merge branch 'PHP-7.4'
2019-03-22 09:48:26 +01:00
rjhdby
5456a6ea92
Deduplicate code in zend_builtin_functions.c
2019-03-22 09:47:09 +01:00
Nikita Popov
1016e3a927
Merge branch 'PHP-7.4'
2019-02-19 10:07:47 +01:00
Tyson Andre
12ffee57d6
Fixed bug #77631
...
Do not include unbound anonymous classes in get_declared_classes().
Note that earlier PHP versions would include the anonymous class in
get_declared_classes(), and return false until the class was bound,
but would not crash.
2019-02-19 10:07:40 +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
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
623911f993
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Remove local variables
2019-02-03 21:23:18 +01: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
Nikita Popov
3d39479f4d
Remove support for case-insensitive constants
...
The only remaining case-insensitive constants are null, true and
false, which are handled explicitly.
In the future we may convert them from constants to reserved keywords.
2019-01-31 13:52:06 +01:00
Zeev Suraski
a81202ac49
Adios, yearly copyright ranges
2019-01-30 11:48:28 +01:00
Zeev Suraski
02557f87bc
Adios, yearly copyright ranges
2019-01-30 11:23:29 +02:00
Nikita Popov
23a5be3696
Remove ability to declare userland case-insensitive constants
...
This is part of https://wiki.php.net/rfc/case_insensitive_constant_deprecation .
This commit only removes the ability to declare such constants from
userland. Before the functionality can be removed entirely, it's
necessary to figure out the handling of true/false/null first.
2019-01-30 09:19:02 +01:00
Nikita Popov
6db97f5e3e
Remove each()
...
This has been deprecated in PHP 7.2 as part of
https://wiki.php.net/rfc/deprecations_php_7_2 .
2019-01-29 09:42:59 +01:00
Nikita Popov
ee16d99504
Remove create_function()
...
Deprecated in PHP 7.2 as part of
https://wiki.php.net/rfc/deprecations_php_7_2 .
2019-01-28 15:58:23 +01:00
Dmitry Stogov
cec091176c
Replace zend_hash_apply... with ZEND_HASH_FOREACH...
2018-12-19 02:49:56 +03:00
Zeev Suraski
9afce019e0
Future-proof email addresses
2018-11-01 18:35:32 +02:00
Zeev Suraski
54dc07f3dc
Update email addresses. We're still @Zend, but future proofing it...
2018-11-01 17:20:07 +02:00
Nikita Popov
149e6aaa99
Fix accessibility checks for dynamic properties
...
A dynamic property may be shadowed by a private/protected property.
Make sure we check property accessibility for non-indirect
properties as well.
Closes #3626 .
2018-10-22 16:46:33 +02: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
Nikita Popov
e25b23ed0c
Merge branch 'PHP-7.3'
2018-10-06 11:22:24 +02:00
Michael Moravec
0a6ddc7722
Fix bug #76979 : define() error message does not mention resources as valid values
2018-10-06 11:21:51 +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
Nikita Popov
10a1cfd17e
Merge branch 'PHP-7.3'
2018-09-19 09:40:12 +02:00
Nikita Popov
040ca85eac
Merge branch 'PHP-7.2' into PHP-7.3
2018-09-19 09:39:31 +02:00
Nikita Popov
cc1fb02760
Merge branch 'PHP-7.1' into PHP-7.2
2018-09-19 09:39:13 +02:00
Nikita Popov
294fb83ee8
Fixed bug #76901
...
get_method() may modify the object pointer passed to it if method
forwarding is used. In this case we do not want to modify the
passed zval, so make sure that we copy the object into a temporary
first.
2018-09-19 09:37:04 +02:00
Dmitry Stogov
b634ded197
Class constants and default property values can't be IS_REFERENCE anymore.
2018-09-18 18:46:10 +03:00
Dmitry Stogov
3a249e769b
Squashed commit of the following:
...
commit 2d3cac9e00
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Sep 11 11:54:47 2018 +0300
Fixed static property access
commit 31786ee272
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Sep 11 11:05:29 2018 +0300
Avoid duplicate checks
commit 5ae502b979
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Sep 11 10:39:17 2018 +0300
Optimization
commit 82c17f0e8a
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Sep 11 09:26:50 2018 +0300
Removed unused zend_duplicate_property_info()
commit ba53d1d0dd
Merge: eacc11b8fd
c4b14370cf
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Sep 11 09:24:13 2018 +0300
Merge branch 'master' into shadow
* master:
7.0.33 next
Sync NEWS [ci skip]
add NEWS for 76582
Enforce ordering of property compare in object comparisons
Fixed wrong assertion
Skip test on unsuitable env
commit eacc11b8fd
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Sep 10 13:12:39 2018 +0300
Fixed failure of ext/spl/tests/array_017.phpt
commit 62d1871430
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Sep 10 11:55:07 2018 +0300
Fixed issues
commit 1d37e3a40e
Merge: d6c3f098b6
1e550e6f7e
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Sep 10 10:21:20 2018 +0300
Merge branch 'master' into shadow
* master:
Update NEWS
Fix for bug #76582
Fix ssl stream reneg limit test to print only after first renegotiation
Make a copy unconditionally
Fix memory leak in pcre cache
Remove not needed checking for <errno.h>
Remove HAVE_ASSERT_H
Add test for bug #76850
Fixed bug #76850 Exit code mangled by set locale/preg_match
Remove empty PHP tags from test
Fix #75273 : php_zlib_inflate_filter() may not update bytes_consumed
Fix PCRE2 exclusion and remove dead libs in Makefile.gcov
Report mem leaks to stderr if no Win debugger is present
Use combined assignment contanation operator
Fixed bug #76796
Support fixed address mmap without replacement
commit d6c3f098b6
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Sep 7 13:56:30 2018 +0300
Get rid of ZEND_ACC_SHADOW
2018-09-11 11:56:45 +03:00
Dmitry Stogov
8939c4d96b
Get rid of ZEND_ACC_CTOR, ZEND_ACC_DTOR and ZEND_ACC_IMPLEMENTED_ABSTRACT
2018-09-05 13:16:10 +03:00
Dmitry Stogov
93f9ee7217
Use zend_class_entry/zend_function type names instead of _zend_class_entry/_zend_function tags.
2018-08-22 14:01:14 +03:00