Thank you!
Delete DirectoryIterator methods that are inherited (#2350)
Move specific examples up into SplFileInfo
https://github.com/php/php-src/blob/master/ext/spl/spl_directory.stub.php#L107
These methods are inherited from SplFileInfo and have not been maintained. Many have incorrect return types.
I believe the current practice is to show the inherited methods in the class listing and link where they're defined not maintain copies of the method.
It should all be sorted now.
First, c-client is in bad shape these days. If my count is correct, the last release was 16 years ago and we have 22 patches for it in Gentoo (14 of those come from Debian). It has two users that I know of, PHP and Asterisk, so it might be worthwhile to fork it. Right now it's being kept alive by distro patches, but we're duplicating a lot of work that could be avoided by having a canonical upstream repo. PHP is also working extra hard to detect all of the weird ways that the various distros might patch and package it.
But back to this PR: the c-client patch monster that everyone is shipping was never actually designed to be a shared library. The
mm_foo()
functions thatPHP_IMAP_TEST_BUILD
defines are "callbacks", meant to be supplied by the program linking with c-client. Without them, the library itself has undefined symbols and linking will fail.I didn't notice it because (1) I have
-Wl,--as-needed
in myLDFLAGS
, and (2) these tests are trivial enough to be optimized out. So tl;dr, I wasn't actually linking with c-client. But without--as-needed
, or maybe without compiler optimizations, linking will fail unless you define all of thosemm_foo()
callbacks.That satisfies my curiosity, and makes me confident that a compile test (not a link test) would be fine here. That way, the undefined symbols don't matter. (PHP does define those callbacks in the IMAP extension, so the real link phase works fine.) I've switched the test to
AC_COMPILE_IFELSE
, and have now added a comment toPHP_IMAP_TEST_BUILD
containing more or less what I've just explained.
Yeah, I think we really need to start considering moving ext/imap to PECL due to the whole c-client issue. But thank you for taking care of this!
@alexdowad could you maybe document those steps in the PHP Internals Book? As I always wondered how the fuzzer worked too!
Example usage and why the api is correct. (#15)
Example usage.
Typo....just copy it across if you're already in the middle of fixing merge...
This is so going to conflict...
Use see also entity (#2388)
Somehow tests now fails because it cannot detect the function anymore, not sure if this is legit or not, but maybe only the SKIPIF section of the relevant tests need to be amended
Well, the test certainly needs a SKIPIF (it has none), since the feature is optional... but that doesn't explain why the function is no longer detected. Is there a way to get
config.log
from the CI? Or are you lucky enough to be able to reproduce it?
I'm on Fedora now so it's a pain to get ext/imap to compile since CClient is not part of the RPMs any more. And I'm not aware of a good way to get the config.log from CI :/ @iluuu1994 maybe knows?
Fix GH-10583: DateTime modify with tz pattern should not update linked timezone
Merge remote-tracking branch 'derickr/issue10583' into PHP-8.1
Merge branch 'PHP-8.1' into PHP-8.2
Merge branch 'PHP-8.2'
Fix direct comparison in run-tests.php differ
Updated to version 2023.2 (2023b)
Empty merge
Updated to version 2023.2 (2023b)
Empty merge
Updated to version 2023.2 (2023b)
Add me to the CODEOWNERS
Added myself to fpm, json, openssl and main. I have contributed or was looking to various parts in main even though I don't know every single file there. Happy to maintain it though.
Fix GH-8979: Possible Memory Leak with SSL-enabled MySQL connections
The stream context inside mysqlnd_vio::enable_ssl()
is leaking.
In particular: when php_stream_context_set()
get called the refcount
of context
is increased by 1, which means that context
will now
have a refcount of 2. Later on we remove the context from the stream
by calling php_stream_context_set(stream, NULL)
but that leaves our
context
with a refcount of 1, and therefore it's never destroyed.
In my test case this yielded a leak of 1456 bytes per connection
(but could be more depending on your settings ofc).
Annoyingly, Valgrind doesn't find it because the context is still
in the EG(regular_list)
and will thus be destroyed at the end of
the request. However, I still think this bug needs to be fixed because
as the users in the issue report already mentioned:
there can be long-running PHP scripts.
Fix it by decreasing the refcount to transfer the ownership.
Closes GH-10909.
Merge branch 'PHP-8.1' into PHP-8.2
Fix GH-10907: Unable to serialize processed SplFixedArrays in PHP 8.2.4
The properties table can also contain numeric entries after a rebuild of the table based on the array. Since the array can only contain numeric entries, and the properties table can contain a mix of both, we'll add the numeric entries from the array and only the string entries from the properties table. To implement this we simply check if the key from the properties table is a string.
Closes GH-10921.
Merge branch 'PHP-8.2'
Fix test for GH-10907 with output in different order for master branch
Fix phpGH-10648: add check function pointer into mbfl_encoding
Previously, mbstring used the same logic for encoding validation as for encoding conversion.
However, there are cases where we want to use different logic for validation and conversion. For example, if a string ends up with missing input required by the encoding, or if a character is input that is invalid as an encoding but can be converted, the conversion should succeed and the validation should fail.
To achieve this, a function pointer mb_check_fn has been added to struct mbfl_encoding to implement the logic used for validation. Also, added implementation of validation logic for UTF-7, UTF7-IMAP, ISO-2022-JP and JIS.
Merge branch 'PHP-8.2'
Update NEWS and UPGRADING to reflect changes in 0ce755be26
Fix compile errors caused by missing initializers in 0779950768
When I built and tested 0779950768 locally, the build was successful and all tests passed. However, in CI, some CI jobs are failing due to compile errors. Fix those.
GC Macros are now defined in zend_refcounted.h which is included in zend_types.h
Well the failure is legit as the Release ZTS build segfaults on that regression bug, I'll have a look during the week to see if I can reproduce it.
Somehow tests now fails because it cannot detect the function anymore, not sure if this is legit or not, but maybe only the SKIPIF section of the relevant tests need to be amended