* PHP-8.2:
Fix GH-11630: proc_nice_basic.phpt only works at certain nice levels
Fix GH-11629: bug77020.phpt tries to send mail
Fix GH-11625: DOMElement::replaceWith() doesn't replace node with DOMDocumentFragment but just deletes node or causes wrapping <></> depending on libxml2 version
* PHP-8.1:
Fix GH-11630: proc_nice_basic.phpt only works at certain nice levels
Fix GH-11629: bug77020.phpt tries to send mail
Fix GH-11625: DOMElement::replaceWith() doesn't replace node with DOMDocumentFragment but just deletes node or causes wrapping <></> depending on libxml2 version
Our ./configure script (ext/imap/config.m4) checks for the
utf8_to_mutf7() function in the c-client library, and defines
HAVE_IMAP_MUTF7 only if it exists. The two corresponding PHP
functions are disabled when it does not, but their tests do
not account for that. Here we add two SKIPIFs to hand that
scenario.
Use common functions for creating and setting up similar objects
The increase in verbosity compared to the ``add_property_*()`` version is somewhat unfortunate, but the behaviour of ``add_property_str()`` releasing the zend_string is suboptimal, confusing, and has me concerned.
The recent clang-16 throws errors for implicitly defined functions by
default. In many ./configure tests, an undefined function (which is
"implicitly defined" when you try to call it) is undefined because it
really does not exist. But in one case, utf8_to_mutf7() is undefined
because we forgot to include the header that defines it.
This commit updates the test for utf8_to_mutf7:
* We now include the header (c-client.h) that defines it.
* A "checking... yes/no" message was added to the test.
* The test was switched from PHP_IMAP_TEST_BUILD to AC_COMPILE_IFELSE.
This was the easiest way to avoid a return-type mismatch that runs
afoul of -Werror=implicit-int.
* CPPFLAGS is temporarily amended with the -I flag needed to find
c-client.h.
Fixes GH-10947.
Closes GH-10948
Signed-off-by: George Peter Banyard <girgias@php.net>
@cname currently refers to the constant name in C. However, it is not always a (constant) name, but sometimes a function invocation, so naming it as @cvalue would be more appropriate.
We setup the currently latest version of hMailServer[1] as mail server,
and configure according to imap_include.inc. To not require further
configuration, we adapt mail_skipif.inc and mail_include.inc to match
that configuration. However, we also change the default domain to the
reserved `example.com`.
We also update the standard mail tests to use the `--EXTENSIONS--`
section (instead of skipping the tests if ext/imap is not available).
Finally, we fix bug80751.phpt to expect the configured To and Cc mail
addresses.
[1] <https://www.hmailserver.com/>
Closes GH-8357.
- for packed arrays we store just an array of zvals without keys.
- the elements of packed array are accessible throuf as ht->arPacked[i]
instead of ht->arData[i]
- in addition to general ZEND_HASH_FOREACH_* macros, we introduced similar
familied for packed (ZEND_HASH_PACKED_FORECH_*) and real hashes
(ZEND_HASH_MAP_FOREACH_*)
- introduced an additional family of macros to access elements of array
(packed or real hashes) ZEND_ARRAY_ELEMET_SIZE, ZEND_ARRAY_ELEMET_EX,
ZEND_ARRAY_ELEMET, ZEND_ARRAY_NEXT_ELEMENT, ZEND_ARRAY_PREV_ELEMENT
- zend_hash_minmax() prototype was changed to compare only values
Because of smaller data set, this patch may show performance improvement
on some apps and benchmarks that use packed arrays. (~1% on PHP-Parser)
TODO:
- sapi/phpdbg needs special support for packed arrays (WATCH_ON_BUCKET).
- zend_hash_sort_ex() may require converting packed arrays to hash.
Some GCC versions don't like zend_try in loop. Avoid the issue
by pulling it out of the loop, we don't particularly care about
skipping further warnings if a bailout occurs, just that it
does not interrupt shutdown.
Closes GH-7380.
This is a non-intrusive, minimal fix for bug #81316, which prevents
a bailout during imap RSHUTDOWN and prevents the basic shutdown
handler from being skipped.
I wasn't able to make the issue reproduce in a small test.