ABI breaks are not supposed to happen after feature freeze, i.e. when
the PHP API numbers have been bumped. To make it easier to notice
inadvertent ABI breaks, we automatically add an "ABI break" label to
all PRs which modify public (aka. installed) header files. Some of
these modifications do not constitute an ABI break (e.g. adding a
comment to a header file), but we rely on natural intelligence to sort
that out. That means these labels should be removed manually, if they
are not appropriate, but if they are, the PR should not be merged into
any stable branch. For the master branch, where ABI breaks are
permissible, the labels should still be removed if irrelevant, but kept
when the PR is merged.
Since tests are futile[1], we leave that to further (test) PRs.
[1] <https://github.com/php/php-src/pull/15682#issuecomment-2323060586>
Closes GH-15682.
As of net-snmp 5.8.0, the library defines their own `(v)asprintf()` if
not available on the system. However, PHP also does this, so when
building ext/snmp there would be conflicting declarations on Windows.
To avoid this, we explictly define `HAVE_ASPRINTF`, so net-snmp does
not redeclare when its headers are included.
SplFixedArray should've never get supported in ArrayObject because it's
overloaded, and so that breaks assumptions. This regressed in c4ecd82f.
Closes GH-15947.
We can use `memcmp()` directly and skip some of the logic handling
in `zend_binary_strcmp()`. `perf record` shows a reduction for
`dom_html5_serializes_as_void()` from 3.12% to 0.77%.
* Added function for squaring to improve performance of power calculation
* Aligned backslashes
* Removed unnecessary comments
* Extracted common part of multiplication and square functions
* Added comment to bc_fast_square
* Improved wording of bc_mul_finish_from_vector
* Reused new function name
* Replaced macro with function
This never did anything in lower versions, but on master this crashes
because the virtual properties don't have backing storage. Just forbid
it since it was useless to begin with.
Closes GH-15891.
These were needed mostly for the PHP <= 8.3 pspell extension. The
nchant2-hunspell gets installed automatically as a dependency with
enchant2-dev if needed.
The return value of zho_build_properties_ex() is passed to ZVAL_ARR(), which sets the IS_TYPE_REFCOUNTED flag. Returning &zend_emtpy_array will crash later when trying to dtor the zval.
I'm fixing this by returning zend_new_array(0) instead of &zend_empty_array.
An alternative was to make ZVAL_ARR() aware of immutable arrays, like ZVAL_STR() is with interned strings, but I found no other problematic cases.
Updates UCD to Unicode 16.0 (released 2024 Sept).
Previously: 0fdffc18, #7502, #14680
Unicode 16 adds several new character sets and case folding rules.
However, the existing ucgendat script can still parse them.
This also adds a couple test cases to make sure the new rules for
East Asian Wide characters and case folding work correctly. These
tests fail on Unicode 15.1 and older because those verisons do not
contain those rules.
For the `Exception`, `ReflectionClass`, and `ReflectionAttribute` classes, the
`__clone()` method is declared to be private, and the implementation has a
comment that it should never be executed. However, the implementation can be
executed by using a `ReflectionMethod`. Fix the comments to instead explain why
the implementation is needed.
[skip ci]
* PHP-8.3:
Fix GH-15711: SoapClient can't convert BackedEnum to scalar value
Use get_serialization_string_from_zval() in all encoding functions
Introduce get_serialization_string_from_zval() and use it in to_xml_string()
For now this new function only returns a copy of the string, but its
functionality will be expanded by later commits.
to_xml_string() now uses this function and the memory management is
simplified as well.
zend_get_property_info_for_slot(obj, slot) assumes that 'slot' belongs to 'obj', but that may not be the case for lazy proxies.
Fortunately, the property info is often already available in path when it is needed.
For other cases, I make zend_get_property_info_for_slot() aware of lazy objects, and add zend_get_property_info_for_slot_self() for cases where the 'slot' is known to belong to the object itself.
Fixes oss-fuzz #71446
That was broken when CI was moved to GH, since `APPVEYOR_BUILD_FOLDER`
is no longer set; instead we use `GITHUB_WORKSPACE` which has the same
meaning.
Closes GH-15896.
The spec doesn't want to serialize xmlns:foo="", but the description of
the step that checks this does not take into account that xmlns="" must
be allowed. This patch corrects this errata.
Closes GH-15894.
We change the error for ZTS builds to a warning, to not break snapshot
builds which automatically will try to enable OpenSSL password hashing.
We also change some messages to better fit building on Windows.
And of course, we cannot easily check whether `OSSL_set_max_threads()`
is actually available; instead we're looking up the function declaration
in its header file.
Co-authored-by: Peter Kokot <peterkokot@gmail.com>