History log of /php-src/build/gen_stub.php (Results 1 – 25 of 213)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# b06f2bc6 30-Nov-2024 Máté Kocsis

Improve documentation generation

- Really trim leading and trailing hyphens (single hyphens were not trimmed before)
- Create the necesary directories for even namespaced methods when ge

Improve documentation generation

- Really trim leading and trailing hyphens (single hyphens were not trimmed before)
- Create the necesary directories for even namespaced methods when generating methodsynopsis

show more ...


# be692621 30-Nov-2024 DanielEScherzer

gen_stub: drop support for `@refcount 0` with scalar return (#16505)

* gen_stub: drop support for `@refcount 0` with scalar return

Currenty, if `@refcount` is omitted, it is assumed

gen_stub: drop support for `@refcount 0` with scalar return (#16505)

* gen_stub: drop support for `@refcount 0` with scalar return

Currenty, if `@refcount` is omitted, it is assumed to be 0 for scalar return
types and "N" otherwise. On the other hand, if `@refcount` is provided, for a
scalar return type it *must* be 0, and for a non-scalar return type it
*must not* be 0. In other words, the ref count will be 0 if and only if the
return type is scalar, regardless of whether the `@refcount` tag is used.

In that case, adding `@refcount 0` does nothing, and since its presence
suggests it does something (why would a developer add code that does nothing?)
it is confusing and should be removed. As it happens, there are currently no
uses of `@refcount 0` in php-src, but why should we allow future uses?

Removing this support also allows simplifying the code a bit.

show more ...


# 02c2cfaa 26-Nov-2024 Máté Kocsis

Add support for non-parameter attribute rendering in stubs (#16926)


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


123456789