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

53493 Commits

Author SHA1 Message Date
Christoph M. Becker 87fad8cdf0 Fix #78790: mysqli_get_client_info() expects exactly 0 parameters
`mysqli_get_client_info()` and `mysqli_thread_safe()` can also be
called as methods, so we have to cater to this when parsing the
arguments.
2019-11-11 10:01:17 +01:00
Benjamin Eberlei f905a81979 ext/dom: Replace usages of PHP_FUNCTION and aliases with PHP_METHOD. 2019-11-09 21:29:42 +01:00
Benjamin Eberlei ee80567a83 Merge branch 'dom-arginfo-stubs' 2019-11-09 15:16:09 +01:00
Fabien Villepinte 1240c122a1 Merge branch 'PHP-7.4' 2019-11-09 13:56:23 +01:00
Fabien Villepinte ce41795a9f Fix conflicts in windows ACL tests
Closes GH-4898.
2019-11-09 13:55:42 +01:00
Nikita Popov 9bbbc9e7e9 Add support for union types in stubs
This is the MVP for supporting union types in PHP stubs. Return
types with only builtin types work, which is the part we mainly
need.

Closes GH-4895.
2019-11-08 17:32:18 +01:00
Levi Morrison 1cb69c44d7 Merge branch 'PHP-7.4' 2019-11-08 08:04:52 -07:00
Levi Morrison 05bce66037 Merge branch 'PHP-7.3' into PHP-7.4 2019-11-08 08:02:49 -07:00
Levi Morrison 4a55794b98 Wrap php_random.h in C++ portability macros
Also remove portability headers. This goes against the existing
conventions of these files.
2019-11-08 07:58:26 -07:00
Nikita Popov 999e32b65a Implement union types
According to RFC: https://wiki.php.net/rfc/union_types_v2

The type representation now makes use of both the pointer payload
and the type mask at the same time. Additionall, zend_type_list is
introduced as a new kind of pointer payload, which is used to store
multiple class types. Each of the class types is a tagged pointer,
which may be either a class name or class entry. The latter is only
used for typed properties, while arguments/returns will instead use
cache slots. A type list can contain a mix of both names and CEs at
the same time, as not all classes may be resolvable.

One thing this is missing is support for union types in arginfo
and stubs, which I want to handle separately.

I've also dropped the special object code from the JIT implementation
for now -- I plan to add this back in a different form at a later time.
For now I did not want to include non-trivial JIT changes together
with large functional changes.

Another possible piece of follow-up work is to implement "iterable"
as an internal alias for "array|Traversable". I believe this will
eliminate quite a few special-cases that had to be implemented.

Closes GH-4838.
2019-11-08 15:15:48 +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
Benjamin Eberlei 4253ca486d Convert ext/dom to use arginfo stub. 2019-11-08 15:05:35 +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
Nikita Popov 80cfd99074 Reduce reallocations in exif parsing
Instead of reallocating lists element by element, increase the
allocated list size exponentially.
2019-11-07 21:20:34 +01:00
Máté Kocsis ab6b412a0b Add stubs for standard lib functions 2019-11-07 17:59:03 +01:00
Máté Kocsis afe4a879c7 Promote register_tick_function() callback validation warning to an exception 2019-11-07 17:56:58 +01:00
Máté Kocsis 662afc80f8 Remove PHP_SLEEP_NON_VOID as it is not useful anymore 2019-11-07 17:56:26 +01:00
Nikita Popov a573862676 Merge branch 'PHP-7.4'
* PHP-7.4:
  Wrap hrtime in `extern "c" {}`
2019-11-07 14:42:16 +01:00
Nikita Popov 6ddb381ae5 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Wrap hrtime in `extern "c" {}`
2019-11-07 14:42:11 +01:00
Levi Morrison b9dfa12853 Wrap hrtime in extern "c" {}
This allows it to be used by C++ extensions without them having to do their own forward declares.

Closes GH-4890.
2019-11-07 14:41:58 +01:00
Nikita Popov ea6d22cfad Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix php_pcre_mutex_free()
2019-11-07 14:32:03 +01:00
Nikita Popov e19f0e86dc Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix php_pcre_mutex_free()
2019-11-07 14:31:55 +01:00
Nikita Popov 6dcc0b859f Fix php_pcre_mutex_free()
We should only set the mutex to NULL if we actually freed it.
Due to missing braces non-main threads may currently set it to
NULL first.
2019-11-07 14:31:19 +01:00
Nikita Popov e9bdb5cd08 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove outdated comments in test
2019-11-07 14:06:53 +01:00
Nikita Popov aba89f56ff Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Remove outdated comments in test
2019-11-07 14:06:48 +01:00
Nikita Popov 29f4939923 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Remove outdated comments in test
2019-11-07 14:06:33 +01:00
Nikita Popov ee243bc471 Remove outdated comments in test 2019-11-07 14:06:23 +01:00
Nikita Popov 0027ad4801 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #78759
2019-11-07 11:17:38 +01:00
Nikita Popov aed4f6e849 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #78759
2019-11-07 11:17:14 +01:00
Nikita Popov 8d2a9d8859 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #78759
2019-11-07 11:16:24 +01:00
Nikita Popov 5fa6dcd972 Fixed bug #78759
Handle INDIRECT values in array.
2019-11-07 11:15:29 +01:00
Nikita Popov b312598daf Move extra checks after zpp in get_browser() 2019-11-06 17:50:48 +01:00
Nikita Popov 34ea5b0585 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove bogus skipifs in get_browser tests
2019-11-06 17:50:20 +01:00
Nikita Popov f494a36618 Remove bogus skipifs in get_browser tests
We provide this file, it should be readable.

These checks no longer work, since --INI-- values are no longer
passed to --SKIPIF--.
2019-11-06 17:48:52 +01:00
Máté Kocsis 14bdb0cfc7 Fix consistency issues with array accesses warnings/exceptions
* Change a number of "resource used as offset" notices to warnings,
   which were previously missed.
 * Throw the "resource used as offset" warning for isset() as well.
 * Make array_key_exists() behavior with regard to different key
   types consistent with isset() and normal array accesses. All key
   types now use the usual coercions and array/object keys throw
   TypeError.

Closes GH-4887.
2019-11-06 12:56:47 +01:00
Nikita Popov c849438bd0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #78775
2019-11-05 12:16:17 +01:00
Nikita Popov 3e41ade638 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #78775
2019-11-05 12:16:09 +01:00
Nikita Popov 747cb46244 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #78775
2019-11-05 12:15:44 +01:00
Nikita Popov 4f984a2fdb Fixed bug #78775
Clear the OpenSSL error queue before performing SSL stream operations.
As we don't control all code that could possibly be using OpenSSL,
we can't rely on the error queue being empty.
2019-11-05 12:13:46 +01:00
Christoph M. Becker 85874af404 Remove obsolete oniguruma.patch
The proper `SIZEOF_SIZE_T` definitions are available as of Oniguruma
6.9.1; no more need to patch.
2019-11-05 10:16:22 +01:00
Nikita Popov 56cee36374 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove dead code `ext/mysqlnd/mysqlnd_net.c`.
2019-11-04 21:36:36 +01:00
Adam Saponara 6c9821a531 Remove dead code ext/mysqlnd/mysqlnd_net.c.
I believe this code has been dead since 05c5e05 (2015) now replaced
by `ext/mysqlnd/mysqlnd_vio.c`.

Closes GH-4888.
2019-11-04 21:36:13 +01:00
Máté Kocsis 6d0366ad08 Add stubs for IntlTimeZone 2019-11-04 14:10:01 +01:00
Fabien Villepinte 42692d45f5 Merge branch 'PHP-7.4' 2019-11-04 13:56:18 +01:00
Fabien Villepinte 6545f656be Add a test for ReflectionClass:getInterfaceNames()
The method was not tested against a class without interface.
2019-11-04 13:51:40 +01:00
Nikita Popov c46b2ed677 Remove support for array_key_exists() with objects 2019-11-04 13:10:03 +01:00
Christoph M. Becker 31f1254182 Merge branch 'PHP-7.4'
* PHP-7.4:
  Make test more robust
2019-11-04 12:23:00 +01:00
Christoph M. Becker 00c9c480eb Make test more robust
Time flies, so obviously the reported uptime may differ a bit (as
already occasionally noticed on CI); we cater to that by allowing a
delay of up to one second.
2019-11-04 12:22:04 +01:00
Nikita Popov 5b447d4b42 Remove dead code related to inherits props in reflection
Public/protected properties defined in parent classes will be
inherited in the child -- there is no need to explicitly try to
walk up the chain and look them up.
2019-11-04 11:24:32 +01:00
Nikita Popov 0e3045ae69 Store pointer to property_info in reflection
Instead of constructing a dummy property_info for dynamic properties,
leave the field as NULL and handle this as appropriate.

This was originally part of an alternative fix for bug #78774, but
I think doing it this way is generally preferrable independently
of that.
2019-11-04 11:08:19 +01:00