Commit graph

1839 commits

Author SHA1 Message Date
Nikita Popov
c9b9f525a9 Include stub hash in generated arginfo files
The hash is used to check whether the arginfo file needs to be
regenerated. PHP-Parser will only be downloaded if this is actually
necessary.

This ensures that release artifacts will never try to regenerate
stubs and thus fetch PHP-Parser, as long as you do not modify any
files.

Closes GH-5739.
2020-06-24 09:55:19 +02:00
Máté Kocsis
596561009c
Fix some UNKNOWN default values
In ext/ffi, ext/intl, ext/mysqli, and ext/pcntl
2020-06-09 09:46:51 +02:00
Máté Kocsis
fbe30592d6
Improve type error messages when an object is given
From now on, we always display the given object's type instead of just reporting "object".
Additionally, make the format of return type errors match the format of argument errors.

Closes GH-5625
2020-05-26 19:06:19 +02:00
Máté Kocsis
b3718430de
Annotate internal functions with the mixed type
Closes GH-5618
2020-05-25 17:30:57 +02:00
Máté Kocsis
ed6cf67879
Fix some final classes in stubs 2020-05-19 14:54:37 +02:00
George Peter Banyard
7c33644fed Fix [-Wextra-tokens] warning in MySQLi extension which breaks build
Didn't double check and this slipped through with my big search and replace
2020-05-18 01:00:47 +02:00
George Peter Banyard
82afcf4401 Fix [-Wundef] warning in MySQLi extension 2020-05-18 00:37:19 +02:00
Máté Kocsis
3ebce8e9fc
Fix UNKNOWN default values in various extensions
Closes GH-5514
2020-05-05 19:08:20 +02:00
Alex Dowad
7b32d176d2
Avoid spurious failures of MySQL INSERT packet overflow test
This test creates a MySQL table called 'test'. In several cases, I have seen a spurious
test failure (in CI) with an error message saying: "table 'test' already exists".

It may be that another test had used a table with the same name and not cleaned it out
correctly. Or maybe we have multiple tests running in parallel in some CI environments,
or the same test DB being used for multiple runs of the test suite.

In any case, change the table name so it is exclusive to this test case only. Also, if
the test table exists at the beginning of the test, drop it.

Closes GH-5479
2020-05-01 12:25:42 +02:00
Nikita Popov
707cb18276 Revert "Insert one more debug output"
This reverts commit 45cb42166d.
2020-04-30 09:55:25 +02:00
Nikita Popov
45cb42166d Insert one more debug output 2020-04-28 21:06:32 +02:00
Nikita Popov
8597ec00d4 Remove support for libmysqlclient 5.0
Closes GH-5391.
2020-04-23 10:38:20 +02:00
Máté Kocsis
928b25cd6e
Generate function entries from stubs for mysqli
Closes GH-5420
2020-04-19 21:56:47 +02:00
Nikita Popov
a866ef88ed Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix MySQL local infile / attr handling on big endian systems
2020-04-16 11:23:11 +02:00
Nikita Popov
f684553c2c Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix MySQL local infile / attr handling on big endian systems
2020-04-16 11:22:43 +02:00
guirish
a1c1736bfb Fix MySQL local infile / attr handling on big endian systems
Make sure pointer types match what is used by libmysql everywhere.

Closes GH-5380.
2020-04-16 11:22:17 +02:00
Nikita Popov
d4471c6aae Remove int6store()
The implementation is broken (syntactically). As it's not used
anyway, I'm just dropping it instead.
2020-04-14 10:37:37 +02:00
Máté Kocsis
ce3b49a8e8
Fix default value of the $class_name parameter of mysqli_fetch_object() 2020-04-10 18:17:18 +02:00
Máté Kocsis
7a72e1cc7a
Fix the default value of the $flags parameter of mysqli_begin_transaction() 2020-04-10 18:17:18 +02:00
Máté Kocsis
481c8c2958
Add missing parameter to the stub of mysqli_real_connect 2020-04-10 18:17:18 +02:00
Nikita Popov
8a5b9cbc9f Fix mysqli_get_client_info() stub
The dummy link argument is not nullable.
2020-04-09 16:54:39 +02:00
Máté Kocsis
3709e74b5e
Store default parameter values of internal functions in arg info
Closes GH-5353. From now on, PHP will have reflection information
about default values of parameters of internal functions.

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2020-04-08 18:37:51 +02:00
Nikita Popov
5293c6d6d4 Merge branch 'PHP-7.4'
* PHP-7.4:
  Make mysqli_poll test more deterministic
2020-04-08 16:38:18 +02:00
Nikita Popov
5317ea6d57 Make mysqli_poll test more deterministic
Handle errors appearing in different order.
2020-04-08 16:36:22 +02:00
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