summaryrefslogtreecommitdiff
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Mark resource-like objects as non-comparableNikita Popov2021-02-1613-0/+17
| | | | | | | | | | | | | | | | | | | | | As these hold on to some internal resource, there can't be two "equal" objects with different identity. Make sure the lack of public properties doesn't result in these being treated as always equal.
* | | Improved unserialize() performance. Checks for object propery "visibility ↵Dmitry Stogov2021-02-161-104/+178
| | | | | | | | | | | | change" were moved, to be performed only if name/visibility had been really changed.
* | | Improve class entry generationMáté Kocsis2021-02-1672-211/+147
| | | | | | | | | | | | Related to GH-6701
* | | Merge branch 'PHP-8.0'Nikita Popov2021-02-162-0/+22
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fixed bug #80723
| * | Fixed bug #80723Nikita Popov2021-02-162-0/+22
| | | | | | | | | | | | | | | This fixes the issue just for the Socket class. Presumably we'll want to do the same for other "resource" objects.
* | | Fix quadratic slowdown under asan in timelibNikita Popov2021-02-161-24/+35
| | | | | | | | | | | | | | | This is a hotfix for https://github.com/derickr/timelib/pull/94 until the issue is resolved upstream.
* | | cURL: make possible to send file from buffer stringAlexander Moskalev2021-02-168-1/+266
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add CURLStringFile class which works similarly to CURLFile, but uploads a file from a string rather than a file. This avoids the need to create a temporary file, or use of a data:// stream. Basic usage: $file = new CURLStringFile($data, 'filename.txt', 'text/plain'); curl_setopt($curl, CURLOPT_POSTFIELDS, ['file' => $file]); Closes GH-6456.
* | | Merge branch 'PHP-8.0'Nikita Popov2021-02-162-27/+29
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Suppress OpenSSL error on missing optional config
| * | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-162-27/+29
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: Suppress OpenSSL error on missing optional config
| | * Suppress OpenSSL error on missing optional configNikita Popov2021-02-162-27/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | openssl_pkey_new() fetches various options from the config file -- most of these are optional, and not specifying them is not an error condition from the perspective of the user. Unfortunately, the CONF_get_string() API pushes an error when accessing a key that doesn't exist (_CONF_get_string does not, but that is presumably a private API). This commit adds a helper php_openssl_conf_get_string() that automatically clears the error in this case. I've found that OpenSSL occasionally does the same thing internally: https://github.com/openssl/openssl/blob/22040fb790c854cefb04bed98ed38ea6357daf83/apps/req.c#L515-L517 Closes GH-6699.
* | | Merge branch 'PHP-8.0'Christoph M. Becker2021-02-161-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Adapt test case for libcurl 7.75.0+
| * | Adapt test case for libcurl 7.75.0+Christoph M. Becker2021-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | libcurl 7.75.0 finally adds support for `gophers://`, i.e. gopher over TLS. The protocol is neither standardized, nor is the protocol registered with IANA, but well, it is there and the test case should cater to that.
* | | Merge branch 'PHP-8.0'Nikita Popov2021-02-152-0/+21
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fixed bug #80747
| * | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-152-0/+21
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: Fixed bug #80747
| | * Fixed bug #80747Nikita Popov2021-02-152-0/+21
| | | | | | | | | | | | If RSA key generation fails, actually report that failure.
* | | Use typed proprety for Transliterator::$idNikita Popov2021-02-153-31/+11
| | | | | | | | | | | | | | | | | | | | | This is a read-only property for which Transliterator internally assigns a string value. Also clean up the code handling this property a bit.
* | | Used typed properties for reflection $name and $classNikita Popov2021-02-153-44/+32
| | | | | | | | | | | | | | | These are read-only properties, and Reflection makes sure to assign only strings.
* | | Generate class entries for snmp, soap, sockets, sodium, sqlite3, sysv*, tidyMáté Kocsis2021-02-1529-99/+263
| | | | | | | | | | | | Closes GH-6696
* | | Merge branch 'PHP-8.0'Nikita Popov2021-02-152-7/+51
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fix #78680: mysqlnd pam plugin missing terminating null
| * | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-152-7/+51
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: Fix #78680: mysqlnd pam plugin missing terminating null
| | * Fix #78680: mysqlnd pam plugin missing terminating nullDaniel Black2021-02-152-7/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PAM service requires the terminating null to be part of the communication. Tested with MariaDB-10.4(pam) and Percona Server 5.7.32(auth_pam_compat). Also changed MySQL Enterprise test to the server side plugin, authentication_pam as opposed to the client plugin mysql_clear_password. Add additional check for pamtest user and pam service file as all are required for the test. More importantly, test result should actually succeed. Thanks Geoff Montee for bug report. Closes GH-78680.
* | | Merge branch 'PHP-8.0'Nikita Popov2021-02-152-19/+15
|\ \ \ | |/ / | | | | | | | | | | | | * PHP-8.0: Fix leak when breaking out of FilesystemIterator Fixed bug #80600
| * | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-152-19/+15
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: Fix leak when breaking out of FilesystemIterator
| | * Fix leak when breaking out of FilesystemIteratorNikita Popov2021-02-152-19/+15
| | | | | | | | | | | | | | | | | | | | | | | | We need to always destroy current, not just when iter.data is not set. Take this opportunity to clean up the iterator destructor code a bit, to remove redundant checks and incorrect comments.
* | | Persist class name before methods, because it may be used insted of "self"Dmitry Stogov2021-02-152-10/+14
| | |
* | | Remove stray mentions of mbstring.func_overloadMax Semenik2021-02-154-4/+0
| | | | | | | | | | | | | | | | | | This feature has been completely removed. Closes GH-6688.
* | | Fix failures due to new deprecationsChristopher Jones2021-02-1512-18/+32
| | |
* | | Generate class entries from stubs for phar, posix, pspell, readline, ↵Máté Kocsis2021-02-1520-147/+488
| | | | | | | | | | | | | | | | | | reflection, session, shmop Closes GH-6692
* | | Generate class entries from stubs for oci8, odbc, openssl, pcntl, pdo, pgsqlMáté Kocsis2021-02-1422-49/+116
| | | | | | | | | | | | Closes GH-6691
* | | Revert "Implement fetching TLS TCB offset on MacOS"Nikita Popov2021-02-121-8/+0
| | | | | | | | | | | | | | | | | | This reverts commit 1106ff9a0e420e043c2e56c8ca00db85f1b85ee6. Looks like this sauses segfaults on MacOs ZTS with JIT.
* | | Deprecate passing null to non-nullable arg of internal functionNikita Popov2021-02-11297-5980/+664
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge branch 'PHP-8.0'Nikita Popov2021-02-111-2/+3
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fixed bug #80718
| * | Fixed bug #80718Nikita Popov2021-02-111-2/+3
| | |
* | | Merge branch 'PHP-8.0'Nikita Popov2021-02-114-8/+27
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fixed bug #80719
| * | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-114-8/+27
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: Fixed bug #80719
| | * Fixed bug #80719Nikita Popov2021-02-114-8/+23
| | |
| * | Update func info after password_get_info() changeNikita Popov2021-02-111-1/+1
| | |
* | | Implement fetching TLS TCB offset on MacOSDavid Carlier2021-02-111-0/+8
| | | | | | | | | | | | | | | | | | Tested with php-cgi and wordpress and 1255 for jit settings. Closes GH-6659.
* | | Allow all scalar types in ini_set()Nikita Popov2021-02-114-9/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes ini_set() to accept all scalar types (string|int|float|bool|null) for the new value. The idea here is that while the INI system ultimately works with strings, its value interpretation is designed to be consistent with PHP's casting rules, e.g. "1" and "" are interpreted as boolean true and false respectively. I personally believe that writing ini_set('precision', 10) makes more sense than ini_set('precision', '10'), and find strict_types to be unnecessarily pedantic here. Closes GH-6680.
* | | Avoid useless SHM data duplicationDmitry Stogov2021-02-112-4/+22
| | |
* | | Sort some decls in spl_iterators.hLevi Morrison2021-02-111-21/+21
| | | | | | | | | | | | There are enough of them that sorting makes it a bit nicer.
* | | Handle warnings during sccp function evaluationNikita Popov2021-02-111-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some upcoming changes like https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg will make it somewhat inconvenient to determine whether a given function invocation will generate a diagnostic. Rather than trying to exclude this in advance, call the function with diagnostics suppressed, and check whether anything was thrown. This adds a new EG flag that is kept specific to the SCCP use-case. This does not use the error_cb hook as it is a (non-TLS) global, and doesn't fully suppress error handling besides. Test this by removing the in advance checks for implode and array_flip.
* | | Merge branch 'PHP-8.0'Nikita Popov2021-02-113-8/+5
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Don't return null from password_get_info()
| * | Don't return null from password_get_info()Nikita Popov2021-02-113-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | The get_info() handler should never fail, but even if it does, we should still return a proper info array -- it doesn't make sense that a completely incorrect hash returns an info array, but a hash that is recognized but for which the options can't be extracted would return null.
* | | Unserialize op_array->scope before passing to ↵Dmitry Stogov2021-02-101-2/+3
| | | | | | | | | | | | | | | | | | zend_file_cache_unserialize_type(). Don't use scope of closures.
* | | Use zend_type.ce_cache__ptr for caching class resulution during ↵Dmitry Stogov2021-02-101-0/+12
| | | | | | | | | | | | argument/result type checks
* | | Fixed map_ptr slot sharing for trait/selfDmitry Stogov2021-02-101-1/+1
| | |
* | | Merge branch 'PHP-8.0'Nikita Popov2021-02-103-22/+22
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Make mysqli_ssl_set() arguments nullable
| * | Make mysqli_ssl_set() arguments nullableNikita Popov2021-02-103-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | This function internally converts zero length arguments to NULL argument -- but we should also accept them in the first place. Null arguments being accepted was actually documented, before bug #78399 adjusted the docs to match current behavior.
* | | Reuse single map_ptr slot for indentical class namesDmitry Stogov2021-02-104-14/+58
| | |