History log of /PHP-8.0/ext/zend_test/test.c (Results 1 – 25 of 67)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 62228a25 31-Jul-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Disable global state test on Windows

It looks like the config.w32 uses CHECK_HEADER_ADD_INCLUDE to add the include
path to libxml into the search path.
That doesn't happen in zend-te

Disable global state test on Windows

It looks like the config.w32 uses CHECK_HEADER_ADD_INCLUDE to add the include
path to libxml into the search path.
That doesn't happen in zend-test.
To add to the Windows trouble, libxml is statically linked in, ext/libxml can
only be built statically but ext/zend-test can be built both statically and
dynamically.
So the regression tests won't work in all possible configurations anyway on Windows.
All of this is no problem on Linux because it just uses dynamic linking
and pkg-config, without any magic.

Signed-off-by: Ben Ramsey <ramsey@php.net>

show more ...


# c283c3ab 15-Jul-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Sanitize libxml2 globals before parsing

Fixes GHSA-3qrf-m4j2-pcrr.

To parse a document with libxml2, you first need to create a parsing context.
The parsing context contains par

Sanitize libxml2 globals before parsing

Fixes GHSA-3qrf-m4j2-pcrr.

To parse a document with libxml2, you first need to create a parsing context.
The parsing context contains parsing options (e.g. XML_NOENT to substitute
entities) that the application (in this case PHP) can set.
Unfortunately, libxml2 also supports providing default set options.
For example, if you call xmlSubstituteEntitiesDefault(1) then the XML_NOENT
option will be added to the parsing options every time you create a parsing
context **even if the application never requested XML_NOENT**.

Third party extensions can override these globals, in particular the
substitute entity global. This causes entity substitution to be
unexpectedly active.

Fix it by setting the parsing options to a sane known value.
For API calls that depend on global state we introduce
PHP_LIBXML_SANITIZE_GLOBALS() and PHP_LIBXML_RESTORE_GLOBALS().
For other APIs that work directly with a context we introduce
php_libxml_sanitize_parse_ctxt_options().

show more ...


# a8437d08 20-Jun-2022 Christoph M. Becker

Fix GH-8827: Intentionally closing std handles no longer possible

We revert the commits which caused this regression from the PHP-8.0 and
PHP-8.1 branches for now. We keep it in "master

Fix GH-8827: Intentionally closing std handles no longer possible

We revert the commits which caused this regression from the PHP-8.0 and
PHP-8.1 branches for now. We keep it in "master" because of PR #8833
which may offer a proper fix without BC break.

show more ...


# fa78e177 16-May-2022 Levi Morrison

Stop closing stderr and stdout streams (#8569)

Extensions may (and do) write to stderr in mshutdown and similar. In
the best case, with the stderr stream closed, it's just swallowed.

Stop closing stderr and stdout streams (#8569)

Extensions may (and do) write to stderr in mshutdown and similar. In
the best case, with the stderr stream closed, it's just swallowed.

However, some libraries will do things like try to detect color, and
these will outright fail and cause an error path to be taken.

show more ...


# 74924ada 03-May-2022 vajexal <72415539+vajexal@users.noreply.github.com>

Fix get_function_or_method_name when included file is scoped (#8467)


# 471102ed 21-Oct-2021 Bob Weinand

Add ZEND_API for weakmap functionality via zend_weakrefs_hash_add/del

Closes GH-7600.


# 12b0f1b7 13-Sep-2021 Bob Weinand

Fix #81435 Observer current_observed_frame may point to an old (overwritten) frame

Ensure current_observed_frame always points to an actually observed frame.
This solution has a caveat o

Fix #81435 Observer current_observed_frame may point to an old (overwritten) frame

Ensure current_observed_frame always points to an actually observed frame.
This solution has a caveat of being O(stack size), with the worst case occurring if there are a lot of frames between the current and previous observed frames.
An O(1) solution would require keeping track of the previous observed frame, which would require some additional frame attached metadata, which is best not attempted in an already released version.

show more ...


# 38ebb55c 17-Mar-2021 Dmitry Stogov

Fixed bug #80847 (CData structs with fields of type struct can't be passed as C function argument)


# 5e06dad4 06-Feb-2021 Tyson Andre

Properly render 2+ namespaces functions in build/gen_stub.php

Affects ZEND_NS_FE

Add test cases of the global function

Backported to php 8.0 from GH-6664


# d5a82e2c 30-Nov-2020 Dmitry Stogov

Disable JIT with incompatible third-party extensions


Revision tags: php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5
# 58d41b8c 11-Nov-2020 Sammy Kaye Powers

Provide unused retvals to observers

Make sure that the return value is available to observers, even if
it is not used by the caller.

Closes GH-6422.


# 855d8fa6 11-Nov-2020 Dmitry Stogov

[Observer] Save opline before calling begin/end handlers


Revision tags: php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1
# 0427dcb9 30-Oct-2020 Christoph M. Becker

Fix bug79177.phpt wrt. JIT

JIT ignores that the `zend_write` callback is overwritten, so we define
our own callback and caller.

We also fix the "inconsistent DLL binding" warnin

Fix bug79177.phpt wrt. JIT

JIT ignores that the `zend_write` callback is overwritten, so we define
our own callback and caller.

We also fix the "inconsistent DLL binding" warnings on Windows, by
introducing `PHP_ZEND_TEST_API`.

Closes GH-6391.

show more ...


Revision tags: php-7.4.12, php-8.0.0RC3, php-7.3.24, php-8.0.0RC2, php-7.4.12RC1, php-7.3.24RC1
# c96d884d 07-Oct-2020 Nikita Popov

Avoid namespaced class symbol clashes in gen_stub

Add the namespace prefix (using underscores) to both the arginfo
name and the method declaration name.


# 9c710b1d 07-Oct-2020 Nikita Popov

Support "static" type in gen_stub


# dfa6d1c2 02-Oct-2020 Nikita Popov

Support specifying linkage for generate-function-entries

The linkage can be specified as the argument to the
@generate-function-entries tag. Test this on zend_test.


Revision tags: php-7.2.34, php-8.0.0rc1, php-7.4.11, php-7.3.23
# e42abeaf 24-Sep-2020 Sammy Kaye Powers

Pass zend_execute_data instead of zend_function to fcall init

The motivation for this change is to prevent extensions from having to check executor globals for the current execute_data durin

Pass zend_execute_data instead of zend_function to fcall init

The motivation for this change is to prevent extensions from having to check executor globals for the current execute_data during function call init. A previous implementation of the observer API initialized the function call from runtime cache initialization before execute_data was allocated which is why zend_function was passed in.

But now that the observer API is implemented via opcode specialization, it makes sense to pass in the execute_data. This also keeps the API a bit more consistent for existing extensions that already hook zend_execute_ex.

Closes GH-6209

show more ...


# d5d31ea3 18-Sep-2020 Dmitry Stogov

Cleanup observer API and add JIT support


Revision tags: php-8.0.0beta4, php-7.4.11RC1, php-7.3.23RC1
# c98d4769 10-Sep-2020 Máté Kocsis

Consolidate new union type ZPP macro names

They will now follow the canonical order of types. Older macros are
left intact due to maintaining BC.

Closes GH-6112


# 94fd52dd 03-Sep-2020 Levi Morrison

Add Z_PARAM_ITERABLE and co


Revision tags: php-8.0.0beta3, php-7.4.10, php-7.3.22, php-8.0.0beta2, php-7.3.22RC1, php-7.4.10RC1
# 8b37c1e9 15-Aug-2020 Benjamin Eberlei

Change Attribute Syntax from @@ to #[]


# 66c3e900 01-Sep-2020 Levi Morrison

Add zend_observer API

Closes GH-5857.

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
Co-authored-by: Sammy Powers <sammyk@datadoghq.com>


Revision tags: php-8.0.0beta1, php-7.4.9, php-7.2.33, php-7.3.21, php-8.0.0alpha3, php-7.4.9RC1, php-7.3.21RC1, php-7.4.8, php-7.2.32, php-8.0.0alpha2, php-7.3.20
# 470d1696 02-Jul-2020 Theodore Brown

Implement Shorter Attribute Syntax

RFC: https://wiki.php.net/rfc/shorter_attribute_syntax

Closes GH-5796.

Co-authored-by: Martin Schröder <m.schroeder2007@gmail.com>


# df2749da 21-Jul-2020 Nikita Popov

Tweak zend_test arginfo/zpp


# 6744ead1 17-Jul-2020 Nikita Popov

Parse parameters in zend_test_void_return()


123