Commit Graph

1815 Commits

Author SHA1 Message Date
Máté Kocsis
a43bc33fb2
Annotate function aliases in stubs 2020-04-04 13:03:16 +02:00
Nikita Popov
d2c92d7fd3 Stubs: Store information per-class
We'll need this if we want to generate method entries.
2020-04-03 16:20:47 +02:00
Máté Kocsis
305b17e85f
Do not include the same stub multiple times
Closes GH-5322
2020-04-03 14:23:54 +02:00
George Peter Banyard
457380cae7 Drop wchar header check as always defined since C95 2020-03-31 00:14:56 +02:00
Máté Kocsis
01b266aac4
Improve error messages of various extensions
Closes GH-5278
2020-03-23 18:59:04 +01:00
Christoph M. Becker
d963b78523 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test for Windows
2020-03-23 16:26:19 +01:00
Christoph M. Becker
efbc962c92 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix test for Windows
2020-03-23 16:23:33 +01:00
Christoph M. Becker
ba404f21e4 Fix test for Windows
Windows filenames may very well contain a colon, so we adjust the test
accordingly.
2020-03-23 16:22:45 +01:00
Christoph M. Becker
b31f73b1c8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Enclose INI values containing {TMP} in quotes
2020-03-09 22:53:23 +01:00
Christoph M. Becker
fea2994ff8 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Enclose INI values containing {TMP} in quotes
2020-03-09 22:51:11 +01:00
Christoph M. Becker
d5e206620b Enclose INI values containing {TMP} in quotes
At least on Windows, the temporary directory may contain tilde signs,
which would result in an INI parse error.
2020-03-09 22:49:08 +01:00
Máté Kocsis
3ab75ac019
Update MySQLi function info
Closes GH-5214
2020-02-28 14:36:54 +01:00
Christoph M. Becker
30d18b8ced Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #64032: mysqli reports different client_version
2020-02-27 09:40:31 +01:00
Christoph M. Becker
78e04759ad Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #64032: mysqli reports different client_version
2020-02-27 09:39:13 +01:00
Christoph M. Becker
8654c32b58 Fix #64032: mysqli reports different client_version
While `mysqli_get_client_version()` calls `mysql_get_client_version()`
to retrieve the client version, `mysql::$client_version` is initialized
to `MYSQL_VERSION_ID`.  Both should match though, and since the former
is the more useful information, we fix `mysql::$client_version`.

We do not add a regression test, because it would usually succeed
anyway, and we already have several tests with respective `assert()`s.
2020-02-27 09:35:04 +01:00
Máté Kocsis
960318ed95
Change argument error message format
Closes GH-5211
2020-02-26 15:00:08 +01:00
Tom Van Looy
fabe6a310c Add ext/mysqli stubs
Closes GH-4913.
2020-02-25 11:06:46 +01:00
Nikita Popov
a939805641 Use serialize_precision for var_dump()
var_dump() is debugging functionality, so it should print
floating-point numbers accurately. We do this by switching
to serialize_precision, which (by default) will print with
as much precision as necessary to preserve the exact value
of the float.

This also affects debug_zval_dump().

Closes GH-5172.
2020-02-25 09:51:32 +01:00
Nikita Popov
541f8b7640 Remove mysqli reflection tests 2020-02-18 10:08:03 +01:00
Nikita Popov
540f052242 Fix zpp in mysqli_warning::next()
This only exists as a method, so using zend_parse_method_parameters
doesn't make sense. Also make sure that zpp is always called, not
only conditionally.
2020-02-18 10:01:17 +01:00
Máté Kocsis
ac0853eb26
Make type error messages more consistent
Closes GH-5092
2020-02-17 14:22:17 +01:00
Nikita Popov
f8d795820e Reindent phpt files 2020-02-03 22:52:20 +01:00
Máté Kocsis
5bf6aedae4
Promote mysqli warnings to exceptions
Closes GH-5058
2020-01-30 17:05:07 +01:00
Máté Kocsis
cffff1fb03
Merge branch 'PHP-7.4'
* Fix #78666 mysqli_options generates Warning on var_dump()
2020-01-28 18:51:00 +01:00
Máté Kocsis
d39edebbce
Fix #78666 mysqli_options generates Warning on var_dump()
Closes GH-5121
2020-01-28 18:44:02 +01:00
Nikita Popov
7d3a6e7149 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix mysqli_get_warnings() with multi queries
2020-01-28 17:17:07 +01:00
Nikita Popov
8a5bc8c6be Fix mysqli_get_warnings() with multi queries
In this case warning_count may be non-zero, but php_get_warnings()
may still return no warnings. In this case we should return false
rather than returning a corrupted mysqli_warning object.
2020-01-28 17:13:43 +01:00
Nikita Popov
9b9436d9b0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix mysqli ssl test for tls1.3
2020-01-24 15:15:36 +01:00
Nikita Popov
c14df824d1 Fix mysqli ssl test for tls1.3
Specifying AES256-SHA results in TLS_AES_256_GCM_SHA384 if the
connection uses TLS v1.3.
2020-01-24 15:14:52 +01:00
Nikita Popov
6ada49a469 Merge branch 'PHP-7.4'
* PHP-7.4:
  Increase timeout in mysqli_reap_async_query test
2020-01-20 09:54:38 +01:00
Nikita Popov
b6506ab32a Increase timeout in mysqli_reap_async_query test
The 2000 here is 2ms, which is a bit optimistic for parallelized
testing.
2020-01-20 09:53:54 +01:00
Máté Kocsis
d1764ca330
Make error messages more consistent by fixing capitalization
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
2020-01-17 14:52:46 +01:00
Máté Kocsis
afdaa91170
Fix #78880: Final spelling fixes 2020-01-16 19:14:31 +01:00
Máté Kocsis
0b4778c377
Fix #78880: Another bunch of spelling errors 2020-01-16 09:46:47 +01:00
Christoph M. Becker
8ea190ba95 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79084: mysqlnd may fetch wrong column indexes with MYSQLI_BOTH
2020-01-13 13:24:12 +01:00
Christoph M. Becker
b0cdd8cc53 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79084: mysqlnd may fetch wrong column indexes with MYSQLI_BOTH
2020-01-13 13:23:12 +01:00
Christoph M. Becker
1752393bb4 Fix #79084: mysqlnd may fetch wrong column indexes with MYSQLI_BOTH
Column names can be numeric strings, so we have to make sure to insert
the column values with the appropriate numeric keys, instead of adding
them.
2020-01-13 13:21:45 +01:00
Christoph M. Becker
c1519321e7 Merge branch 'PHP-7.4'
* PHP-7.4:
  Bring back test case support for older MySQL versions
2020-01-11 11:22:30 +01:00
Christoph M. Becker
0ab53f1636 Bring back test case support for older MySQL versions
These test cases have recently been adjusted to work with MySQL 8[1],
but some older, but still supported database versions, such as MySQL
5.6, still need the password to be sent hashed, so we fall back to
using `PASSWORD()`, if the `SET PASSWORD` query fails without it.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=b0efd18f7844da29931737b8a1cf461c7493e168>.
2020-01-11 11:21:26 +01:00
Christoph M. Becker
f6dea34831 Fix test cases which fail on Windows debug builds
We use the portable {TMP} instead of the hard-coded /tmp, and skip
mysqli_debug_append.phpt on Windows, because unlinking the trace file
while the connection is still open won't work there.

(cherry picked from commit 60081ca20d)
2020-01-10 20:00:31 +01:00
Nikita Popov
55618ff118 Convert infallible mysqli checks to asserts 2020-01-09 18:56:30 +01:00
Nikita Popov
307dd465c1 Remove unused MYSQLI_STATUS_CLEARED 2020-01-09 18:56:30 +01:00
Máté Kocsis
7b4a4d2ace
Use RETURN_THROWS() after try_convert_to_string() 2020-01-03 17:04:06 +01:00
Máté Kocsis
1b93cfee0c
Use RETURN_THROWS() after zend_parse_method_parameters() 2020-01-02 23:01:37 +01:00
Máté Kocsis
01a50778d1
Use RETURN_THROWS() after zend_throw_exception() in most of the extensions 2020-01-02 10:56:18 +01:00
Máté Kocsis
349a286461
Use RETURN_THROWS() after zend_throw_error() 2020-01-01 16:42:30 +01:00
Máté Kocsis
345703724c
Use RETURN_THROWS() during ZPP in most of the extensions
Except for some bigger ones: reflection, sodium, spl
2019-12-31 11:46:11 +01:00
Christoph M. Becker
55fd97c576 Fix #78790: mysqli_get_client_info() expects exactly 0 parameters, 1 given
Although the `mysqli` parameter is unused, it had been accepted so far,
and the documentation even claims that parameter would be required.  To
not break BC, we allow it again.
2019-12-30 17:40:16 +01:00
Nikita Popov
7e130df249 Merge branch 'PHP-7.4'
* PHP-7.4:
  Don't use PASSWORD() function in test
  Specify explicit row order in PDO MySQL test
  Skip bug77956.phpt if local_infile disabled on server
  Don't check TIMESTAMP NOT NULL in fetch_field_flags test
  Don't test the RENAME DATABASE query
  Make GeomFromText tests compatible with MySQL 8
2019-12-27 17:26:42 +01:00
Nikita Popov
b0efd18f78 Don't use PASSWORD() function in test
Doesn't exist anymore in MySQL 8.
2019-12-27 17:26:15 +01:00