History log of /PHP-8.2/ext/zend_test/test.stub.php (Results 26 – 50 of 86)
Revision Date Author Comments
# 02a80c5b 14-Aug-2023 George Peter Banyard

Fix various bugs related to DNF types

- GH-11958: DNF types in trait properties do not get bound properly
- GH-11883: Memory leak in zend_type_release() for non-arena allocated DNF typ

Fix various bugs related to DNF types

- GH-11958: DNF types in trait properties do not get bound properly
- GH-11883: Memory leak in zend_type_release() for non-arena allocated DNF types
- Internal trait bound to userland class would not be arena allocated
- Property DNF types were not properly deep copied during lazy loading

Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
Co-authored-by: ju1ius <jules.bernable@gmail.com>

show more ...


# 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 ...


# ef4f0883 04-Jul-2023 Ilija Tovilo

Revert "Fix GH-9967 Add support for generating custom function, class const, and property attributes in stubs"

This reverts commit d7ab0ff0c81bf672c3d4ac73e1b2cbd158296eef.


# d7ab0ff0 03-Jul-2023 Máté Kocsis

Fix GH-9967 Add support for generating custom function, class const, and property attributes in stubs


# 0ac55e9b 15-Apr-2023 Jakub Zelenka

Add zend_test_crash funtion to segfault PHP process

This is useful for testing PHP-FPM handling of crashed children.

Closes GH-11082


# 8a9b80cf 07-Mar-2023 Derick Rethans

Add test case


# ff62d117 04-Mar-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-8646: Memory leak PHP FPM 8.1

Fixes GH-8646
See https://github.com/php/php-src/issues/8646 for thorough discussion.

Interned strings that hold class entries can get a cor

Fix GH-8646: Memory leak PHP FPM 8.1

Fixes GH-8646
See https://github.com/php/php-src/issues/8646 for thorough discussion.

Interned strings that hold class entries can get a corresponding slot in map_ptr for the CE cache.
map_ptr works like a bump allocator: there is a counter which increases to allocate the next slot in the map.

For class name strings in non-opcache we have:
- on startup: permanent + interned
- on request: interned
For class name strings in opcache we have:
- on startup: permanent + interned
- on request: either not interned at all, which we can ignore because they won't get a CE cache entry
or they were already permanent + interned
or we get a new permanent + interned string in the opcache persistence code

Notice that the map_ptr layout always has the permanent strings first, and the request strings after.
In non-opcache, a request string may get a slot in map_ptr, and that interned request string
gets destroyed at the end of the request. The corresponding map_ptr slot can thereafter never be used again.
This causes map_ptr to keep reallocating to larger and larger sizes.

We solve it as follows:
We can check whether we had any interned request strings, which only happens in non-opcache.
If we have any, we reset map_ptr to the last permanent string.
We can't lose any permanent strings because of map_ptr's layout.

Closes GH-10783.

show more ...


# 7fccdf72 10-Feb-2023 SATO Kentaro

Add support for generating namespaced constant

Closes GH-10552


# fdd088fc 03-Oct-2022 Martin Schröder

Properly deal with internal attributes used on promoted properties.

Closes GH-9661


# 3e362f51 13-Aug-2022 George Peter Banyard

Add zend_string INI validators

Currently we only have validators for char* which is rather annoying as INI settings are saved as zend_string* in the first place

Closes GH-9328


# c547fc18 05-Sep-2022 Máté Kocsis

Add support for validation of missing class synopses (#9472)


# 869ab3c4 30-Aug-2022 Máté Kocsis

Adjust PHPDoc


# ef21bbe6 30-Aug-2022 Máté Kocsis

Fix zend/test aliases


# f7d42f64 23-Aug-2022 Andreas Braun

Update gen_stub to avoid compile errors on duplicate function names

Closes GH-9406


# 668dbaf6 30-Jul-2022 Máté Kocsis

Declare the TestInterface::DUMMY constant in stub


# 3c016467 28-Jul-2022 Andreas Braun

Escape \U and \u in generated stubs

This fixes an issue where a namespaced class beginning with "U" or "u"
would yield an invalid arginfo file due to the occurrence of a unicode
esca

Escape \U and \u in generated stubs

This fixes an issue where a namespaced class beginning with "U" or "u"
would yield an invalid arginfo file due to the occurrence of a unicode
escape sequence, causing a compile error.

Co-authored-by: Guilliam Xavier <guilliamxavier@users.noreply.github.com>

Closes GH-9154.

show more ...


# f4b5051c 25-Jul-2022 Máté Kocsis

Declare ext/zend_test constants in stubs (#9135)


# 4457dba1 22-Jul-2022 George Peter Banyard

Add support for stubs to declare intersection type class properties (#8751)


# 6e24c16c 12-Jul-2022 Remi Collet

add compatibility for tentative-return-type


# 9f29e2d7 05-Jul-2022 Bob Weinand

Allow for arbitrary (class) attributes in stubs

This can be easily extended to other types of attributes.

Closes #8839.


# efc8f0eb 17-Jun-2022 Arnaud Le Blanc

Deprecate zend_atol() / add zend_ini_parse_quantity() (#7951)

Add zend_ini_parse_quantity() and deprecate zend_atol(), zend_atoi()

zend_atol() and zend_atoi() don't just do number p

Deprecate zend_atol() / add zend_ini_parse_quantity() (#7951)

Add zend_ini_parse_quantity() and deprecate zend_atol(), zend_atoi()

zend_atol() and zend_atoi() don't just do number parsing.
They also check for a 'K', 'M', or 'G' at the end of the string,
and multiply the parsed value out accordingly.

Unfortunately, they ignore any other non-numerics between the
numeric component and the last character in the string.
This means that numbers such as the following are both valid
and non-intuitive in their final output.

* "123KMG" is interpreted as "123G" -> 132070244352
* "123G " is interpreted as "123 " -> 123
* "123GB" is interpreted as "123B" -> 123
* "123 I like tacos." is also interpreted as "123." -> 123

Currently, in php-src these functions are used only for parsing ini values.

In this change we deprecate zend_atol(), zend_atoi(), and introduce a new
function with the same behavior, but with the ability to report invalid inputs
to the caller. The function's name also makes the behavior less unexpected:
zend_ini_parse_quantity().

Co-authored-by: Sara Golemon <pollita@php.net>

show more ...


# 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 ...


# 7c28196a 01-Jun-2022 Sara Golemon

Partial revert of 6d96f39a68bb


# 6d96f39a 01-Jun-2022 Máté Kocsis

Get rid of invalid assertion and cleanup zend_call_method

Closes GH-8672


1234