Commit Graph

498 Commits

Author SHA1 Message Date
Máté Kocsis
27e83d0fb8
Add union return types for function stubs 2019-11-11 14:54:55 +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
9493893412 Cleanup return values when parameter parsing is unsuccessful 2019-10-30 16:05:20 +01:00
Christoph M. Becker
b00cc3378c Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78694: Appending to a variant array causes segfault
2019-10-19 11:52:38 +02:00
Christoph M. Becker
ee6a71ca73 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78694: Appending to a variant array causes segfault
2019-10-19 11:51:05 +02:00
Christoph M. Becker
ce035dc4a0 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78694: Appending to a variant array causes segfault
2019-10-19 11:49:18 +02:00
Christoph M. Becker
45a7723267 Fix #78694: Appending to a variant array causes segfault
`write_dimension` object handlers have to be able to handle `NULL`
`offset`s; for now we simply throw an exception instead of following
the `NULL` pointer.
2019-10-19 11:47:00 +02:00
Christoph M. Becker
73e9acbaff Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78650: new COM Crash
2019-10-09 14:17:25 +02:00
Christoph M. Becker
4625fa181f Fix #78650: new COM Crash
As of PHP 7.4.0, the `get_property_ptr_ptr` handler is mandatory; we
implement it to always return `NULL`, which is equivalent to not
setting the handler in former versions.

We add a portable and faster test case than what has been presented in
the bug ticket.
2019-10-09 14:09:02 +02:00
Christoph M. Becker
121bb732f9 Fix com_dotnet build 2019-10-07 19:39:38 +02: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
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
3012d006ff Don't set nullability flag for parameters without type
Use value 0 instead. To compensate we check in ReflectionParameter
allowsNull() whether the type is set at all: If it isn't, it always
allows null.

This removes a discrepancy between internal&userland functions:
For userland functions allowsNull() on untyped parameters returned
true, but for internal functions it returned false.
2019-09-23 16:39:52 +02:00
Nikita Popov
9e8ba7891e Change representation of zend_type from type code to MAY_BE_* mask
This switches zend_type from storing a single IS_* type code to
storing a MAY_BE_* type mask. Right now most code still assumes
that there is only a single type in the mask (or two together
with MAY_BE_NULL). But this will make it a lot simpler to introduce
union types.

An additional advantage (and why I'm doing this separately), is
that a number of special cases no longer need to be handled
separately: We can do a single mask & (1 << type) check to handle
all simple types, booleans (true|false) and null.
2019-09-23 15:31:35 +02:00
Christoph M. Becker
193dcec529 Don't explicitly set return value on ZPP failure
Failing ZPP throws as of PHP 8.0.0, so explicitly setting a return
value is useless, and also slightly confusing.
2019-08-12 10:02:45 +02:00
Christoph M. Becker
3e80b13682 Don't throw manual exceptions on ZPP failure
As of PHP 8.0.0, ZPP throws on failure, so manually throwing exceptions
is superfluous and confusing.
2019-08-11 22:21:08 +02:00
Christoph M. Becker
177981d80d Add com_dotnet function stubs 2019-08-11 21:46:14 +02:00
Nikita Popov
a1e2c8870e Merge branch 'PHP-7.4' 2019-07-22 17:26:01 +02:00
Nikita Popov
d59aac58b3 Report errors from stream read and write operations
The php_stream_read() and php_stream_write() functions now return
an ssize_t value, with negative results indicating failure. Functions
like fread() and fwrite() will return false in that case.

As a special case, EWOULDBLOCK and EAGAIN on non-blocking streams
should not be regarded as error conditions, and be reported as
successful zero-length reads/writes instead. The handling of EINTR
remains unclear and is internally inconsistent (e.g. some code-paths
will automatically retry on EINTR, while some won't).

I'm landing this now to make sure the stream wrapper ops API changes
make it into 7.4 -- however, if the user-facing changes turn out to
be problematic we have the option of clamping negative returns to
zero in php_stream_read() and php_stream_write() to restore the
old behavior in a relatively non-intrusive manner.
2019-07-22 17:17:28 +02:00
Christoph M. Becker
8e22d7c785 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix TsHashTable related race conditions
2019-07-08 10:32:39 +02:00
Christoph M. Becker
98b6330ab4 Fix TsHashTable related race conditions
Although TsHashTable and the according API are supposed to easily make
a HashTable thread-safe, they do not; for instance, there can be race
conditions between finding and updating entries.  We therefore avoid
the usage of TsHashTable in favor of a HashTable with our own mutex
management.

The patch has been provided by krakjoe@php.net; I only did some minor
fixes and tweaks.
2019-07-08 10:31:36 +02:00
Christoph M. Becker
2c49354ac2 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix memory leak in COM ctor
2019-06-29 14:51:40 +02:00
Christoph M. Becker
8357a696ab Fix memory leak in COM ctor
We have to free strings returned from php_com_olestring_to_string().
2019-06-29 14:51:13 +02:00
Nikita Popov
45a0656e95 Remove get() object handler
Now that set() is gone, there is little point in keeping get(), as
it is essentially just a different way of writing cast_object()
now.

Closes GH-4202.
2019-05-29 17:15:19 +02:00
Nikita Popov
31a516cf96 Remove set() object handler 2019-05-29 10:00:06 +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
60b724cbda Merge branch 'PHP-7.4' 2019-04-15 14:34:32 +02:00
Nikita Popov
0c8a2d8d2a Fix saproxy_property_write signature 2019-04-15 14:33:47 +02:00
Christoph M. Becker
ef25de3e4e Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #77578: Crash when php unload
2019-03-18 19:27:38 +01:00
Christoph M. Becker
fb51f2c7ba Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #77578: Crash when php unload
2019-03-18 19:26:08 +01:00
Christoph M. Becker
a529826d95 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77578: Crash when php unload
2019-03-18 19:24:56 +01:00
Christoph M. Becker
41bc51ce2d Fix #77578: Crash when php unload
Since we're putting `ITypeLib *`s into the hash, we're getting
`ITypeLib *`s back, not `ITypeLib **`s.
2019-03-18 19:21:38 +01:00
Peter Kokot
6426420f61 Merge branch 'PHP-7.4'
* PHP-7.4:
  Replace dirname(__FILE__) by __DIR__ in tests
2019-03-15 23:36:47 +01:00
Fabien Villepinte
26dfce7f36 Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
Joe Watkins
99230784f5
Merge branch 'PHP-7.4'
* PHP-7.4:
  zend_weakrefs
2019-03-12 00:37:28 +01:00
Joe Watkins
6529d7acd9
zend_weakrefs 2019-03-12 00:35:35 +01:00
Nikita Popov
bbdc5d1da6 Merge branch 'PHP-7.4' 2019-03-11 10:01:16 +01:00
c9s
9f6f6fe219 Remove function_table var from the caller
function_table var is not used in call_user_function macro anymore
hence replace the usage with NULL
2019-03-11 10:00:39 +01: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
Christoph M. Becker
60eee27757 Merge branch 'PHP-7.4'
* PHP-7.4:
  Avoid potentially superfluous string reallocation
2019-02-22 10:35:46 +01:00
Christoph M. Becker
427ebce629 Avoid potentially superfluous string reallocation
If we're not going to register the constant, it makes no sense to
allocate a `zend_string` and free it shortly after.
2019-02-22 10:35:19 +01:00
Christoph M. Becker
f04cf7a587 Remove ability to import case-insensitive constants from typelibs
According to commit 23a5be3[1], we remove the ability to import case-
insensitive constants, but do not remove the now superfluous parameter
and ini setting.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=23a5be3696f4d92e1b18fd59f3ac63c6a15ea12a>
2019-02-19 16:54:52 +01:00
Christoph M. Becker
93886f44a8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #77626: Persistence confusion in php_com_import_typelib()
2019-02-15 18:57:59 +01:00
Christoph M. Becker
f1588d841c Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #77626: Persistence confusion in php_com_import_typelib()
2019-02-15 18:57:17 +01:00
Christoph M. Becker
767fa3dc02 Fix #77626: Persistence confusion in php_com_import_typelib()
We apply only the most minimal fix here, and will cater to the
unnecessary re-allocation for PHP-7.4.

We don't need to add a regression test, since bug39606.phpt and
bug77621.phpt already show the misbehavior.
2019-02-15 18:56:24 +01:00
Christoph M. Becker
5740336dea Merge branch 'PHP-7.4'
* PHP-7.4:
  Deprecate marking typelibs to load constants case-insensitively
2019-02-15 16:25:15 +01:00
Christoph M. Becker
0520eb8772 Deprecate marking typelibs to load constants case-insensitively
This is an amendment to commit fae2246[1] which missed this opportunity
to still introduce case-insensitive constants without a deprecation
warning.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=fae22461f95dfe8153fb74a53b9c5daeec47387f>
2019-02-15 16:24:54 +01:00
Christoph M. Becker
27d9800b1d Merge branch 'PHP-7.4'
* PHP-7.4:
  Deprecate case-insensitive constants via typelib import
2019-02-15 13:08:31 +01:00
Christoph M. Becker
fae22461f9 Deprecate case-insensitive constants via typelib import
As of PHP 7.3.0, case-insensitive constants are deprecated.  We catch
up on this with regard to ext/com_dotnet, which allows to import
constants from typelibs, by triggering a deprecation notice whenever
`com_load_typelib()` is called with `$case_sensitive` being `false`,
and whenever `com.autoregister_casesensitive` is set to `false`,
regardless of whether there are actually constants in the typelib which
would be imported.
2019-02-15 13:07:56 +01:00
Christoph M. Becker
920438d624 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #77621: Already defined constants are not properly reported
2019-02-15 00:39:40 +01:00
Christoph M. Becker
c62e106610 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #77621: Already defined constants are not properly reported
2019-02-15 00:39:10 +01:00
Christoph M. Becker
8946ad3000 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77621: Already defined constants are not properly reported
2019-02-15 00:37:39 +01:00
Christoph M. Becker
de738496c2 Fix #77621: Already defined constants are not properly reported
We must not check uninitialized values (i.e. `c.value`), and we have to
use proper types for printf-style formats (i.e. `char *` instead of
`zend_string *`).
2019-02-15 00:35:21 +01:00
Dmitry Stogov
f45e0ce928 Remove ZEND_OVERLOADED_FUNCTION and corresponding call_method object handler 2019-02-07 21:05:46 +03:00
Christoph M. Becker
a1608b40bf Fix type confusion 2019-02-04 14:40:35 +01:00
Dmitry Stogov
db00790234 ext/com_dotnet support for new object handlers API 2019-02-04 13:20:25 +03:00
Dmitry Stogov
91ef4124e5 Refactor zend_object_handlers API to pass zend_object* and zend_string* insted of zval(s). 2019-02-04 13:20:25 +03:00
Peter Kokot
623911f993 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove local variables
2019-02-03 21:23:18 +01:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Zeev Suraski
38c337f22e Remove year range from copyright notice 2019-01-30 11:00:23 +02:00
Nikita Popov
6c73b50cf6 Remove static calls to non-static methods 2019-01-30 09:19:02 +01:00
Nikita Popov
e219ec144e Implement typed properties
RFC: https://wiki.php.net/rfc/typed_properties_v2

This is a squash of PR #3734, which is a squash of PR #3313.

Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
Co-authored-by: Joe Watkins <krakjoe@php.net>
Co-authored-by: Dmitry Stogov <dmitry@zend.com>
2019-01-11 15:49:06 +01:00
Christoph M. Becker
7cad44be11 Merge branch 'PHP-7.3'
* PHP-7.3:
  Use zend_empty_array
2018-11-26 15:35:30 +01:00
Christoph M. Becker
07d6dfbfe4 Use zend_empty_array
No need to define our own `com_dotnet_object_properties` as empty hash,
since we can use `zend_empty_array` instead as of PHP 7.3.0.

Cf. <https://github.com/php/php-src/pull/3672#issuecomment-440467704>.
2018-11-26 15:33:58 +01:00
Christoph M. Becker
a4093d0531 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix #77177: Serializing or unserializing COM objects crashes
2018-11-23 16:36:48 +01:00
Christoph M. Becker
b0a86566dc Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77177: Serializing or unserializing COM objects crashes
2018-11-23 16:36:00 +01:00
Christoph M. Becker
115ee49b0b Fix #77177: Serializing or unserializing COM objects crashes
Firstly, we avoid returning NULL from the get_property handler, but
instead return an empty HashTable, which already prevents the crashes.
Secondly, since (de-)serialization obviously makes no sense for COM,
DOTNET and VARIANT objects (at least with the current implementation),
we prohibit it right away.
2018-11-23 16:32:33 +01:00
Nikita Popov
1cfbb21790 Classify object handlers are required/optional 2018-10-16 20:53:59 +02:00
Peter Kokot
d679f02295 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:33:09 +02:00
Peter Kokot
b746e69887 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:32:30 +02:00
Peter Kokot
f1d7e3ca0b Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:31:31 +02:00
Peter Kokot
782352c54a Trim trailing whitespace in *.phpt 2018-10-14 19:45:12 +02:00
Peter Kokot
17ccbeec32 Trim trailing whitespace in *.phpt 2018-10-14 19:44:14 +02:00
Gabriel Caruso
9c144e0d82
Trim trailing whitespace in tests 2018-10-14 12:07:20 -03:00
Peter Kokot
1ad08256f3 Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:56:38 +02:00
Peter Kokot
1c850bfcca Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:55:24 +02:00
Peter Kokot
60a69daec6 Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:54:08 +02:00
Peter Kokot
902d39a3a7 Trim trailing whitespace in source code files 2018-10-13 14:14:50 +02:00
Anatol Belski
321c0cc349 Fix localized error messages and memory leaks
The FormatMessage API needs to LocalFree the delivered error messages.
In cases where messages are delivered in non ASCII compatible encoding,
the messages might be unreadable. This aligns the error message encoding
with the encoding settings in PHP, the focus is UTF-8 as default.

Initialize error buffer

Avoid code duplication
2018-09-17 10:56:50 +02:00
Dmitry Stogov
93f9ee7217 Use zend_class_entry/zend_function type names instead of _zend_class_entry/_zend_function tags. 2018-08-22 14:01:14 +03:00
Anatol Belski
cd07fa48ba Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix callbacks
  bump version
2018-08-02 21:40:50 +02:00
Anatol Belski
e018a1c98a Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix callbacks
  bump version
2018-08-02 21:25:29 +02:00
Anatol Belski
91a0a10f71 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix callbacks
  bump version
2018-08-02 21:20:04 +02:00
Anatol Belski
19592519c2 Fix callbacks
The signatures wasn't synced in 7.0
2018-08-02 18:59:34 +02:00
Anatol Belski
6059ecee3a Sync with ab8094c6 2018-07-26 13:58:08 +02:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Kalle Sommer Nielsen
08f10ef47a Remove some dead code
sapi/*: Remove Windows code from FPM and LiteSpeed, as we don't support these SAPIs on Windows anyway
ext/com_dotnet: Remove non Windows code, as ext/com_dotnet is only supported on Windows
2018-07-23 15:26:39 +02:00
Dmitry Stogov
f2b4ec4bdc Export standard object handlers, to avoid indirect access 2018-05-31 11:57:22 +03:00
Dmitry Stogov
d90c6f2443 Removed useless zval_ptr_dtor() 2018-05-29 17:58:06 +03:00
Dmitry Stogov
5eb1f92f31 Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence. 2018-05-28 16:27:12 +03:00
Anatol Belski
3aa030e7d9 Merge branch 'PHP-7.2'
* PHP-7.2:
  Sync fix for bug #72498 for 32-bit
2018-04-03 17:25:52 +02:00
Anatol Belski
2115878aaa Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Sync fix for bug #72498 for 32-bit
2018-04-03 17:25:13 +02:00
Anatol Belski
821f13fd79 Sync fix for bug #72498 for 32-bit 2018-04-03 17:24:13 +02:00
Gabriel Caruso
701437a948
Remove return types from some magic method in protos
__construct, __destruct, __wakeup does not have return types defined.
2018-03-09 12:04:46 +01:00
Nikita Popov
ede663f381 Convert iterator by reference errors to exceptions
I'm using RuntimeException in SPL, because other SPL classes that
throw this error used it. Error is used for everything else, because
that's what core does.
2018-02-19 21:58:56 +01:00
Gabriel Caruso
7566416d9d
Share identical arginfos 2018-02-19 08:31:03 +01:00
Gabriel Caruso
b0d3c1bf83 Add and fix SKIPIF sections 2018-02-04 17:26:37 +01:00
Gabriel Caruso
84488d921b Remove superfluous SKIPIF sections in more tests 2018-02-04 16:57:08 +01:00
Dmitry Stogov
5d456c1c66 Replaced separation with destructor 2018-01-17 03:01:00 +03:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Nikita Popov
b2b2b437af Add _IS_NUMBER as cast_object() target type
convert_scalar_to_number() will now call cast_object() with an
_IS_NUMBER argument, in which case the cast handler should return
either an integer or floating point number, whichever is more
appropriate.

Previously convert_scalar_to_number() unconditionally converted
objects to integers instead.

Fixes bug #53033.
Fixes bug #54973.
Fixes bug #73108.
2017-12-26 12:39:06 +01:00
Dmitry Stogov
9e709e2fa0 Move constants into read-only data segment 2017-12-14 18:43:44 +03:00
Dmitry Stogov
1db8402208 Move zend_object_iterator_funcs structures into read-only data segment 2017-12-14 14:21:22 +03:00
Dmitry Stogov
6a9d2b2190 Cleanup type conversion 2017-12-07 19:24:55 +03:00
Dmitry Stogov
49ea143bbd Encapsulate reference-counting primitives.
Prohibit direct update of GC_REFCOUNT(), GC_SET_REFCOUNT(), GC_ADDREF() and GC_DELREF() shoukf be instead.
Added mactros to validate reference-counting (disabled for now).
These macros are going to be used to eliminate race-condintions during reference-counting on data shared between threads.
2017-10-27 01:28:58 +03:00
Dmitry Stogov
ef5ea48741 Always use IS_CONSTANT_AST (IS_CONSTANT is removed). 2017-10-10 10:11:05 +03:00
Peter Kokot
978f53afa6 Remove outdated README from ext/com_dotnet
The PHP documentation includes updated and better com_dotnet
information.
2017-10-08 14:41:52 +02:00
Kalle Sommer Nielsen
7d7be194d3 Kill compiler warnings in ext/com_dotnet 2017-08-24 00:52:48 +02:00
Kalle Sommer Nielsen
c34ba92782 Get rid of all these old package[2].xml files, most of these had no had a release since PHP4, or any release at all in close to 10 years, some even did not have a package registered at pecl
OCI, PDO_OCI and zip are left as they are actively developed and released there
2017-08-17 22:09:29 +02:00
Tom Van Looy
04fb3f28ff Remove superfluous semicolons 2017-06-26 00:23:25 +02:00
Dmitry Stogov
141d1ba980 Introduced "zend_type" - an abstraction for type-hinting representation. 2017-01-13 11:37:46 +03:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Anatol Belski
32201fe5ad Merge branch 'PHP-7.1'
* PHP-7.1:
  better way to get ACP
2016-12-12 01:57:31 +01:00
Anatol Belski
d9fc5ea6ec Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  better way to get ACP
2016-12-12 01:56:44 +01:00
Anatol Belski
7a8774ade4 better way to get ACP 2016-12-12 01:54:22 +01:00
Anatol Belski
d0dc6ffda5 Merge branch 'PHP-7.1'
* PHP-7.1:
  adapt patch for 7.1
2016-12-12 01:51:17 +01:00
Anatol Belski
8199e5a7e9 adapt patch for 7.1 2016-12-12 01:50:15 +01:00
Anatol Belski
b68cca260b Merge branch 'PHP-7.1'
* PHP-7.1:
  fix datatype for zpp, yet a followup on bug #73679
2016-12-12 01:29:59 +01:00
Anatol Belski
e53f967ed7 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix datatype for zpp, yet a followup on bug #73679
2016-12-12 01:29:23 +01:00
Anatol Belski
3473b519c0 fix datatype for zpp, yet a followup on bug #73679 2016-12-12 01:26:06 +01:00
Anatol Belski
e1c062112a Merge branch 'PHP-7.1'
* PHP-7.1:
  improve fix for bug #73679 with new capabilities available
2016-12-11 17:27:11 +01:00
Anatol Belski
e6e5f06c78 improve fix for bug #73679 with new capabilities available 2016-12-11 17:25:48 +01:00
Anatol Belski
43be5aeaed Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #73679 DOTNET read access violation using invalid codepage
2016-12-11 17:09:04 +01:00
Anatol Belski
1d80fb2cdb Fixed bug #73679 DOTNET read access violation using invalid codepage 2016-12-11 17:06:55 +01:00
Anatol Belski
4fc394464c Merge branch 'PHP-7.1'
* PHP-7.1:
  fix uninitialized member
2016-12-08 17:18:06 +01:00
Anatol Belski
66ad7918b8 fix uninitialized member 2016-12-08 17:15:06 +01:00
Anatol Belski
b204b3abd1 further normalizations, uint vs uint32_t
fix merge mistake

yet one more replacement run
2016-11-26 17:29:01 +01:00
Anatol Belski
579c8669c8 Fixed bug #73126 Cannot pass parameter 1 by reference 2016-09-22 11:49:35 +02:00
Anatol Belski
51d19c12a5 fix check for args by ref 2016-08-25 18:06:47 +02:00
Anatol Belski
392c5ea472 Fixed bug #72922 COM called from PHP does not return out parameters 2016-08-25 12:12:45 +02:00
Anatol Belski
3e8dbb3e5d Fixed bug #72569 DOTNET/COM array parameters broke in PHP7 2016-07-12 14:58:50 +02:00
Anatol Belski
3455848dfe Fixed bug #72498 variant_date_from_timestamp null dereference 2016-07-01 18:41:50 +02:00
Nikita Popov
1ac152938c Move semicolon into TSRMLS_CACHE_EXTERN/DEFINE
Also re bug #71575.
2016-03-03 16:50:01 +01:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Xinchen Hui
4171a8f6c6 Internal function argumensts cleanup (strict_types) 2015-12-12 22:52:37 -08:00
Dmitry Stogov
ad4fa8f758 Fixed incorrect usage of HASH_OF() macro. Replaced HASH_OF() with more appropriate Z_ARRVAL_P() or Z_OBJPROP_P(). 2015-09-24 22:39:59 +03:00
Anatol Belski
4e66cce87c switch to the unified globals accessor where appropriate 2015-07-29 13:26:35 +02:00
Aaron Piotrowski
ed1b64877d Switch position of ce in exception ce variable names 2015-07-03 09:45:03 -05:00
Aaron Piotrowski
a812a74c2e Change zend_exception_get_default() to zend_exception_ce 2015-07-03 09:44:48 -05:00
Christoph M. Becker
36e2d26adb restricted test to English locale (fails otherwise) 2015-06-26 16:27:45 +02:00
Christoph M. Becker
3bd6bb6f50 fixed broken test (syntax error in SKIPIF section) 2015-06-26 15:57:28 +02:00
Kalle Sommer Nielsen
4b737793bc Add test for bug #69939 2015-06-26 15:35:16 +02:00