Commit Graph

20 Commits

Author SHA1 Message Date
Máté Kocsis
0d330e1a02
Add a few missing parameter types in stubs
Related to GH-5627
2020-07-30 14:26:45 +02:00
Nikita Popov
f7f557926e Fix arg/func info
* mysqli_get_server_info() cannot return null. The underlying API
   is infallible.
 * mysqli_select_db() func info is redundant.
 * mb_detect_order() can only return array|true, not array|false.

Also make the func_info.phpt test that is supposed to catch these
kinds of issues actually work.
2020-07-21 15:00:33 +02:00
Máté Kocsis
30067894fc
Update outdated arginfo hashes 2020-06-30 16:02:11 +02:00
Nikita Popov
ff19ec2df3 Introduce InternalIterator
Userland classes that implement Traversable must do so either
through Iterator or IteratorAggregate. The same requirement does
not exist for internal classes: They can implement the internal
get_iterator mechanism, without exposing either the Iterator or
IteratorAggregate APIs. This makes them usable in get_iterator(),
but incompatible with any Iterator based APIs.

A lot of internal classes do this, because exposing the userland
APIs is simply a lot of work. This patch alleviates this issue by
providing a generic InternalIterator class, which acts as an
adapater between get_iterator and Iterator, and can be easily
used by many internal classes. At the same time, we extend the
requirement that Traversable implies Iterator or IteratorAggregate
to internal classes as well.

Closes GH-5216.
2020-06-24 15:31:41 +02:00
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
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
Máté Kocsis
3ebce8e9fc
Fix UNKNOWN default values in various extensions
Closes GH-5514
2020-05-05 19:08:20 +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
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
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
Máté Kocsis
3ab75ac019
Update MySQLi function info
Closes GH-5214
2020-02-28 14:36:54 +01:00
Tom Van Looy
fabe6a310c Add ext/mysqli stubs
Closes GH-4913.
2020-02-25 11:06:46 +01:00