Commit graph

72 commits

Author SHA1 Message Date
Kamil Tekiela
0b887042ae
mysqli_field_seek return type changed to true (#11948) 2023-08-14 19:04:34 +01:00
Máté Kocsis
e328c68305
Rename @cname to @cvalue in stubs (#9043)
@cname currently refers to the constant name in C. However, it is not always a (constant) name, but sometimes a function invocation, so naming it as @cvalue would be more appropriate.
2022-07-19 15:11:42 +02:00
Kamil Tekiela
5a69cb6fa1
Deprecate MYSQLI_IS_MARIADB
Closes GH-8919
2022-07-19 11:19:41 +01:00
Máté Kocsis
f0d536844f
Declare ext/mysqli constants in stubs (#8811) 2022-07-18 13:00:35 +02:00
Tim Düsterhus
342e18f105
Support the actual #[\SensitiveParameter] attribute in stubs (#8836) 2022-07-12 12:43:44 +02:00
Kamil Tekiela
1dc51c7b90
Implement mysqli_execute_query() (#8660) 2022-07-06 12:23:46 +01:00
Máté Kocsis
49d3dde211
Declare true return types (#8759) 2022-06-18 22:06:50 +02:00
Tim Düsterhus
3a4d1b6131 Mark parameter in ext/mysqli as sensitive 2022-06-13 11:09:12 +02:00
Máté Kocsis
debd38f851 Add support for sensitive parameters in stubs 2022-06-04 18:15:05 +02:00
Kamil Tekiela
01cbe390ca Remove mysqli_driver::$reconnect property 2022-05-30 15:28:08 +01:00
Kamil Tekiela
d84dfa3292 Remove MYSQLI_USE_MYSQLND constant and all the code with it 2022-05-30 15:28:08 +01:00
Máté Kocsis
2b4fee03af
Mark ext/mysqli properties as readonly for documentation purposes 2022-04-05 13:24:21 +02:00
Máté Kocsis
62e4ac9439
Add support for custom property links
Closes GH-7892
2022-01-07 08:28:26 +01:00
Máté Kocsis
f70ca0acd4
Mark mysqli_driver properties readonly 2022-01-04 08:41:02 +01:00
Kamil Tekiela
8869bbe0e9
Fix bug GH-7746 (mysqli_sql_exception->sqlstate is inaccessible)
Closes GH-7747
2021-12-30 14:23:06 +00:00
Máté Kocsis
1bf1481a2a
Specify a few array func info entries (#7425) 2021-08-30 14:29:18 +02:00
Máté Kocsis
8e6e9838b0
Add support for generating MAY_BE_ARRAY_OF_REF func info flag (#7416) 2021-08-30 13:50:34 +02:00
Máté Kocsis
7d3cdb3681
Fix mysqli stub alias verification issues
I had to add a few no-verify annotations since the return type of the function and method counterparts cannot be aligned properly (easily)
2021-08-26 17:36:53 +02:00
Máté Kocsis
17ccabc6b6
Generate optimizer func info from stubs for ext/curl, ext/mysqli, ext/pcre (#7407) 2021-08-26 17:11:45 +02:00
Máté Kocsis
fc0d8983d3
Fix some smaller formatting inconsistencies in stubs 2021-07-20 00:52:26 +02:00
Nikita Popov
625b89af2f Deprecate mysqli::init()
In favor of parent::__construct().

Part of https://wiki.php.net/rfc/deprecations_php_8_1.
2021-07-08 16:45:05 +02:00
Máté Kocsis
6af5b369d7
Merge branch 'PHP-8.0'
* mysqli_get_client_info() cannot return null
2021-05-26 17:49:39 +02:00
Máté Kocsis
ceb0951fa5
mysqli_get_client_info() cannot return null
This method is already deprecated
2021-05-26 17:48:35 +02:00
Máté Kocsis
01775fa104
Declare tentative return types for ext/mysqli (#6998) 2021-05-26 17:29:58 +02:00
Máté Kocsis
1a1a9b2e4a
Merge branch 'PHP-8.0'
* Fix the return type of mysqli_connect()
2021-05-26 12:11:09 +02:00
Máté Kocsis
97f7279353
Fix the return type of mysqli_connect() 2021-05-26 12:07:02 +02:00
Máté Kocsis
a6c9f148b6
Merge branch 'PHP-8.0'
* Fix return type of mysqli::connect()
2021-05-26 11:56:21 +02:00
Máté Kocsis
86ef34fc61
Fix the return type of mysqli::connect() 2021-05-26 11:55:03 +02:00
Máté Kocsis
4ece535f19
Merge branch 'PHP-8.0'
* Fix return type of php_user_filter::onCreate()
* Fix return type of mysqli::init()
* Fix return type of UConverter::fromUCallback() and UConverter::toUCallback()
2021-05-07 15:23:28 +02:00
Máté Kocsis
e8361eb0e3
Fix return type of mysqli::init() 2021-05-07 15:21:41 +02:00
Kamil Tekiela
54222a6fe4
Implement mysqli_fetch_column (#6798)
* Implement mysqli_fetch_column
2021-05-01 20:11:47 +01:00
Máté Kocsis
30a082cb16
Make some exception properties typed
Closes GH-6891
2021-04-22 10:22:50 +02:00
Kamil Tekiela
45bad6474e
Mysqli bind in execute (#6271) 2021-04-14 12:52:51 +01:00
Nikita Popov
d905e77483 Enforce types when writing to mysqli dynamic properties
Previously this just assumed that the value was of a certain type.

I'm doing this in a generic way that checks against the declared
property type -- the handler function can then assume the value
to be of the correct type.
2021-04-13 15:30:56 +02:00
Dharman
7e9f6d2a48 Deprecate OO style mysqli::get_client_info method
Deprecate passing connection object to mysqli_get_client_info()

Closes GH-6777.
2021-03-17 20:10:18 +00:00
Máté Kocsis
4833309bd2
Use typed properties in ext/mysqli
Closes GH-6739
2021-03-15 13:11:57 +01:00
Máté Kocsis
cad66533f0
Generate class entries from stubs for ldap, libxml, mbstring and mysqli
Closes GH-6684
2021-02-16 14:46:19 +01:00
Nikita Popov
1cd33d83db Merge branch 'PHP-8.0'
* PHP-8.0:
  Make mysqli_ssl_set() arguments nullable
2021-02-10 15:33:25 +01:00
Nikita Popov
39c6aaa9cc Make mysqli_ssl_set() arguments nullable
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.
2021-02-10 15:31:27 +01:00
Nikita Popov
7b2c098f87 Merge branch 'PHP-8.0'
* PHP-8.0:
  Make fetch_* OO same as func
2021-01-06 15:03:28 +01:00
Dharman
34ef804b04 Make fetch_* OO same as func
Clsoses GH-6580.
2021-01-06 15:02:52 +01:00
Nikita Popov
73f989a83b Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix/improve mysqli stubs
2021-01-06 11:29:38 +01:00
Dharman
44a311dbbe Fix/improve mysqli stubs
* mysqli_commit $flags default value is 0, not -1.
* A number of functions cannot actually return null.
* mysqli_poll parameter names were incorrect, as this function
  has a different signature from select.
* fetch functions apart from fetch_all can return false on failure.
2021-01-06 11:28:45 +01:00
Nikita Popov
037512cfce Move fetch_all implementation out of mysqlnd
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.
2020-12-18 12:27:30 +01:00
Nikita Popov
be93e5a120 Make mysqli_stmt_next_result available under libmysql
The libmysqlclient version we require supports mysql_stmt_next_result.
2020-12-18 11:32:41 +01:00
Máté Kocsis
d5f92baad0 Fix default value handling of mysqli_fetch_object()
Make [] acceptable both for classes without constructors and
classes with a constructor that takes no arguments.

Closes GH-6336.
2020-10-20 16:48:12 +02:00
Máté Kocsis
d6264b0966
Verify parameter names of function aliases
Closes GH-6335
2020-10-16 10:56:33 +02:00
Nikita Popov
e86a6ced06 Use $statement in mysqli
As we went with $statement rather than $stmts in other places,
let's also use it in mysqli. The discrepancy with mysqli_stmt
is a bit unfortunate, but we can't be consistent with *both*.

Closes GH-6330.
2020-10-13 14:20:00 +02:00
Nikita Popov
8138ed73d7 Make mysqli_warning constructor private
The constructor was already effectively inaccessible (protected
on a final class). This just makes it more obvious and removes
the implementation in favor of directly throwing.

Per the removed test, this was an unfinished feature, and I don't
think it makes a lot of sense to finish it -- the
mysqli_stmt::get_warnings() interface makes more sense than
direct construction.

Closes GH-6208.
2020-09-27 22:08:24 +02:00
Larry Garfield
02dc9ce6e5 Rename mysqli parameters to be more logical
Closes GH-6172.
2020-09-27 21:28:29 +02:00