Peter Kokot
18295b396f
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix typos in code comments in Zend/ [skip ci]
2019-02-18 17:56:38 +01:00
Tyson Andre
da3316ff0f
Fix typos in code comments in Zend/ [skip ci]
2019-02-18 17:56:28 +01:00
Dmitry Stogov
f45e0ce928
Remove ZEND_OVERLOADED_FUNCTION and corresponding call_method object handler
2019-02-07 21:05:46 +03:00
Dmitry Stogov
d2f196f6f7
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Reset common fields of EG(trampoline)
2019-02-04 13:58:24 +03:00
Dmitry Stogov
223d535d05
Reset common fields of EG(trampoline)
2019-02-04 13:57:03 +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
a81202ac49
Adios, yearly copyright ranges
2019-01-30 11:48:28 +01:00
Nikita Popov
7f13557843
Merge branch 'PHP-7.3'
2019-01-25 11:03:29 +01:00
Nikita Popov
f78e681428
Fixed bug #77498
...
I've renamed the function to the same name as the exported symbol
in master.
2019-01-25 11:01:06 +01:00
Dmitry Stogov
44f4370880
Micro-optimization
2019-01-16 12:49:28 +03:00
Dmitry Stogov
9f05f64240
Extend zend_get_property_offset() to return property_info for typed properties.
2019-01-16 11:56:53 +03:00
Nikita Popov
61d00c0c55
Fix handling of UNDEF properties in compound assign
...
Restore NULLing of UNDEF values in get_property_ptr_ptr for the
BP_VAR_R and BP_VAR_RW cases.
2019-01-15 09:55:55 +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
Nikita Popov
d6e32c6ba7
Require that write_property value is not a reference
...
We explicitly dereference values before claling write_property,
so no need to do duplicate work.
2019-01-09 17:09:48 +01: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
Peter Kokot
902d39a3a7
Trim trailing whitespace in source code files
2018-10-13 14:14:50 +02:00
Nikita Popov
0b6063f331
Restore array_key_exists() compatibility for ArrayObject
...
Doing this by special-casing array_key_exists() for ArrayObject.
2018-10-11 16:10:22 +02:00
Nikita Popov
4d5d77904e
Fix foreach/get_object_vars for shadowed properties
...
If we are in a scope where the shadowed private property is
visible, the shadowing public property should not be visible.
2018-10-10 23:18:34 +02:00
Nikita Popov
7ec8087f80
Introduce get_properties_for() handler
...
This handler allows getting the object properties for a particular
purpose, such as array casting, serialization, etc.
2018-10-10 10:39:10 +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
Dmitry Stogov
a2e8334613
Allocate only necessary space for static properties of internal classes in ZTS mode.
2018-10-01 19:05:31 +03:00
Nikita Popov
5a4cb3edde
Fix missing access errors for guarded properties
...
If a property access would normally result in a magic method call,
but the property is subject to an active recursion guard, the
access should behave as if the magic method does not exist.
This commit fixes one instance where this was not the case -- we
should have been generating a property access error, but instead
the operation simply did not do anything.
2018-09-27 14:58:26 +02:00
Dmitry Stogov
49b92446d7
Remove zend_check_private()
2018-09-13 13:47:06 +03:00
Dmitry Stogov
a12cd1c5e0
Split error code into "cold" functions and cleanup.
2018-09-13 10:31:49 +03:00
Dmitry Stogov
e1ef054be5
Micro-optimization (condition reordering)
2018-09-13 09:31:38 +03:00
Dmitry Stogov
eb4148e02d
typo
2018-09-13 08:49:21 +03:00
Dmitry Stogov
f79270d876
Micro-optimization
2018-09-13 01:41:19 +03:00
Dmitry Stogov
cdeebfd4af
Avoid unnecesury iterations over parent classes, in case of no overriden private properties.
2018-09-12 23:47:52 +03:00
Dmitry Stogov
5293dd9d8b
Optimize method/property visibility checks
2018-09-12 18:59:12 +03:00
Dmitry Stogov
3444c260a2
Merge branch 'PHP-7.3'
...
* PHP-7.3:
Fixed bug #76869 (Incorrect bypassing protected method accessibilty check).
2018-09-12 12:27:48 +03:00
Dmitry Stogov
655a99d131
Fixed bug #76869 (Incorrect bypassing protected method accessibilty check).
2018-09-12 12:16:50 +03:00
Dmitry Stogov
aee4b145ef
Optimisation: Check for private property in parent class makes sense only if we already found a property info. Check for property started with "\\0" makes sense only if we didn't find property info.
2018-09-12 09:57:36 +03:00
Dmitry Stogov
73efd1b651
Simplify method visibility checks
2018-09-12 08:31:01 +03:00
Dmitry Stogov
06f056a760
Additional fix for bug #76860 .
2018-09-11 18:29:27 +03:00
Nikita Popov
e1123e3e4e
Drop unused variable
2018-09-11 15:16:11 +02: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
Sara Golemon
7f56150ef2
Merge branch 'PHP-7.3'
...
* PHP-7.3:
Enforce ordering of property compare in object comparisons
2018-09-10 08:56:19 -04:00
Sara Golemon
a26a107aae
Enforce ordering of property compare in object comparisons
2018-09-10 08:47:50 -04:00
Dmitry Stogov
1321aa5080
Merge branch 'PHP-7.3'
...
* PHP-7.3:
Stop using zend_function->reserved[] space.
2018-08-22 10:44:34 +03:00
Dmitry Stogov
8d95f561e4
Stop using zend_function->reserved[] space.
2018-08-22 10:43:51 +03:00
Gabriel Caruso
84b195d9fc
Fix some misspellings
2018-08-12 16:15:45 +02:00
Xinchen Hui
642bb9f376
Unused var
2018-08-01 16:45:15 +02:00
Xinchen Hui
85145e509e
Unused var
2018-08-01 14:49:06 +08:00
Dmitry Stogov
3ccd985478
Improved method visibility checks
2018-07-31 13:05:57 +03:00
Dmitry Stogov
57527455eb
Simplified property name to string conversion
2018-07-31 12:24:53 +03:00
Dmitry Stogov
c42f0ba4f7
Removed useless IS_UNDEF checks
2018-07-31 12:23:46 +03:00