Some extensions try to use the date features in their own shutdown,
most notably some logging functions. Because of that, move the
cache tear down until after these resources have been cleaned up.
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.
A number of error conditions in DOM can only occur if libxml2 runs
out of memory, at least as far as I can see. In such cases we
currently do a silent "return false", which violates the DOM spec,
and which code is very unlikely to handle sensibly.
Switch these to throw a DomException with INVALID_STATE_ERR type.
This error type is chosen because we use for similar checks
elsewhere, for example:
https://github.com/php/php-src/blob/a733b1ada7895f6fa5e349755a878cae9189e3f5/ext/dom/documentfragment.c#L45-L48
This changes some of the more obvious cases I spotted, but there are probably more.
Closes GH-7049.
- Truncated multi-byte characters are treated as an error
- Reject GB18030 4-byte codes which translate to (non-existent)
Unicode codepoints above 0x10FFFF
- Add a number of missing mappings from the GB18030 standards
(These mappings are supported by iconv. I don't know why they were
missing from mbstring.)
This is going to result in a compile-time error, but AST printing
is invoked first and should handle it gracefully. Handle it by
falling back to more generic printing code.
Fixes oss-fuzz #36264.
Subtyping relationships established on internal classes are always
going to hold (if we ignore Windows), so there is no need to
explicitly track them.
This fixes an assertion failure in GH-7251.
In case any tests are failing with the `--bless` option, we provide the
resulting `git diff` as artifact. This is particularly helpful for PR
authors who don't have a Windows environment at hand.
Closes GH-7204.
As previously written, this was treated as two independent targets
having the same recipe. GNU Make 4.3 has a new "grouped targets"
feature that allows specifying that these are actually both
outputs of a single recipe, but that's very recent.
Work around this by using an intermediate target.