Nikita Popov
777aa9163d
Fetch pdo stmt after zpp
2020-07-20 16:27:46 +02:00
Nikita Popov
7d3e530f4e
Use zpp for PDO fetch mode
...
Also changing the function signatures to accept variadic args
for the fetch params. If we're already breaking Doctrine anyway,
we may as well do it properly.
2020-07-20 16:05:33 +02:00
Christoph M. Becker
6c7b5c0760
Unbork tests for PDO_Firebird
...
PDO_Firebird raises a warning regarding the unknown SQL syntax, which
we have to silence to avoid run-tests.php to mark the test as borked.
2020-07-12 17:51:29 +02:00
Máté Kocsis
d30cd7d7e7
Review the usage of apostrophes in error messages
...
Closes GH-5590
2020-07-10 21:05:28 +02:00
Nikita Popov
302933daea
Remove no_separation flag
2020-07-07 09:30:24 +02:00
Max Semenik
2b5de6f839
Remove proto comments from C files
...
Closes GH-5758
2020-07-06 21:13:34 +02:00
Nikita Popov
312201dce4
Add get_gc handle for object iterators
...
Optional handler with the same semantics as the object handler.
2020-07-01 15:17:22 +02:00
Máté Kocsis
30067894fc
Update outdated arginfo hashes
2020-06-30 16:02:11 +02:00
Fabien Villepinte
0c6d06ecfa
Replace EXPECTF when possible
...
Closes GH-5779
2020-06-29 21:31:44 +02:00
Ayesh Karunaratne
d114812faf
[ci skip] Various typo fixes in stub comments and CHANGES file
2020-06-25 23:32:40 +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
Nikita Popov
15846ff115
Add ZVAL_OBJ_COPY macro
...
For the common ZVAL_OBJ + GC_ADDREF pattern.
This mirrors the existing ZVAL_STR_COPY API.
2020-06-17 16:36:56 +02:00
twosee
88355dd338
Constify char * arguments of APIs
...
Closes GH-5676.
2020-06-08 10:38:45 +02:00
twosee
7d6a0ba808
Fix expression warnings and break warnings
...
Close GH-5675.
2020-06-07 10:41:11 +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
4a816584a4
Make float to string casts locale-independent
...
From now on, float to string casting will always behave locale-independently.
RFC: https://wiki.php.net/rfc/locale_independent_float_to_string
Closes GH-5224
Co-authored-by: George Peter Banyard <girgias@php.net >
2020-05-08 10:52:23 +02:00
AllenJB
50752401a7
Change the default PDO error mode to exceptions
...
According to <https://www.php.net/manual/en/pdo.error-handling.php >.
2020-05-04 22:51:47 +02:00
Máté Kocsis
1c469adb8b
Remove PDO::dbh_constructor()
2020-04-14 11:49:02 +02:00
Máté Kocsis
c6485535c2
Generate method entries from stubs for curl, ffi, pdo, phar
...
Closes GH-5375
2020-04-14 11:49:02 +02:00
George Peter Banyard
446724bcd9
Fix [-Werror=missing-braces] compiler warning
...
Partial fix to bug 79431
2020-04-13 23:03:31 +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
Máté Kocsis
21cfa03f17
Generate function entries for another batch of extensions
...
Closes GH-5352
2020-04-05 21:15:30 +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
Nikita Popov
fb5bfcb75b
Add a ZEND_UNCOMPARABLE value
...
To explicitly indicate that objects are uncomparable. For now
this has no functional difference from the usual 1 return value,
but makes intent clearer.
2020-03-31 12:36:48 +02:00
Máté Kocsis
01b266aac4
Improve error messages of various extensions
...
Closes GH-5278
2020-03-23 18:59:04 +01:00
George Peter Banyard
6e40ec7de9
Second go at fixing [-Wmissing-field-initializers] compiler warning in PDO
...
By 0 initializing the sub structs
2020-02-22 01:01:07 +01:00
Christoph M. Becker
7d0102dfa7
Revert "Replace @param annotations with type declarations"
...
This reverts commit c31029f335 .
2020-02-17 08:55:18 +01:00
Christoph M. Becker
c31029f335
Replace @param annotations with type declarations
2020-02-16 23:43:38 +01:00
George Peter Banyard
4c9699f0d1
Revert "Fix [-Wmissing-field-initializers] compiler warning in ext/PDO"
...
Seems like Travis doesn't like this and now throws a
[-Werror=maybe-uninitialized] instead.
This reverts commit 051b01d465 .
2020-02-11 00:57:52 +01:00
George Peter Banyard
051b01d465
Fix [-Wmissing-field-initializers] compiler warning in ext/PDO
2020-02-11 00:24:34 +01:00
Nikita Popov
f8d795820e
Reindent phpt files
2020-02-03 22:52:20 +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
Christoph M. Becker
7232779fca
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #79106 : PDO may fetch wrong column indexes with PDO::FETCH_BOTH
2020-01-13 18:49:38 +01:00
Christoph M. Becker
ed78c6dbae
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #79106 : PDO may fetch wrong column indexes with PDO::FETCH_BOTH
2020-01-13 18:48:55 +01:00
Christoph M. Becker
30ce242435
Fix #79106 : PDO may fetch wrong column indexes with PDO::FETCH_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 18:47:54 +01:00
Máté Kocsis
8f4f1dea34
Convert zend_parse_parameters_none() to fast ZPP
...
I've done the conversion in those extensions where fast ZPP is predominant.
2020-01-03 13:23: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
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
Nikita Popov
4a5e17f9af
Restore PDOStatement::setFetchMode() signature
...
I don't think this is worth the BC break, and getting variadic
signature changes compatible across PHP versions is somewhat tricky.
2019-12-06 07:18:11 +01:00
Máté Kocsis
100552d4b5
Add stubs for PDO
2019-11-18 12:38:10 +01:00
Nikita Popov
ac4e0f0852
Make zend_type a 2-field struct
...
We now store the pointer payload and the type mask separately. This
is in preparation for union types, where we will be using both at
the same time.
To avoid increasing the size of arginfo structures, the
pass_by_reference and is_variadic fields are now stored as part of
the type_mask (8-bit are reserved for custom use).
Different types of pointer payloads are distinguished based on bits
in the type_mask.
2019-11-08 15:15:48 +01:00
Fabien Villepinte
a555cc0b3d
Clean DONE tags from tests
...
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.
Closes GH-4872.
2019-11-07 21:31:47 +01:00
Máté Kocsis
2204dbde3b
Add missing ZPP checks
...
Closes GH-4878.
2019-11-01 15:26:52 +01:00
Cameron Porter
07964fc2b5
pdo_oci: Add support for setting and getting the oracle OCI 18c call timeout value.
2019-11-01 10:36:55 +01:00
Máté Kocsis
9493893412
Cleanup return values when parameter parsing is unsuccessful
2019-10-30 16:05:20 +01:00
Nikita Popov
6719d3e718
Add Z_PARAM_STRING/ARRAY_OR_NULL convenience macros
2019-10-29 13:29:52 +01:00
Dmitry Stogov
b02b81299c
Comparison cleanup:
...
- introduce zend_compare() that returns -1,0,1 dirctly (without intermediate zval)
- remove compare_objects() object handler, and keep only compare() handler
2019-10-07 17:57:49 +03:00
Nikita Popov
647b1c7fcf
Remove most uses of ZEND_PARSE_PARAMETERS_END_EX()
...
As ZPP now throws, it makes no sense to specify an explicit return
value.
2019-10-07 10:02:18 +02:00