When legacy arginfo is generated, all the type info gets lost. Since this task is performed before any other additional functionalities of gen_stub.php (e.g. verification, method synopsis and class synopsis generation), these fail as they would require the missing type information.
The issue is fixed by deep cloning the file info objects (albeit only their affected properties), so that we use those for legacy arginfo generation, leaving the original ones untouched.
We have to generate <ooclass> elements for interfaces (rather than <oointerface>) in a number of places: directly inside the <classsynopsis> element and in the extends list.
This change was originall only done for 'master'. Xdebug bundles this file as
it requires it, but PHP 7.2/7.3 don't have it bundled. By doing "phpize" with
master, it updates the file introducing a local diff. By fixing it in older
versions, that problem goes away.
This changes ClassInfo::createIncludeElement() such that it takes the $query
argument as-is for the xpointer attribute value. Special characters, like
" and &, are used as-is so be careful not to break the resulting XML.
This prevents serialization and unserialization of a class and its
children in a way that does not depend on the zend_class_serialize_deny
and zend_class_unserialize_deny handlers that will be going away
in PHP 9 together with the Serializable interface.
In stubs, `@not-serializable` can be used to set this flag.
This patch only uses the new flag for a handful of Zend classes,
converting the remainder is left for later.
Closes GH-7249.
Fixes bug #81111.
E.g. `build/gen_stub.php *.stub.php` will generate `*_arginfo.h`
from multiple files.
Previously, gen_stub.php would silently ignore files after the first file.
Invoking gen_stub.php with no arguments will continue to process the entire
directory.
Adjust FS in order_by_dep.awk to only each whitespace around (,)
rather than any whitespace. Thus a leading indent does not result
in a separate element.