Commit Graph

208 Commits

Author SHA1 Message Date
Tyson Andre
650801ce45 [skip ci] Fix grammar/typo nits in docs
The PHP error message says "well-formed", not "well formed"

Fixes GH-5920
2020-08-01 18:03:45 -04:00
Máté Kocsis
02b03df91a
Document the signature change of zend_get_closure_method_def() 2020-07-31 10:04:49 +02:00
Nikita Popov
e2f39f84e2 Remove PHP_CHECK_GCC_ARG()
In favor of AX_CHECK_COMPILE_FLAG(), which we bundle since at least
PHP 7.

Closes GH-5904.
2020-07-29 15:07:53 +02:00
Benjamin Eberlei
4890bf19aa Add error notification callbacks to UPGRADING.INTERNALS 2020-07-17 15:51:15 +02:00
Nikita Popov
f60cf0cfe7 Remove type argument from zend_get_zval_ptr
As pointed out by Levi, this is unused, and we already changed
the signature of this function for PHP 8.
2020-07-15 09:51:51 +02:00
George Peter Banyard
4f3eccfd4d Use consistent types
uint32_t type for argument count
size_t for length of char*
zend_bool for a zval bool arg

Closes GH-5845
2020-07-13 13:30:54 +02:00
Nikita Popov
0280c64a2e Add upgrading note
[ci skip]
2020-07-13 11:47:25 +02:00
George Peter Banyard
9839752a9c Voidify some ZEND_API functions
Closes GH-5805
2020-07-09 14:15:57 +02:00
Nikita Popov
302933daea Remove no_separation flag 2020-07-07 09:30:24 +02:00
Remi Collet
8d1a1120bf [skip ci] add upgrade note
Closes GH-5798
2020-07-06 10:57:55 +02:00
Christoph M. Becker
8d9637bdac [ci skip] (Hopefully) clarify meaning 2020-07-01 12:04:54 +02:00
Christoph M. Becker
942f341b4e Document zend_hash_sort and zend_ts_hash_sort signature change
Cf. <https://github.com/php/php-src/pull/3936>.
2020-07-01 10:11:58 +02:00
Alex Dowad
7b4179e8da Update UPGRADING.INTERNALS re: removed --disable-inline-optimization switch
This build configuration switch was removed in 3a19726bce.
2020-06-24 20:25:11 +02:00
Nikita Popov
ff19ec2df3 Introduce InternalIterator
Userland classes that implement Traversable must do so either
through Iterator or IteratorAggregate. The same requirement does
not exist for internal classes: They can implement the internal
get_iterator mechanism, without exposing either the Iterator or
IteratorAggregate APIs. This makes them usable in get_iterator(),
but incompatible with any Iterator based APIs.

A lot of internal classes do this, because exposing the userland
APIs is simply a lot of work. This patch alleviates this issue by
providing a generic InternalIterator class, which acts as an
adapater between get_iterator and Iterator, and can be easily
used by many internal classes. At the same time, we extend the
requirement that Traversable implies Iterator or IteratorAggregate
to internal classes as well.

Closes GH-5216.
2020-06-24 15:31:41 +02:00
Fabien Villepinte
293a0e797c Fix typo 2020-06-15 21:32:01 +02:00
Dmitry Stogov
f04f7c3995 Added note 2020-06-15 17:21:32 +03:00
Christoph M. Becker
68dd6cc92b Control VCRT leak reporting via environment variable in debug builds
Formerly, this had to be enabled by passing the configuration flag
`--enable-crt-debug`; now it can be enabled by setting the environment
variable `PHP_WIN32_DEBUG_HEAP`.  The advantage is that it is no longer
necessary to do separate builds, at the cost of a very minor
performance penalty during process startup.
2020-06-10 09:05:17 +02:00
George Peter Banyard
4865592525 Remove old ARG_COUNT() macro
Use ZEND_NUM_ARGS() instead.

Clsoes GH-5551
2020-05-11 16:52:04 +02:00
Nikita Popov
8fd7f02ea4 Make cast_object handler required
Avoid subtle differences in behavior depending on whether the
handler is absent or returns FAILURE.

If you previously set cast_object to NULL, create a handler that
always returns FAILURE instead.
2020-03-31 14:37:49 +02:00
Nikita Popov
33ef3d64da Use separate typedef for bucket comparison function
Avoid performing the same casting dance inside each sort compare
function.
2020-03-04 12:46:06 +01:00
Nikita Popov
b35b0142e6 Require all internal functions to have arginfo 2020-02-26 10:05:20 +01:00
Tyson Andre
d9b80efb57 [skip ci] Fix typos in UPGRADING
Closes GH-5183
2020-02-16 10:28:39 -05:00
Dmitry Stogov
64b40f69dc Make ASSIGN, ASSIGN_OP, INC and DEC opcodes to return IS_TMP_VAR instead of IS_VAR.
This helps to avoid unnecessary IS_REFERENCE checks.
This changes some notices "Only variables should be passed by reference" to exception "Cannot pass parameter %d by reference".

Also, for consistency, compile-time fatal error "Only variables can be passed by reference" was converted to exception "Cannot pass parameter %d by reference"
2020-02-07 13:36:52 +03:00
George Peter Banyard
2b5fb76de6 Apply custom format/length modifier removal to spprintf
This mimicks the changes made to the custom snprintf implementation
by removing the custom 'v' format and custom 'I' length modifier
from the spprintf implementation.

Closes GH-5108
2020-01-23 13:45:28 +01:00
George Peter Banyard
13178087c7 Drop the custom 'v' format from snprintf custom implementation.
Extensions should instead use the standard 's' format.

Closes GH-5100
2020-01-21 13:18:13 +01:00
George Peter Banyard
aaa1f90e3f Drop the custom I length modifier from snprintf custom implementation.
Extensions should rather use the ZEND_LONG_FMT, ZEND_ULONG_FMT and
ZEND_XLONG_FMT macros defined in php-src/Zend/zend_long.h

Closes GH-5089
2020-01-20 23:03:10 +01:00
Markus Staab
0eee18097f Fix typo [ci skip] 2019-10-07 23:11:19 +02:00
Dmitry Stogov
b02b81299c Comparison cleanup:
- introduce zend_compare() that returns -1,0,1 dirctly (without intermediate zval)
- remove compare_objects() object handler, and keep only compare() handler
2019-10-07 17:57:49 +03:00
Christoph M. Becker
652c09ecf7 [ci skip] Update UPGRADING.INTERNALS
Cf. <http://git.php.net/?p=php-src.git;a=commit;h=0c7124e6beff0a7b0540691db370148be06d242a>.
2019-09-24 16:20:18 +02:00
Peter Cowburn
4253811c42 upgrading notes for ValueError/zend_value_error() 2019-09-10 13:19:24 +01:00
Dmitry Stogov
57d9b94dea Simplify TMP/VAR operand releasing 2019-07-24 14:13:40 +03:00
Peter Kokot
24fbda0505 Update changelog 2019-07-21 00:39:44 +02:00
Peter Kokot
9310ac2ab5 Symbol HAVE_PCRE has been removed 2019-07-14 23:02:52 +02:00
Peter Kokot
bbd19a127b [ci skip] Mention HAVE_HASH_EXT 2019-06-26 03:15:28 +02:00
Nikita Popov
4d90848d68 Don't verify arginfo types for internal functions
To avoid duplicate type checks. In debug builds arginfo is still
checked and will generate an assertions if the function doesn't
subsequently throw an exception.

Some test results change due to differences in zpp and arginfo
error messages.
2019-06-17 11:46:28 +02:00
Christoph M. Becker
1a5fde5894 Fix typo 2019-06-03 10:34:32 +02:00
Nikita Popov
8a0965e3d6 Remove zpp L specifier
We don't use this internally anymore, and external usages should
be encouraged to move towards 'l'.
2019-06-03 09:39:17 +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
Nikita Popov
31a516cf96 Remove set() object handler 2019-05-29 10:00:06 +02:00
Joe Watkins
4383442923
Merge branch 'master' of git://github.com/php/php-src 2019-03-25 08:01:36 +01:00
Joe Watkins
bd73607b9e
TSRM cleanup for PHP8 2019-03-25 08:00:17 +01:00
Joe Watkins
161adfff3f
For consistency with Windows, and because ZTS is not experimental or a "maintainer" feature, this commits renames --enable-maintainer-zts to --enable-zts in the autotools build, and related documentation 2019-03-23 07:34:54 +01:00
Dmitry Stogov
f45e0ce928 Remove ZEND_OVERLOADED_FUNCTION and corresponding call_method object handler 2019-02-07 21:05:46 +03:00
Markus Staab
9d936669e8
fixed typo in UPGRADING.INTERNALS 2019-02-04 13:22:37 +01:00
Dmitry Stogov
6c81c4b613 Added note anout object habdlers API change 2019-02-04 13:47:09 +03:00
Nikita Popov
e118151139 Clear NEWS, UPGRADING and UPGRADING.INTERNALS 2019-01-28 11:17: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
Dmitry Stogov
76d8f3923e Revert HASH_FLAG_INITIALIZED into HASH_FLAG_UNINITIALIZED. 2018-12-28 11:22:18 +03:00
Dmitry Stogov
b95cd92b9d Added note about changes in class declaration opcodes 2018-12-24 10:51:48 +03:00
Dmitry Stogov
d356f6d72b Removed add_get_assoc_*() and add_get_index_*() API functions 2018-12-19 16:47:48 +03:00