History log of /php-src/build/gen_stub.php (Results 1 – 25 of 210)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 7202d119 12-Nov-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix parameter list generation in build/gen_stub.php (#16764)

[ci skip]

<variablelist> is not valid within <simpara>, this should not be wrapped
at all in a paragraph.
Regres

Fix parameter list generation in build/gen_stub.php (#16764)

[ci skip]

<variablelist> is not valid within <simpara>, this should not be wrapped
at all in a paragraph.
Regressed in 32789c00476e185daf4a24e82694164295a3b31f.

show more ...


# 32789c00 22-Oct-2024 Gina Peter Banyard

[skip ci] gen_stub: Use simpara by default instead of para tags for documentation


# 517ac201 08-Oct-2024 Nikita Popov

Remove special handling of exit/die in stubs

PHP-Parser 5.3.1 allows these as function names to allow direct
use in stubs.


# 2501cad2 04-Oct-2024 DanielEScherzer

Stubs and generated arginfo: remove tentative returns from final methods (#16213)

A tentative return type is used to allow userland code that overrides a method
to not include a typehint

Stubs and generated arginfo: remove tentative returns from final methods (#16213)

A tentative return type is used to allow userland code that overrides a method
to not include a typehint without a fatal error; this is inapplicable to final
methods (including all methods of final classes), which cannot be overridden.
Remove the tentative return declarations, and update the build script to
complain about future additions.

show more ...


# 7a8b1f68 30-Sep-2024 DanielEScherzer

Generated arginfo header files: use known strings for prop names when… (#15751)

Instead of allocating, using, and then releasing a zend_string for every
property name unconditionally, on

Generated arginfo header files: use known strings for prop names when… (#15751)

Instead of allocating, using, and then releasing a zend_string for every
property name unconditionally, only do so when the minimum supported version of
PHP does not have that string in its known strings (ZEND_KNOWN_STRINGS). If the
string is already known, just use the known version directly. This is already
done for some non-generated class registrations, e.g. in
`zend_enum_register_props()`.

show more ...


# db545767 10-Sep-2024 DanielEScherzer

Rename `ZEND_STR_DEPRECATED` to `ZEND_STR_DEPRECATED_CAPITALIZED` (#15831)

To match other capitalized strings like `ZEND_STR_UNKNOWN_CAPITALIZED` and
`ZEND_STR_ARRAY_CAPITALIZED`. Since

Rename `ZEND_STR_DEPRECATED` to `ZEND_STR_DEPRECATED_CAPITALIZED` (#15831)

To match other capitalized strings like `ZEND_STR_UNKNOWN_CAPITALIZED` and
`ZEND_STR_ARRAY_CAPITALIZED`. Since this known string was only added in PHP
8.4, no backwards compatibility alias is needed.

show more ...


# 5dd05756 04-Sep-2024 DanielEScherzer

Generated arginfo header files: combine preprocessor conditional blocks (#15736)

When functions' or class methods' availability is based on some preprocessor
condition, the generated arg

Generated arginfo header files: combine preprocessor conditional blocks (#15736)

When functions' or class methods' availability is based on some preprocessor
condition, the generated arginfo header files wrap the declarations in the
preprocessor `#if` conditional blocks, one per declaration, even if they are in
the same conditional block based on comments in the stub file. Instead of
having multiple conditional blocks one after the other with the same condition,
combine them into a single conditional block.

show more ...


# 53cb8967 03-Sep-2024 DanielEScherzer

Generated arginfo header files: remove empty zend_function_entry arrays (#15705)

When a class (or enum) has no methods, rather than using an array that only
contains `ZEND_FE_END`, use `

Generated arginfo header files: remove empty zend_function_entry arrays (#15705)

When a class (or enum) has no methods, rather than using an array that only
contains `ZEND_FE_END`, use `NULL` for the functions. The implementation of
class registration for internal classes, `do_register_internal_class()` in
zend_API.c, already skips classes where the functions are `NULL`. By removing
these unneeded arrays, we can reduce the size of the header files, while also
removing an unneeded call to zend_register_functions() for each internal class
with no extra methods.

show more ...


# f78d5cfc 27-Jul-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Allow ZEND_ACC_VIRTUAL to be used to not have property backing storage without resorting to hooks

This is useful to reduce the memory usage of objects that don't actually
use the backing

Allow ZEND_ACC_VIRTUAL to be used to not have property backing storage without resorting to hooks

This is useful to reduce the memory usage of objects that don't actually
use the backing storage. Examples are XMLReader and DOM. When the
properties were added to the stubs, these objects became much much
bigger, which is a waste of memory.

Closes GH-11644.

Work towards GH-13988.

show more ...


# 8d12f666 24-Aug-2024 Máté Kocsis

Fix registration of internal readonly child classes (#15459)

Currently, internal classes are registered with the following code:

INIT_CLASS_ENTRY(ce, "InternalClass", class_Internal

Fix registration of internal readonly child classes (#15459)

Currently, internal classes are registered with the following code:

INIT_CLASS_ENTRY(ce, "InternalClass", class_InternalClass_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
class_entry->ce_flags |= ...;

This has worked well so far, except if InternalClass is readonly. It is because some inheritance checks are run by zend_register_internal_class_ex before ZEND_ACC_READONLY_CLASS is added to ce_flags.

The issue is fixed by adding a zend_register_internal_class_with_flags() zend API function that stubs can use from now on. This function makes sure to add the flags before running any checks. Since the new API is not available in lower PHP versions, gen_stub.php has to keep support for the existing API for PHP 8.3 and below.

show more ...


# d100caa4 14-Aug-2024 Gina Peter Bnayard

[skip ci] Add NEWS/UPGRADING + wording amendment for GH-13483


# a79c70f5 14-Aug-2024 Gina Peter Banyard

[RFC] Convert exit (and die) from language constructs to functions (#13483)

RFC: https://wiki.php.net/rfc/exit-as-function


# 72c87469 02-Jul-2024 Benjamin Eberlei

RFC: Add `#[\Deprecated]` Attribute (#11293)

see https://wiki.php.net/rfc/deprecated_attribute

Co-authored-by: Tim Düsterhus <tim@tideways-gmbh.com>
Co-authored-by: Ilija Tovilo

RFC: Add `#[\Deprecated]` Attribute (#11293)

see https://wiki.php.net/rfc/deprecated_attribute

Co-authored-by: Tim Düsterhus <tim@tideways-gmbh.com>
Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>

show more ...


# a2cecd2a 27-Jun-2024 Máté Kocsis

Remove ZEND_STATIC_ASSERT() calls from legacy arginfo files

After report in https://github.com/php/php-src/commit/5992a297246ab2a6ab0cd00707dcebbff8845851#r143540472


# a1ea4640 19-Jun-2024 Tim Düsterhus

gen_stub: Intern the parameter name string for named arguments in internal attributes (#14595)

This is necessary because `zend_get_attribute_object()` will use the persistent
string with

gen_stub: Intern the parameter name string for named arguments in internal attributes (#14595)

This is necessary because `zend_get_attribute_object()` will use the persistent
string with the parameter name as the index for a newly created non-persistent
HashTable, which is not legal.

As parameter names are expected to be short-ish, reasonably common terms and
need to sit around in memory anyways, we might as well make them an interned
string, circumstepping the issue without needing to duplicate the parameter
name into a non-persistent string.

show more ...


# bed11e4e 14-Jun-2024 Máté Kocsis

Generate DocBook 5.2 conformant class synopses pages (#14351)

Related to https://github.com/php/doc-en/pull/3415


# 28cac943 06-Jun-2024 Máté Kocsis

Fix registration of readonly classes

Properties of readonly classes should be implicitly marked as readonly.


# c08535c8 30-May-2024 Máté Kocsis

Fix regex for searching for constant lists

https://github.com/php/php-src/commit/0242577b3378c91e5d973132e175849f3ca0cdc3 partly fixed the detection of external constant lists referenced on

Fix regex for searching for constant lists

https://github.com/php/php-src/commit/0242577b3378c91e5d973132e175849f3ca0cdc3 partly fixed the detection of external constant lists referenced on Predefined Constants pages, but changing the file search regex is needed too in order to fully fix the underlying issue in case of cURL constants.

show more ...


# 0242577b 29-May-2024 Máté Kocsis

Also check constants in referenced constant lists

Some constants are extracted from Predefined Constants pages (e.g. https://github.com/php/doc-en/pull/3413), which should alsobe checked whe

Also check constants in referenced constant lists

Some constants are extracted from Predefined Constants pages (e.g. https://github.com/php/doc-en/pull/3413), which should alsobe checked when verifying the manual.

show more ...


# cf004ed4 28-May-2024 Máté Kocsis

Fix implicitly nullable type detection in stubs


# be19e795 27-May-2024 Valentin Udaltsov

Fix gen_stub.php errors (#14335)


# 78f72cff 20-May-2024 Máté Kocsis

Add support for generating parameter attributes for the manual (#14270)


# f093015a 17-May-2024 Máté Kocsis

Fix class constant and property ID generation for the manual (#14249)

Related to https://github.com/php/doc-en/pull/3367


# 5bb03158 19-Mar-2024 Máté Kocsis

Add the last few remaining constants to stubs (#13751)

Basically all constants are now declared via stubs. The rest of the constants are either deprecated (`SID` or `MHASH_*`) or out of inte

Add the last few remaining constants to stubs (#13751)

Basically all constants are now declared via stubs. The rest of the constants are either deprecated (`SID` or `MHASH_*`) or out of interest (`__COMPILER_HALT_OFFSET__` and `PHP_CLI_PROCESS_TITLE`).

show more ...


# 5992a297 18-Mar-2024 Máté Kocsis

Improve BC support of arginfo files fenerated by gen_stub.php (#13705)

- Declared compatibility expectations of stub files are now enforced by a ZEND_STATIC_ASSERT call at the top of arginfo

Improve BC support of arginfo files fenerated by gen_stub.php (#13705)

- Declared compatibility expectations of stub files are now enforced by a ZEND_STATIC_ASSERT call at the top of arginfo files
- Property registration for PHP 7 is fixed: function zend_declare_property_ex() is used again instead of zend_declare_typed_property(). This has been a regression since I added support for exposing doc comments.
- As a defensive measure, deep cloning is performed before newer features (type declarations, attributes etc.) are discarded before generating legacy arginfo files. Until now, some of the objects were forgotten to be taken care of. These omissions may have resulted in some weird bugs in theory (but probably they didn't have much impact in practice).
- PHP version related conditions inside *non-legacy arginfo files* used to possibly check for the 70000 version iD until now if compatibility with PHP 7.0 was declared in a stub. This was not 100% correct, since non-legacy arginfo files are only for PHP 8.0+. Now, I made sure that at least PHP version ID 80000 is used in the preprocessor conditions. The solution was a bit tricky though...

show more ...


123456789