Nikita Popov
dd86987b2c
Replay warnings during inheritance ( #6928 )
...
Since 3e6b447979 it is again possible to have
warnings (deprecations) during inheritance, and more such functionality is
likely in the future. This is a problem, because such warnings will only be
shown on the first request if the opcache inheritance cache is used. This
currently causes test failures in --repeat builds.
Fix this by uplifting the error recording functionality from opcache to Zend,
and then using it to persist a warning trace in the inheritance cache, which
can then be used to replay the warnings on subsequent executions.
2021-04-29 16:37:53 +02:00
Matteo Beccati
f84936b30c
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Revert "Fix #80892 : PDO::PARAM_INT is treated the same as PDO::PARAM_STR"
2021-04-29 12:06:11 +02:00
Matteo Beccati
7bc9df4af2
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Revert "Fix #80892 : PDO::PARAM_INT is treated the same as PDO::PARAM_STR"
2021-04-29 12:05:49 +02:00
Matteo Beccati
b8e49fe872
Revert "Fix #80892 : PDO::PARAM_INT is treated the same as PDO::PARAM_STR"
...
This reverts commit 340a06778c .
2021-04-29 11:59:16 +02:00
Nikita Popov
e8e7c04a3a
Use common struct to store error information
...
This is needed by both fibers and opcache (and GH-6903 also uses it),
so make it a common structure that can be used by any functionality
storing warnings/errors.
2021-04-29 11:50:54 +02:00
Nikita Popov
bf7a244588
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Show used git commit in community tests
2021-04-29 11:05:04 +02:00
Nikita Popov
47bed58a53
Show used git commit in community tests
...
So we know exactly which revision was tested.
2021-04-29 11:03:48 +02:00
Nikita Popov
39e1af662b
Fix out-of-tree build
...
Add Zend/asm as a build directory.
2021-04-29 10:13:47 +02:00
Nikita Popov
81d1c1bc78
Remove accidentally added flag
2021-04-29 09:46:47 +02:00
Nikita Popov
9a1da9f61f
Don't use separate static variables in inherited methods
...
RFC: https://wiki.php.net/rfc/static_variable_inheritance
Closes GH-6719.
2021-04-28 17:08:50 +02:00
Nikita Popov
3e6b447979
Partially deprecate Serializable
...
If Serializable is implemented, require that __serialize() and
__unserialize() are implemented as well, else issue a deprecation
warning.
Also deprecate use of PDO::FETCH_SERIALIZE.
RFC: https://wiki.php.net/rfc/phase_out_serializable
Closes GH-6494.
2021-04-28 16:55:14 +02:00
Nikita Popov
5295e368b4
Filter return value of ReflectionClassConstant::getModifiers()
...
Don't return internal flags like IS_CASE.
2021-04-28 14:55:37 +02:00
Nikita Popov
fd1d5ec2b4
Add ZEND_CLASS_CONST_FLAGS() macro
...
And drop Z_ACCESS_FLAGS(). We no longer store *only* access flags
in these.
2021-04-28 14:51:54 +02:00
Nikita Popov
88ce1c71b5
Look up func info using function name rather than lcname of call
...
As we already have the called zend_function here, let's use the
name directly, rather than using the lcname of the call. This means
that aliases would be handled correctly automatically.
2021-04-28 12:13:05 +02:00
Nikita Popov
97c6d6605e
Remove FR/FX macros
...
Functions returning by-reference are generally a lost cause, we
won't be able to provide useful information for them.
2021-04-28 12:13:01 +02:00
Nikita Popov
d0610898f6
Remove UNKNOWN_INFO func info entries
...
There's no need to explicitly list that we don't know anything
about a function -- that's the default state.
2021-04-28 11:45:34 +02:00
Nikita Popov
bfa8b49196
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Remove incorrect func info for array_reduce() and pos()
2021-04-28 11:41:59 +02:00
Nikita Popov
2ceef24f4a
Remove incorrect func info for array_reduce() and pos()
...
These are both clearly not rc1 functions. As they are otherwise
UNKNOWN_INFO, I'm just dropping them entirely.
2021-04-28 11:41:21 +02:00
Nikita Popov
08afe9891c
Merge branch 'PHP-8.0'
...
* PHP-8.0:
filter_var_array() may return array_of_ref
2021-04-28 11:28:06 +02:00
Nikita Popov
028dd891f9
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
filter_var_array() may return array_of_ref
2021-04-28 11:27:55 +02:00
Nikita Popov
5acab7ebb4
filter_var_array() may return array_of_ref
...
This function preserves references in the input array.
2021-04-28 11:27:14 +02:00
Nikita Popov
b5778ce1b7
Merge branch 'PHP-8.0'
...
* PHP-8.0:
fetch_assoc may return array_key_long
2021-04-28 11:20:55 +02:00
Nikita Popov
220ffb90d0
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
fetch_assoc may return array_key_long
2021-04-28 11:20:38 +02:00
Nikita Popov
67c4d1f5b9
fetch_assoc may return array_key_long
...
If the column name is a number (which is possible at least via
AS clauses), then symtable canonicalization will convert it into
an integer key.
2021-04-28 11:18:36 +02:00
Nikita Popov
e8ef923dd6
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Remove assert_options() return value info
2021-04-28 11:06:54 +02:00
Nikita Popov
76d1120a48
Remove assert_options() return value info
...
The ASSERT_CALLBACK value is not validated at all -- it's possible
to set it to an arbitrary value. As such, the function can also
return any value or type (even without outright abuse, the opcache
func info was wrong in that the return can be rcn, and the array
can be array_of_ref).
2021-04-28 11:05:05 +02:00
Nikita Popov
bd5419abd6
Merge branch 'PHP-8.0'
...
* PHP-8.0:
password_get_info() may return array_of_null
2021-04-28 10:55:57 +02:00
Nikita Popov
af9fadc55a
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
password_get_info() may return array_of_null
2021-04-28 10:55:43 +02:00
Nikita Popov
c340f97ab0
password_get_info() may return array_of_null
...
The algo key is set to null if the algorithm can't be detected.
2021-04-28 10:54:31 +02:00
Nikita Popov
3ddab31842
Merge branch 'PHP-8.0'
...
* PHP-8.0:
getdate() may return array_key_long
2021-04-28 10:48:04 +02:00
Nikita Popov
4a5bda6a8d
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
getdate() may return array_key_long
2021-04-28 10:47:45 +02:00
Nikita Popov
c7387ab92f
getdate() may return array_key_long
...
This function mostly uses string keys, but the timestamp is
returned at key 0 (why???)
2021-04-28 10:46:37 +02:00
Nikita Popov
cb1d1138f6
Merge branch 'PHP-8.0'
...
* PHP-8.0:
pg_connect() may return rcn
2021-04-28 10:38:07 +02:00
Nikita Popov
98a071e880
pg_connect() may return rcn
...
Without CONNECT_FORCE_NEW, pg_connect() may resuse an existing
connection and refcount may be larger than one.
2021-04-28 10:36:48 +02:00
Nikita Popov
2ffab441c8
Fix pgsql func info
...
Some functions can now return a value with refcount > 1.
2021-04-28 10:14:29 +02:00
Nikita Popov
331eddadc8
Make date/time type arguments of IntlDateFormatter ctor optional
...
Default them to IntlDateFormatter:FULL, which has value 0, which
was what you would get if you passed null to these arguments in
weak typing mode. The documentation called this ICU's default
date/time type.
2021-04-27 23:58:38 +02:00
Nikita Popov
bd2c743f1d
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Remove incorrect format argument
2021-04-27 22:23:22 +02:00
Nikita Popov
9ce5776922
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Remove incorrect format argument
2021-04-27 22:23:06 +02:00
Nikita Popov
3f71ba2611
Remove incorrect format argument
...
rc is not used by the printf format.
2021-04-27 22:22:32 +02:00
Dmitry Stogov
721bd973f9
Fixed CPU detection
2021-04-27 23:00:09 +03:00
Christoph M. Becker
7be5e78dab
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fix #80460 : ODBC doesn't account for SQL_NO_TOTAL indicator
2021-04-27 17:12:58 +02:00
Christoph M. Becker
4c80e439a8
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #80460 : ODBC doesn't account for SQL_NO_TOTAL indicator
2021-04-27 17:12:01 +02:00
Christoph M. Becker
7f83976200
Fix #80460 : ODBC doesn't account for SQL_NO_TOTAL indicator
...
The `StrLen_or_IndPtr` parameter usually may be `SQL_NO_TOTAL`; we need
to cater to that possibility to avoid working with negative string
lengths and other issues. A noteable exemption are calls to
`SQLGetData()` which return `SQL_SUCCESS`; in that case `SQL_NO_TOTAL`
can not occur.
Closes GH-6809.
2021-04-27 17:09:36 +02:00
Christoph M. Becker
9b59f931e8
Merge branch 'PHP-8.0'
...
* PHP-8.0:
7.3.29 is next
2021-04-27 17:06:05 +02:00
Christoph M. Becker
606b2c39fc
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
7.3.29 is next
2021-04-27 16:58:32 +02:00
Christoph M. Becker
66308af539
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
7.3.29 is next
2021-04-27 16:56:53 +02:00
Christoph M. Becker
98c8ad9218
7.3.29 is next
2021-04-27 16:55:20 +02:00
Christoph M. Becker
b52106f6b9
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fix ./makedist wrt. to GH move
2021-04-27 15:51:24 +02:00
Christoph M. Becker
e1f8763a2c
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix ./makedist wrt. to GH move
2021-04-27 15:50:54 +02:00
Christoph M. Becker
20b62ade29
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix ./makedist wrt. to GH move
2021-04-27 15:49:59 +02:00