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
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
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
twosee
7d6a0ba808
Fix expression warnings and break warnings
...
Close GH-5675.
2020-06-07 10:41:11 +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
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
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
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
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
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
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
Máté Kocsis
100552d4b5
Add stubs for PDO
2019-11-18 12:38:10 +01:00
Máté Kocsis
2204dbde3b
Add missing ZPP checks
...
Closes GH-4878.
2019-11-01 15:26:52 +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
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
...
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Nikita Popov
bbc958990c
Merge branch 'PHP-7.4'
2019-09-23 13:47:43 +02:00
Nikita Popov
366f97f070
Remove commented code
2019-09-23 13:34:42 +02:00
Nikita Popov
d37d418927
Merge branch 'PHP-7.4'
2019-07-23 11:28:10 +02:00
George Peter Banyard
6d6d954d0d
Cleanup of remaining E_STRICT in tests
2019-07-23 11:27:23 +02:00
Nikita Popov
477d1e02ae
Merge branch 'PHP-7.4'
2019-06-12 11:54:21 +02:00
Nikita Popov
f601eb15e6
Fix -Wmissing-braces warnings
...
Unfortunate that = {} is a GNU extension.
2019-06-12 11:54:12 +02:00
Nikita Popov
7686b0b889
Merge branch 'PHP-7.4'
2019-06-05 14:53:50 +02:00
Nikita Popov
a31f46421d
Allow exceptions in __toString()
...
RFC: https://wiki.php.net/rfc/tostring_exceptions
And convert some object to string conversion related recoverable
fatal errors into Error exceptions.
Improve exception safety of internal code performing string
conversions.
2019-06-05 14:25:07 +02:00
Dmitry Stogov
b2cdde0826
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macros
2019-05-28 20:19:15 +03:00
Dmitry Stogov
83804519df
Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macros
2019-05-28 20:10:02 +03:00
Nikita Popov
dc42e403a2
Merge branch 'PHP-7.4'
2019-04-15 11:42:55 +02:00
Nikita Popov
7f6c22cb3d
Fix last maybe uninit warnings on 7.4
...
Most of these only occur under GCC 5. Not fond of all the workarounds
(especially the PDO one), but it gets us a clean build...
2019-04-15 11:35:13 +02:00
Nikita Popov
3fab73e24e
Avoid misc uninitialized variable warnings
2019-04-12 15:12:45 +02:00
Nikita Popov
339b0af429
Avoid misc uninitialized variable warnings
2019-04-12 15:12:39 +02:00
Joe Watkins
7b58e43da3
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Follow up #77849 PDOStatement objects in undefined state after clone
2019-04-06 01:32:15 +02:00
Joe Watkins
1b85e72032
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Follow up #77849 PDOStatement objects in undefined state after clone
2019-04-06 01:31:32 +02:00
Joe Watkins
0c6a68fa36
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Follow up #77849 PDOStatement objects in undefined state after clone
2019-04-06 01:27:58 +02:00
Joe Watkins
a2b8a62abf
Follow up #77849 PDOStatement objects in undefined state after clone
2019-04-06 01:26:47 +02:00
Peter Kokot
2968a1d7f2
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Remove legacy AC_CHECK_TYPE calls for uint and ulong
2019-03-06 22:50:46 +01:00
Peter Kokot
bebcdcc745
Remove legacy AC_CHECK_TYPE calls for uint and ulong
...
The AC_CHECK_TYPE was refactored in more recent versions of Autoconf
and the call with two arguments is obsolete and not recommended anymore.
This patch also refactors some leftovers of using ulong and uint which
are not standard nor common usages of types in C.
The ulong can be used as zend_ulong and uint usage is actually
`unsigned int`.
The usage of HAVE_ULONG removed since it is not used in current code
base.
Legacy edgecase for some legacy HPUX systems removed:
- sys/stream.h header is not checked and the HAVE_SYS_STREAM_H is
not defined with current build system.
- flags are unsigned int
- max_allowed_packet changed to unsigned int
2019-03-06 22:49:16 +01:00
Gabriel Caruso
ad75511c8e
Missing param in arginfo_pdostatement_setfetchmode
...
PDO::setFetchMode receives up to 3 params
2019-02-14 05:13:38 -02:00
Dmitry Stogov
f45e0ce928
Remove ZEND_OVERLOADED_FUNCTION and corresponding call_method object handler
2019-02-07 21:05:46 +03:00