| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
Closes GH-6770
|
|
|
|
|
|
| |
Deprecate passing connection object to mysqli_get_client_info()
Closes GH-6777.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Make MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT the new mysqli
error reporting default. Explicitly call
mysqli_report(MYSQLI_REPORT_OFF) to preserve previous behavior.
RFC: https://wiki.php.net/rfc/mysqli_default_errmode
Closes GH-6629.
|
|
|
|
|
| |
The driver version hasn't been updated in 13 years, so this number
is essentially meaningless. Check PHP_VERSION_ID instead.
|
| |
|
|
|
|
| |
Closes GH-6750.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* allow the user to specify a folder where files that can be sent
via LOAD DATA LOCAL can exist
* add mysqli.local_infile_directory for mysqli
(ignored if mysqli.allow_local_infile is enabled)
* add PDO::MYSQL_ATTR_LOCAL_INFILE_DIRECTORY for pdo_mysql
(ignored if PDO::MYSQL_ATTR_LOCAL_INFILE is enabled)
* add related tests
* fixes for building with libmysql 8.x
* small improvement in existing tests
* update php.ini-[development|production] files
Closes GH-6448.
Co-authored-by: Nikita Popov <nikic@php.net>
|
|
|
|
|
|
| |
[ci skip]
Signed-off-by: Anatol Belski <ab@php.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a method is inherited, the static variables will now always
use the initial values, rather than the values at the time of
inheritance. As such, behavior no longer depends on whether
inheritance happens before or after a method has been called.
This is implemented by always keeping static_variables as the
original values, and static_variables_ptr as the modified copy.
Closes GH-6705.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds support for:
$array1 = ['a' => 1, 'b' => 2];
$array2 = ['b' => 3, 'c' => 4];
$array = [...$array1, ...$array2];
// => ['a' => 1, 'b' => 3, 'c' => 4]
RFC: https://wiki.php.net/rfc/array_unpacking_string_keys
Closes GH-6584.
|
|
|
|
| |
Closes GH-6610.
|
|
|
|
|
|
|
|
|
| |
Rename MYSQLI_REFRESH_SLAVE to MYSQLI_REFRESH_REPLICA in line with
upstream change in MySQL. The old name is retained for
backwards-compatibility reasons, and may be deprecated/removed in
the future.
Closes GH-6632.
|
| |
|
|
|
|
|
|
|
| |
htmlspecialchars() etc now use ENT_QUOTES | ENT_SUBSTITUTE rather
than ENT_COMPAT by default.
Closes GH-6583.
|
|
|
|
|
|
| |
Respectively number of kqueues, pty limits per user.
Closes GH-6608.
|
|
|
|
|
|
|
|
|
|
|
| |
From libcurl version 7.62.0 and later, it supports DNS-over-HTTPS with
[`CURLOPT_DOH_URL`](https://curl.se/libcurl/c/CURLOPT_DOH_URL.html) option.
This adds integration with the `CURLOPT_DOH_URL` option if libcurl version
is >= 7.62.0 (0x073E00).
For reference, Ubuntu 20.04+ `libcurl4-openssl-dev`-based PHP builds use Curl 7.68.
Closes GH-6612.
|
|
|
|
| |
Signed-off-by: Anatol Belski <ab@php.net>
|
|
|
|
|
|
|
|
|
| |
This restricts allowed usage of $GLOBALS, with the effect that
plain PHP arrays can no longer contain INDIRECT elements.
RFC: https://wiki.php.net/rfc/restrict_globals_usage
Closes GH-6487.
|
|
|
|
|
|
|
|
| |
RFC: https://wiki.php.net/rfc/explicit_octal_notation
Add an extensive test suits for other variants of integer literals
Closes GH-6360
|
|
|
|
|
|
|
| |
Return integers and floats as native types if possible. As usual,
the old behavior can be restored by enabling ATTR_STRINGIFY_FETCHES.
Fixes bug #38334.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of requiring the type to be determined in advance by the
describer function and then requiring get_col to return a buffer
of appropriate type, allow get_col to return an arbitrary zval.
See UPGRADING.INTERNALS for a more detailed description of the
change.
This makes the result fetching simpler, more efficient and more
flexible. The general possibility already existed via the special
PDO_PARAM_ZVAL type, but the usage was very inconvenient and/or
inefficient. Now it's possible to easily implement behavior like
"return int if it fits, otherwise string" and to avoid any kind
of complex management of temporary buffers.
This also fixes bug #40913 (our second highest voted bug of all
time, for some reason). PARAM_LOB result bindings will now
consistently return a stream resource, independently of the used
database driver.
I've tried my best to update all PDO drivers for this change, but
some of the changes may be broken, as I cannot test or even build
some of these drivers (in particular PDO dblib and PDO oci).
Fixes are appreciated -- a working CI setup would be even more
appreciated ;)
|
| |
|
|
|
|
|
| |
Of the important PDO drivers, this affects only PDO PgSQL, as
both MySQL and SQLite do not return native boolean types.
|
|
|
|
|
|
|
|
| |
Besides our general desire to get rid of the legacy resource types,
this is particularly appealing for fileinfo, because there are already
respective objects.
Closes GH-5987.
|
|
|
|
|
|
|
|
| |
There doesn't seem to be any compelling reason to implement this
in mysqlnd rather than mysqli. It's just a loop over fetch_into.
This makes the function available under libmysqlclient as well,
and thus fixes bug #79372.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, PDO MySQL only fetched data as native int/float if
native prepared statements were used. This patch updates PDO to
have the same behavior for emulated prepared statements, and thus
removes the largest remaining discrepancy between these two modes.
Note that PDO already has a ATTR_STRINGIFY_FETCHES option to control
whether native types are desired or not. The previous output can
be restored by enabling this option.
Most of the tests make use of that option, because this allows the
tests to work under libmysqlclient as well, which currently always
returns string results (independently of whether native or emulated
PS are used).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a larger overhaul of the mysqlnd result set infrastructure:
* Drop support for two different types of buffered results sets
("c" and "zval"). Possibly these made sense at some earlier
time, but now (with minor adjustments) one option is strictly
worse than the other. Buffered result sets already buffer the
full row packets, from which zvals can be decoded. The "zval"
style additionally also buffered the decoded zvals. As result
sets, even buffered ones, are generally only traversed once,
this just ends up wasting memory. Now, a potentially useful
variation here would be to buffer the decoded zvals instead of
the row packets, but that's not what the code was doing.
* To make it really strictly better, pre-allocate the zval row
buffer and reuse it for all rows. Previously the "c" style always
allocated a new buffer for each row.
* The fetch_row API now provides a populated zval[]. The task of
populating an array is deferred to fetch_row_into, which also
avoids duplicating this code in multiple places. The fetch_row_c
API is also implemented on top of fetch_row now, rather than
duplicating large parts of the code.
* The row fetching code for prepared statements and normal result
sets has been mostly merged. These already used the same
infrastructure, but prepared statements used separate row
fetching functions that were nearly the same as the normal ones.
This requires passing the stmt into the result set, rather than
just a flag. The only part that remains separate is reading of
unbuffered results in the presence of PS cursors.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Retain the field, but always populate it with zero. This was
already the case for PS without length updating.
max_length has nothing lost in the field metadata -- it is a
property of the specific result set, and requires scanning the
whole result set to compute. PHP itself never uses max_length
with mysqlnd, it is only exposed in the raw mysqli API.
Keeping it for just that purpose is not worthwhile given the costs
involved. People who actually need this for some reason can easily
calculate it themselves, while making it obvious that the
calculation requires a full result set scan.
|
|
|
|
|
|
|
|
|
|
| |
`version_compare()` does a sloppy check for the `$operators` argument
which allows arbitrary abbreviations of the supported operators to be
accepted. This is both undocumented and unexpected, and could lead to
subtle BC breaks, if the order of the comparisions will be changed.
Therefore we change to strict comparisons.
Closes GH-6510.
|
|
|
|
| |
Signed-off-by: Anatol Belski <ab@php.net>
|
|
|
|
|
|
|
| |
We already tried this in PHP 7.4, but ran into issues, because
alpine did not support pkg-config for libargon2 (or had a broken
pc file, not sure). The Alpine issue has been resolved in the
meantime, so let's give this another try.
|
| |
|
|
|
|
| |
Signed-off-by: Anatol Belski <ab@php.net>
|
|
|
|
|
|
|
|
| |
This macro is defined to zero as of PHP 5.0.0, and as the comment
indicates, is no longer relevant. Thus, we remove the definition and
all usages from the core and bundled extensions.
Closes GH-6351.
|
|
|
|
| |
Closes GH-6305.
|
| |
|
|
|
|
| |
[ci skip]
|
|
|
|
|
|
| |
Remove ldap_control_paged_result and ldap_control_paged_result_response
which have been deprecated in PHP 7.4, in favor of new $controls
parameters for ldap request functions.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Disabling output compression for images has served to fix bug #16109,
where zlib compressed images apparently have caused issues with
Navigator 4. This shouldn't be an issue with somewhat contemporary
browsers. Other than that, this is an arbitrary restriction – why
don't we disable the compression for some other media types as well
(e.g. video/* and audio/*)? All in all, we should leave that decision
to userland.
Closes GH-6198.
|
|
|
|
|
|
|
|
|
|
| |
`odbc_connect()` should not reuse persistent connections, since that
prohibits multiple concurrent connections, which are occasionally
desireable. We fix that by no longer looking for already cached
connections when `odbc_connect()` is called, and instead creating a new
connection instead.
Closes GH-6223.
|
|
|
|
|
|
| |
Closes GH-6218.
[ci skip]
|
|
|
|
| |
Closes GH-6154
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One strange feature of SplFixedArray was that it could not be used in nested foreach
loops. If one did so, the inner loop would overwrite the iteration state of the outer
loop.
To illustrate:
$spl = SplFixedArray::fromArray([0, 1]);
foreach ($spl as $a) {
foreach ($spl as $b) {
echo "$a $b";
}
}
Would only print two lines:
0 0
0 1
Use the new InternalIterator feature which was introduced in ff19ec2df3 to convert
SplFixedArray to an Aggregate rather than Iterable. As a bonus, we get to trim down
some ugly code! Yay!
|