1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 02:33:17 +02:00
Commit Graph

126663 Commits

Author SHA1 Message Date
George Peter Banyard b8327cff0b Inline DBA_ID_GET2(_3) Macro 2021-10-23 10:13:57 +01:00
Dmitry Stogov 864a7953fa Merge branch 'PHP-8.1'
* PHP-8.1:
  Tracing JIT: Fixed incorrect assumption about in-memeory zval type
2021-10-22 14:45:25 +03:00
Dmitry Stogov d78693f9ed Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Tracing JIT: Fixed incorrect assumption about in-memeory zval type
2021-10-22 14:44:57 +03:00
Dmitry Stogov d3251632ad Tracing JIT: Fixed incorrect assumption about in-memeory zval type 2021-10-22 14:38:38 +03:00
Kamil Tekiela 885dca3762 Remove mysqlnd_unbuffered_skip_result and voidify skip_result 2021-10-22 11:10:53 +01:00
Kamil Tekiela ad5f4715a6 (mysqlnd_conn_data, restart_psession) never fails 2021-10-22 11:10:53 +01:00
Kamil Tekiela 6be1790651 Reset cannot fail. It was used in a condition, but it doesn't have to be. 2021-10-22 11:10:53 +01:00
Kamil Tekiela e7a815d19b (mysqlnd_conn_data, end_psession) never fails 2021-10-22 11:10:53 +01:00
Kamil Tekiela 45607225ea pfc & vio init methods cannot fail
These methods cannot fail the way they are currently designed. They only
call set_client_option which could fail only with wrong arguments. Since
this is an internal call, the arguments should never change. Either way
set_client_option should not cause init to fail.
2021-10-22 11:10:53 +01:00
Nikita Popov ee510eed68 Deprecate partially supported callables
This deprecates all callables that are accepted by
call_user_func($callable) but not by $callable(). In particular:

    "self::method"
    "parent::method"
    "static::method"
    ["self", "method"]
    ["parent", "method"]
    ["static", "method"]
    ["Foo", "Bar::method"]
    [new Foo, "Bar::method"]

RFC: https://wiki.php.net/rfc/deprecate_partially_supported_callables

Closes GH-7446.
2021-10-22 10:15:24 +02:00
George Peter Banyard 1afe89f8c3 Remove (ZEND_)WRONG_PARAM_COUNT_WITH_RETVAL macros
A TypeError is always emitted therefore assigning a retval is pointless and incorrect.
2021-10-22 06:44:48 +02:00
Dmitry Stogov fda0ebfdd0 Merge branch 'PHP-8.1'
* PHP-8.1:
  Tracing JIT: Fixed incorrect assumtion about temporary variable types clobbered by *_ROPE instructions
  Revert "Fix bug GH-1 (mysqli_sql_exception->sqlstate is inaccessible)"
  Fix bug GH-1 (mysqli_sql_exception->sqlstate is inaccessible)
2021-10-21 21:40:46 +03:00
Dmitry Stogov b5a6e518f8 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Tracing JIT: Fixed incorrect assumtion about temporary variable types clobbered by *_ROPE instructions
  Revert "Fix bug GH-1 (mysqli_sql_exception->sqlstate is inaccessible)"
  Fix bug GH-1 (mysqli_sql_exception->sqlstate is inaccessible)
2021-10-21 21:40:24 +03:00
Dmitry Stogov c7e974fc4e Tracing JIT: Fixed incorrect assumtion about temporary variable types clobbered by *_ROPE instructions 2021-10-21 21:35:57 +03:00
Kamil Tekiela c9d509b668 Revert "Fix bug GH-1 (mysqli_sql_exception->sqlstate is inaccessible)"
This reverts commit 64fca5c5f0.
2021-10-21 19:01:01 +01:00
Kamil Tekiela 64fca5c5f0 Fix bug GH-1 (mysqli_sql_exception->sqlstate is inaccessible) 2021-10-21 18:51:16 +01:00
Bob Weinand 76145424c6 Merge branch 'PHP-8.1' 2021-10-21 19:32:20 +02:00
Bob Weinand 32024dd0bb Merge branch 'PHP-8.0' into PHP-8.1 2021-10-21 19:32:03 +02:00
Bob Weinand 345f46ff29 Fix weakmap API test
Apparently under some targets the address can evaluate to an address with the most significant bit set. (displays as negative number)
2021-10-21 19:31:37 +02:00
Bob Weinand d6bf375fe4 Merge branch 'PHP-8.1' 2021-10-21 13:44:03 +02:00
Bob Weinand 51a9c68ee5 Merge branch 'PHP-8.0' into PHP-8.1 2021-10-21 13:42:20 +02:00
Remi Collet a6f5c2dc8b fix for pcre2 10.38 2021-10-21 13:37:26 +02:00
Remi Collet 11927caef7 Merge branch 'PHP-8.1'
* PHP-8.1:
  fix for pcre2 10.38
  fix for pcre2 10.38
2021-10-21 13:35:11 +02:00
Remi Collet 17aae1302e Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  fix for pcre2 10.38
  fix for pcre2 10.38
2021-10-21 13:34:28 +02:00
Bob Weinand 471102edcd Add ZEND_API for weakmap functionality via zend_weakrefs_hash_add/del
Closes GH-7600.
2021-10-21 13:34:22 +02:00
Remi Collet dd61002676 fix for pcre2 10.38 2021-10-21 13:34:09 +02:00
Remi Collet 01c6e03978 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  fix for pcre2 10.38
2021-10-21 13:33:58 +02:00
Remi Collet 56495ac031 fix for pcre2 10.38 2021-10-21 13:33:35 +02:00
Nikita Popov ee87de6541 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix shared pdo_dblib build
2021-10-21 12:15:04 +02:00
Nikita Popov f27d074996 Fix shared pdo_dblib build
As pointed out by remi in:
https://github.com/php/php-src/commit/47fe4125189833e80eac8c09f7d1cf83b10aeb0d#r58428167
2021-10-21 12:13:36 +02:00
Nikita Popov 155c7d3e7e Merge branch 'PHP-8.1'
* PHP-8.1:
  Remove bug76738.phpt
2021-10-21 10:44:49 +02:00
Nikita Popov 6ff1c9c403 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Remove bug76738.phpt
2021-10-21 10:44:42 +02:00
Nikita Popov decf906a90 Remove bug76738.phpt
The test contains PII in the base64-encoded part and is way too
complicated to be useful. I'd try to reduce it, but I can't tell
what it's actually supposed to test.
2021-10-21 10:40:12 +02:00
Ayesh Karunaratne d23e36da81 Add CURLINFO_EFFECTIVE_METHOD
Since Curl 7.72.0, it supports a new parameter
called `CURLINFO_EFFECTIVE_METHOD`, which returns the effect method
in HTTP(s) requests. This is similar to `CURLINFO_EFFECTIVE_URL`.

 - https://curl.se/libcurl/c/CURLINFO_EFFECTIVE_METHOD.html

This adds support for CURLINFO_EFFECTIVE_URL if ext/curl is built
with libcurl >= 7.72.0 (0x074800).

Closes GH-7595.
2021-10-21 10:33:40 +02:00
Nikita Popov b743cd72d0 Fix inference if FETCH_DIM_W user optimized away
In this case the user may be a FREE.

Also add the test file that I forgot in
3ce472d1a6.
2021-10-21 09:58:07 +02:00
Nikita Popov 16e9e666ba Encode string offset error reason in extended_value
For FETCH_DIM_W etc encode the context it is being used in
(dim, obj, ref or incdec) so we can throw an appropriate error
message for invalid string offset use, in a way that does not
require inspecting neighboring opcodes. The implementation is
similar to the flags used for FETCH_OBJ.

This means that we do not have to be careful about preserving
following opcodes during optimization.

Closes GH-7599.
2021-10-21 09:52:09 +02:00
Dmitry Stogov 9edf825eab Merge branch 'PHP-8.1'
* PHP-8.1:
  Use right frame
2021-10-20 23:51:16 +03:00
Dmitry Stogov 11dd5e6e08 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Use right frame
2021-10-20 23:51:04 +03:00
Dmitry Stogov b69c6ba9df Use right frame 2021-10-20 23:50:33 +03:00
Dmitry Stogov 01c9282d5a Merge branch 'PHP-8.1'
* PHP-8.1:
  JIT: Fixed megamorphic call detection
2021-10-20 22:31:15 +03:00
Dmitry Stogov 7e53b08cb1 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fixed megamorphic call detection
2021-10-20 22:31:05 +03:00
Dmitry Stogov 95c0dfc57f JIT: Fixed megamorphic call detection 2021-10-20 22:16:25 +03:00
Nikita Popov a1285978d4 Merge branch 'PHP-8.1'
* PHP-8.1:
  Print array defaults in reflection
2021-10-20 15:17:08 +02:00
Nikita Popov fb5cff1272 Print array defaults in reflection
As a followup to f34114b1fb print
the contents of arrays rather than just a generic "Array" marker.
Also drop the truncation on strings. As we no longer resolve
constants, there should be less concerns about printing very
large strings here. If someone thought it was a good idea to use
a 10k character strings as a default value in code, then it should
be fine for us to print it in reflection as well.
2021-10-20 15:16:29 +02:00
Nikita Popov 90ef1c7834 Merge branch 'PHP-8.1'
* PHP-8.1:
  Remove unused scope argument
2021-10-20 14:55:13 +02:00
Nikita Popov 11d97ae00c Remove unused scope argument 2021-10-20 14:55:00 +02:00
Nikita Popov a38bad87d5 Consolidate UNSET_DIM handling for string offset error
The immediate error here is the nested indexing in write context,
the fact that it's ultimately wrapped in an unset() doesn't matter.
Same as $str[0][0] += 1 will throw "Cannot use string offset as an
array", so should this case.
2021-10-20 13:05:38 +02:00
Nikita Popov ca7a11c9cf Consolidate string offset by reference errors
Use the same error message for all scenarios where a reference to
a string offset is acquired.
2021-10-20 13:00:48 +02:00
Nikita Popov a58201369c Remove impossible cases from string offset error handling
As far as I can see, these cases should not be reachable.
2021-10-20 12:51:42 +02:00
Nikita Popov 3ce472d1a6 Fix message for some string offset uses as object
Even if the object property is incremented afterwards, the
immediate error is the use as object, not the increment.

Also consolidate tests for this error message. Previously they
were spread across a number of bug-specific tests.
2021-10-20 12:44:05 +02:00