summaryrefslogtreecommitdiff
path: root/ext/imap
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-8.0'George Peter Banyard2021-02-275-4/+131
|\ | | | | | | | | * PHP-8.0: Fix Bug #80800 imap_open() fails when the flags parameter includes CL_EXPUNGE
| * Fix Bug #80800 imap_open() fails when the flags parameter includes CL_EXPUNGEGeorge Peter Banyard2021-02-275-4/+131
| | | | | | | | | | | | | | | | This also affected imap_reopen(). Add a supplementary test that the CL_EXPUNGE flag does have the intended effect. Closes GH-6732
* | Improve class entry generationMáté Kocsis2021-02-161-2/+1
| | | | | | | | Related to GH-6701
* | Deprecate passing null to non-nullable arg of internal functionNikita Popov2021-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This deprecates passing null to non-nullable scale arguments of internal functions, with the eventual goal of making the behavior consistent with userland functions, where null is never accepted for non-nullable arguments. This change is expected to cause quite a lot of fallout. In most cases, calling code should be adjusted to avoid passing null. In some cases, PHP should be adjusted to make some function arguments nullable. I have already fixed a number of functions before landing this, but feel free to file a bug if you encounter a function that doesn't accept null, but probably should. (The rule of thumb for this to be applicable is that the function must have special behavior for 0 or "", which is distinct from the natural behavior of the parameter.) RFC: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg Closes GH-6475.
* | Implicitly enable function entry generation when class entry generation is ↵Máté Kocsis2021-02-092-5/+2
| | | | | | | | | | | | enabled Closes GH-6675
* | Generate class entries from stubs for another batch of extensionsMáté Kocsis2021-02-083-8/+20
| | | | | | | | Closes GH-6669
* | Replace zend_bool uses with boolNikita Popov2021-01-152-2/+2
| | | | | | | | | | | | | | We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
* | Make convert_to_*_ex simple aliases of convert_to_*Nikita Popov2021-01-141-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | Historically, the _ex variants separated the zval first, if a conversion was necessary. This distinction no longer makes sense since PHP 7. The only difference that was still left is that _ex checked whether the type is the same first, but the usage of these macros did not actually distinguish on whether such an inlined check is valuable or not in a given context. Also drop the unused convert_to_explicit_type macros.
* | Merge branch 'PHP-8.0'Christoph M. Becker2021-01-032-5/+7
|\ \ | |/ | | | | | | * PHP-8.0: Fix imap stubs
| * Fix imap stubsChristoph M. Becker2021-01-032-5/+7
| | | | | | | | Closes GH-6559.
* | Update hash for IMAP stubs after adding final qualifierGeorge Peter Banyard2020-12-231-1/+1
| |
* | IMAP: Declare `IMAPConnection` class as `final` (stub+test)Ayesh Karunaratne2020-12-232-1/+12
| | | | | | | | Updates the `IMAPConnection` class stub to make sure it has the `final` flag, and adds a test to verify it.
* | IMAP: Disallow direct `new IMAPConnection()` constructAyesh Karunaratne2020-12-232-0/+21
| | | | | | | | | | Disallows constructing an `IMAPConnection` class directly with `new IMAPConnection` construct, by throwing an `Error` exception if attempted. `imap_open` is still the only way to create `IMAPConnection` objects.
* | EXPECTF imap_errors() test's authentication errorGeorge Peter Banyard2020-12-221-2/+2
| |
* | Make imap_errors() test no hangGeorge Peter Banyard2020-12-221-12/+7
| | | | | | | | | | Instead of attempting to connect with an invalid password, connect as an anonymous user. As this is disabled in our Dovecot configuration, this generates an error, and fails fast.
* | Optimize Dovecot configuration for IMAP testsGeorge Peter Banyard2020-12-222-7/+19
| | | | | | | | Closes GH-6531
* | Convert IMAP resource to objectGeorge Peter Banyard2020-12-225-579/+469
| | | | | | | | Closes GH-6418
* | Merge branch 'PHP-8.0'George Peter Banyard2020-12-0323-104/+1004
|\ \ | |/ | | | | | | | | * PHP-8.0: Standardize behaviour for int message number between functions Add tests for passing a UID instead of a message number
| * Standardize behaviour for int message number between functionsGeorge Peter Banyard2020-12-037-93/+298
| |
| * Add tests for passing a UID instead of a message numberGeorge Peter Banyard2020-12-0317-13/+708
| |
* | Flesh out HashTable insertion APIsSara Golemon2020-12-011-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fills out the array/object-property insert helpers for zend_array, zend_object, and zend_reference. This adds the following matrix of 18 APIs add_next_index_T() add_index_T() add_assoc_T() add_assoc_T_ex() add_property_T() add_property_T_ex() Where T in array, object, reference Converted internal callsites currently doing an explicit object wrap.
* | Merge branch 'PHP-8.0'George Peter Banyard2020-12-011-3/+1
|\ \ | |/ | | | | | | * PHP-8.0: Backport IMAP test modernization to PHP-8.0 branch
| * Backport IMAP test modernization to PHP-8.0 branchGeorge Peter Banyard2020-12-0160-475/+491
| | | | | | | | Closes GH-6476
* | Merge branch 'PHP-8.0'Dmitry Stogov2020-12-011-1/+1
|\ \ | |/ | | | | | | * PHP-8.0: Fixed incorrect "skipif.inc" include
| * Fixed incorrect "skipif.inc" includeDmitry Stogov2020-12-011-1/+1
| |
* | Merge branch 'PHP-8.0'George Peter Banyard2020-11-302-4/+80
|\ \ | |/ | | | | | | | | * PHP-8.0: Fix Bug #80438: imap_msgno() incorrectly warns and return false on valid UIDs in PHP 8.0.0 Rename XmlParser to XMLParser for consistency with XMLWriter/XMLReader
| * Fix Bug #80438: imap_msgno() incorrectly warns and return false on valid ↵George Peter Banyard2020-11-302-4/+80
| | | | | | | | | | | | | | | | UIDs in PHP 8.0.0 Checking for a valid Unique ID (UID) cannot use the convenience macro as they might be larger than the message number which has for maximum value the total number of current messages available in the mailbox.
* | Stabalize IMAP parallel testing, againGeorge Peter Banyard2020-11-067-71/+44
| | | | | | | | | | Drive by clean-up Use less the default mailbox again
* | Fix parallel testing for IMAPGeorge Peter Banyard2020-11-0421-92/+82
| | | | | | | | | | | | | | The script for the clean section was missing the $ Meta-character to only delete the default mailbox when it's an exact match. Reinstore parallel testing for more tests.
* | Make all IMAP fetch*() tests conflict with the default mailboxGeorge Peter Banyard2020-11-036-4/+16
| |
* | Modernize IMAP testsGeorge Peter Banyard2020-11-0359-380/+423
| | | | | | | | | | | | | | | | Use constants when appropriate, drop some ouputs which depends on env vars Enable parallel testing. Closes GH-6380
* | Merge branch 'PHP-8.0'George Peter Banyard2020-10-234-34/+49
|\ \ | |/ | | | | | | * PHP-8.0: Throw Value/TypeError for invalid $bodies in imap_mail_compose()
| * Throw Value/TypeError for invalid $bodies in imap_mail_compose()George Peter Banyard2020-10-234-34/+49
| | | | | | | | | | | | Small drive by refactoring to use HashTables Closes GH-6371
* | Merge branch 'PHP-8.0'George Peter Banyard2020-10-221-1/+1
|\ \ | |/ | | | | | | * PHP-8.0: Fix bug 76618
| * Fix bug 76618George Peter Banyard2020-10-221-1/+1
| | | | | | | | Apply patch which was attached to the bug in July 2018
* | Merge branch 'PHP-8.0'George Peter Banyard2020-10-222-5/+15
|\ \ | |/ | | | | | | * PHP-8.0: Fix segfaults after conversion from zval to zend_string params
| * Fix segfaults after conversion from zval to zend_string paramsGeorge Peter Banyard2020-10-222-5/+15
| |
* | Merge branch 'PHP-8.0' into masterChristoph M. Becker2020-10-202-9/+35
|\ \ | |/ | | | | | | * PHP-8.0: Fix #80242: imap_mail_compose() segfaults for multipart with rfc822
| * Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-10-202-9/+35
| |\ | | | | | | | | | | | | * PHP-7.4: Fix #80242: imap_mail_compose() segfaults for multipart with rfc822
| | * Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-10-202-9/+35
| | |\ | | | | | | | | | | | | | | | | * PHP-7.3: Fix #80242: imap_mail_compose() segfaults for multipart with rfc822
| | | * Fix #80242: imap_mail_compose() segfaults for multipart with rfc822Christoph M. Becker2020-10-202-9/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libc-client expects `TYPEMESSAGE` with an explicit subtype of `RFC822` to have a `nested.msg` (otherwise there will be a segfault during free), but not to have any `contents.text.data` (this will leak otherwise). Closes GH-6345.
* | | | Merge branch 'PHP-8.0' into masterChristoph M. Becker2020-10-201-1/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Add char* cast to avoid compiler warnings
| * | | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-10-201-1/+1
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.4: Add char* cast to avoid compiler warnings
| | * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-10-201-1/+1
| | |\ \ | | | |/ | | | | | | | | | | | | * PHP-7.3: Add char* cast to avoid compiler warnings
| | | * Add char* cast to avoid compiler warningsChristoph M. Becker2020-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In libc-client 2007f `data` is declared as `unsigned char *`; there may be variants which declare it as `void *`, but in any case picky compilers may warn about a pointer type mismatch in the conditional (and error with `-W-error`), so we're adding a `char *` cast for good measure.
* | | | Merge branch 'PHP-8.0' into masterChristoph M. Becker2020-10-202-9/+47
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Properly fix #80220
| * | | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-10-202-9/+47
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.4: Properly fix #80220
| | * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-10-202-9/+47
| | |\ \ | | | |/ | | | | | | | | | | | | * PHP-7.3: Properly fix #80220
| | | * Properly fix #80220Christoph M. Becker2020-10-202-9/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original fix for that bug[1] broke the formerly working composition of message/rfc822 messages, which results in a segfault when freeing the message body now. While `imap_mail_compose()` does not really support composition of meaningful message/rfc822 messages (although libc-client appears to support that), some code may still use this to compose partial messages, and using string manipulation to create the final message. The point is that libc-client expects `TYPEMESSAGE` with an explicit subtype of `RFC822` to have a `nested.msg` (otherwise there will be a segfault during free), but not to have any `contents.text.data` (this will leak otherwise). [1] <http://git.php.net/?p=php-src.git;a=commit;h=0d022ddf03c5fabaaa22e486d1e4a367ed9170a7> Closes GH-6343.
* | | | Merge branch 'PHP-8.0' into masterChristoph M. Becker2020-10-151-2/+2
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Fix broken fix for #80239