The output normalization of bless_tests.php only detected absolute Unix
filenames; we extend this for absolute Windows filenames, regardless of
the platform we're running on (tests may have been run on Windows, but
bless_tests.php may be run from WSL or a Linux VM, for instance).
Closes GH-5353. From now on, PHP will have reflection information
about default values of parameters of internal functions.
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
Using this requires care! The zpp implementation for this union
must be consistent with the arginfo implementation!
Apart from array|object, this is probably only the case for
int|float right now.
Compute the diff between the old EXPECTF and the new output and
don't touch lines that still match the old EXPECTF. This reduces
the amount of manual fixup necessary after running bless_tests.php.
Resources used as array keys are generally handled by throwing a
notice and converting the resource to the resource handle. The only
exception is the [$resource => null] syntax, where this was treated
as an illegal offset type instead. However, this also only happened
for VM evaluations, the AST evaluator did handle resources correctly.
Fix the string generated when the `ns\class` is passed to a macro
#define ESCAPE(x) #x
// puts(ESCAPE(ns\class)); // warning: unknown escape sequence: \c
puts(ESCAPE(ns\\class)); // Properly prints ns\class to stdout.
Signature stubs for internal functions are specified in xyz.stub.php,
from which we generate actual arginfo structures in xyz_arginfo.h.
This file then needs to be included in the implementation appropriately.
Arginfo from stubs can be regenerated using scripts/dev/gen_stub.php.
However, this should also automatically happen when the stub file is
modified.
Instead of patching configuration headers template generated by
the given tools - autoheader, this moves patching these symbols to
the configure step before creating and invoking the config.status
and before the configuration header file is generated from the
patched template.
Closes GH-4374