#
a45bef0a |
| 09-Mar-2023 |
Derick Rethans |
Merge branch 'PHP-8.1' into PHP-8.2
|
#
717335ec |
| 06-Mar-2023 |
Derick Rethans |
Fixed macro generation for variadics, which don't have a default value |
#
bbcc1dad |
| 03-Mar-2023 |
Derick Rethans |
Merge branch 'PHP-8.1' into PHP-8.2
|
#
7fcea9d2 |
| 03-Mar-2023 |
Derick Rethans |
Add missing ZEND_ARG_VARIADIC_OBJ_TYPE_MASK macro, and use consistent class_name variable name |
#
5a0b68be |
| 14-Sep-2022 |
Bob Weinand |
Revert "Store default object handlers alongside the class entry" This reverts commit 9e6eab3c139b41dc976dd5305fd1a6e387e5e27f. Reverted along a01dd9fedaecd2e5b95bc5c2e8d6542116addea
Revert "Store default object handlers alongside the class entry" This reverts commit 9e6eab3c139b41dc976dd5305fd1a6e387e5e27f. Reverted along a01dd9fedaecd2e5b95bc5c2e8d6542116addeae.
show more ...
|
#
9e6eab3c |
| 22-Jul-2022 |
Bob Weinand |
Store default object handlers alongside the class entry Object handlers being separate from class entries is a legacy inherited from PHP 5. Today it has little benefit to keep them separate:
Store default object handlers alongside the class entry Object handlers being separate from class entries is a legacy inherited from PHP 5. Today it has little benefit to keep them separate: in fact, accessing object handlers usually requires not-so-safe hacks. While it is possible to swap handlers in a custom installed create_object handler, this mostly is tedious, as well as it requires allocating the object handlers struct at runtime, possibly caching it etc.. This allows extensions, which intend to observe other classes to install their own class handlers. The life cycle of internal classes may now be simply observed by swapping the class handlers in post_startup stage. The life cycle of userland classes may be observed by iterating over the new classes in zend_compile_file and zend_compile_string and then swapping their handlers. In general, this would also be a first step in directly tying the object handlers to classes. Especially given that I am not aware of any case where the object handlers would be different between various instances of a given class. Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
show more ...
|
#
11796229 |
| 21-Jan-2022 |
Tim Starling |
Add libxml_get_external_entity_loader() Add libxml_get_external_entity_loader(), which returns the currently installed external entity loader, i.e. the value which was passed to libx
Add libxml_get_external_entity_loader() Add libxml_get_external_entity_loader(), which returns the currently installed external entity loader, i.e. the value which was passed to libxml_set_external_entity_loader() or null if no loader was installed and the default entity loader will be used. This allows libraries to save and restore the loader, controlling entity expansion without interfering with the rest of the application. Add macro Z_PARAM_FUNC_OR_NULL_WITH_ZVAL(). This allows us to get the zval for a callable parameter without duplicating callable argument parsing. The saved zval keeps the object needed for fcc/fci alive, simplifying memory management. Fixes #76763.
show more ...
|
#
d0d6dae8 |
| 22-Aug-2022 |
George Peter Banyard |
Add a new zend API to check that strings don't have NUL bytes (#9375) Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de> |
#
faa83f2f |
| 04-Aug-2022 |
George Peter Banyard |
Convert some macros to zend_always_inline functions (#8288) This doesn't have an effect really, but humans and IDEs can struggle to see through the macro soup when they first interact with P
Convert some macros to zend_always_inline functions (#8288) This doesn't have an effect really, but humans and IDEs can struggle to see through the macro soup when they first interact with PHP's source code. Moreover, this reduces some of the macro expansion hell when they appear in compiler warnings.
show more ...
|
#
9115211e |
| 15-May-2021 |
George Peter Banyard |
Use uint32_t in Z_PARAM_VARIADIC_WITH_NAMED |
#
7aadbcb8 |
| 24-May-2022 |
Ilija Tovilo |
GH-8344 Fetch properties of enums in const expressions |
#
af15923b |
| 08-Jun-2022 |
Rowan Tommins |
Extend deprecation notices to is_callable($foo) and callable $foo Implements https://wiki.php.net/rfc/partially-supported-callables-expand-deprecation-notices so that uses of "self" and
Extend deprecation notices to is_callable($foo) and callable $foo Implements https://wiki.php.net/rfc/partially-supported-callables-expand-deprecation-notices so that uses of "self" and "parent" in is_callable() and callable type constraints now raise a deprecation notice, independent of the one raised when and if the callable is actually invoked. A new flag is added to the existing check_flags parameter of zend_is_callable / zend_is_callable_ex, for use in internal calls that would otherwise repeat the notice multiple times. In particular, arguments to internal function calls are checked first based on arginfo, and then again during ZPP, so the former suppresses the deprecation notice. Some existing tests which raised this deprecation have been updated to avoid the syntax, but the existing version retained for maximum regression coverage until it is made an error. With thanks to Juliette Reinders Folmer for the RFC and initial investigation. Closes GH-8823.
show more ...
|
#
76fcd70c |
| 25-Jun-2022 |
Ilija Tovilo |
Fix enum preloading again (#8859) |
#
280b3db0 |
| 21-Jun-2022 |
George Peter Banyard |
Use same type error wording for alias iterable in ZPP (#8838) Follow-up from #7309 as I didn't change the ZPP TypeError wording. |
#
b1223ee3 |
| 16-Jun-2022 |
twosee |
Use get_active_function_or_method_name() for zend_forbid_dynamic_call() (#8762) A slight imperfection in https://github.com/php/php-src/pull/7443. As a zend_API, we should also consider
Use get_active_function_or_method_name() for zend_forbid_dynamic_call() (#8762) A slight imperfection in https://github.com/php/php-src/pull/7443. As a zend_API, we should also consider other extensions that may call it in methods. This change will not break the behavior of php-src.
show more ...
|
#
a6387fa3 |
| 09-Jun-2022 |
Jakub Zelenka |
Merge branch 'PHP-8.1'
|
#
976cbba7 |
| 09-Jun-2022 |
Jakub Zelenka |
Merge branch 'PHP-8.0' into PHP-8.1
|
#
b765d4cd |
| 21-May-2022 |
Jakub Zelenka |
Fix bug #50293 and #81713: file path checking in OpenSSL functions It introduces a single function to check file paths passed to OpenSSL functions. It expands the path, check null bytes
Fix bug #50293 and #81713: file path checking in OpenSSL functions It introduces a single function to check file paths passed to OpenSSL functions. It expands the path, check null bytes and finally does an open basedir check.
show more ...
|
#
733023b2 |
| 10-Mar-2022 |
Ilija Tovilo |
Improve error message class type Refer to interfaces/enums instead of classes in more places. Closes GH-7792 Closes GH-8187 |
#
32e2d97a |
| 20-Dec-2021 |
Tyson Andre |
Allow internal functions to declare if they support compile-time evaluation, add functions. (#7780) https://wiki.php.net/rfc/strtolower-ascii means that these functions no longer depend
Allow internal functions to declare if they support compile-time evaluation, add functions. (#7780) https://wiki.php.net/rfc/strtolower-ascii means that these functions no longer depend on the current locale in php 8.2. Before that, this was unsafe to evaluate at compile time. Followup to GH-7506 Add strcmp/strcasecmp/strtolower/strtoupper functions Add bin2hex/hex2bin and related functions Update test of garbage collection using strtolower to use something else to create a refcounted string
show more ...
|
#
024d5f4b |
| 01-Dec-2021 |
Tyson Andre |
Cache method overrides of ArrayAccess in zend_class_entry Previously, code such as subclasses of SplFixedArray would check for method overrides when instantiating the objects. T
Cache method overrides of ArrayAccess in zend_class_entry Previously, code such as subclasses of SplFixedArray would check for method overrides when instantiating the objects. This optimization was mentioned as a followup to GH-6552
show more ...
|
#
1afe89f8 |
| 21-Oct-2021 |
George Peter Banyard |
Remove (ZEND_)WRONG_PARAM_COUNT_WITH_RETVAL macros A TypeError is always emitted therefore assigning a retval is pointless and incorrect. |
#
449bb057 |
| 01-Sep-2021 |
Nikita Popov |
Drop IS_CALLABLE_CHECK_SILENT flag This flag was suppressing *some* but not all errors in zend_is_callable(), and is no longer used. You can avoid errors by omitting the error argume
Drop IS_CALLABLE_CHECK_SILENT flag This flag was suppressing *some* but not all errors in zend_is_callable(), and is no longer used. You can avoid errors by omitting the error argument.
show more ...
|
#
485d3acf |
| 01-Sep-2021 |
Nikita Popov |
Make zend_call_function() failure handling consistent This API had rather peculiar behavior in case the provided function is not callable. For some types of failures, it would silently
Make zend_call_function() failure handling consistent This API had rather peculiar behavior in case the provided function is not callable. For some types of failures, it would silently return FAILURE (e.g. a function does not exist), while for others (e.g. a class does not exist) it would generate a warning. Depending on what the calling code does, this can either result in silent failure or duplicate errors. This commit switches the contract such that zend_call_function() always (*) succeeds, though that success might be in the form of throwing an exception. Calling a non-callable will now consistently throw an exception. There are some rare callers that do want to ignore missing methods, for legacy APIs that are specific with optional methods. For these use cases a new zend_call_method_if_exists() API is provided. Calling code generally does not need to explicitly check for and report zend_call_function() failures -- it can rely on zend_call_function() having already done so. However, existing code that does check for failure should continue to work fine. (*) The only exception to this is if EG(active) being false during late engine shutdown. This is not relevant to most code, but code running in destructors and similar may need to be aware of the possibility.
show more ...
|
#
a13730c5 |
| 01-Sep-2021 |
twosee |
Simplify zend_forbid_dynamic_call() (#7443) The special cases (parse_str/mb_parse_str with a single argument) have been removed completely, we can simplify it now. |