Commit Graph

109073 Commits

Author SHA1 Message Date
Nikita Popov
1e14b7a369 Write to correct smart_str
Mixed this up during the migration to ZEND_HASH_FOREACH.
2018-10-03 11:03:55 +02:00
Nikita Popov
a659d16adf Merge branch 'PHP-7.3' 2018-10-03 10:50:38 +02:00
Nikita Popov
9f3ea20320 Merge branch 'PHP-7.2' into PHP-7.3 2018-10-03 10:50:27 +02:00
Nikita Popov
54aa76167b Merge branch 'PHP-7.1' into PHP-7.2 2018-10-03 10:50:16 +02:00
Nikita Popov
945f315506 Reflection: Copy invoke function also in the variadic case
It doesn't matter how the parameters are provided, we always have
to copy the trampoline invoke function.
2018-10-03 10:48:42 +02:00
Nikita Popov
ac96a57818 Remove uses of apply_with_arguments API in reflection
Instead of ZEND_HASH_FOREACH. As a side-effect, this fixes a latent
bug in _addmethod, where a zval was interpreted as a zval*.

Also apply some optimizations to getProperties() while at it: For
declared properties, use the HT key instead of unmangling the
property name. For dynamic properties check INDIRECT instead of
looking up prop info to determine if the property is dynamic.
2018-10-03 10:37:42 +02:00
Kalle Sommer Nielsen
596fbf7393 Fix compiler warnings in ext/hash 2018-10-03 08:48:27 +02:00
Kalle Sommer Nielsen
f73c0102d6 Update hash tests for consistency in their titles and remove the skipif sections (except for the mhash related tests) 2018-10-03 08:48:11 +02:00
Kalle Sommer Nielsen
bf34442581 Implemented RFC "Always available hash extension" 2018-10-03 08:47:07 +02:00
Anatol Belski
3e2549d74f Merge branch 'PHP-7.3'
* PHP-7.3:
  Fixed bug #76947 file_put_contents() blocks the directory of the file (__DIR__)
2018-10-03 00:22:34 +02:00
Anatol Belski
8209a8821c Fixed bug #76947 file_put_contents() blocks the directory of the file (__DIR__)
The condition was wrong. The target buffer size only matters, when some
output is going to be copied into it.
2018-10-03 00:15:43 +02:00
Nikita Popov
10b1ab9275 Some reflection cleanups
Use zend_string and zend_string_tolower in more places, clean up
__invoke handling slightly.
2018-10-02 23:14:13 +02:00
Nikita Popov
784579d99a Merge branch 'PHP-7.3' 2018-10-02 18:20:30 +02:00
Nikita Popov
a42801abe3 Merge branch 'PHP-7.2' into PHP-7.3 2018-10-02 18:20:25 +02:00
Nikita Popov
f0647edd88 Fixed bug #66430 2018-10-02 18:19:53 +02:00
Nikita Popov
c8188fdd3b Merge branch 'PHP-7.3' 2018-10-02 17:49:08 +02:00
Nikita Popov
b8392803f9 Merge branch 'PHP-7.2' into PHP-7.3 2018-10-02 17:48:56 +02:00
Nikita Popov
d2477b284b Fixed bug #76936 2018-10-02 17:47:07 +02:00
Nikita Popov
aec6421409 Merge branch 'PHP-7.3' 2018-10-02 16:14:36 +02:00
Nikita Popov
26f82a7706 Fixed bug #76958 2018-10-02 16:13:51 +02:00
Nikita Popov
9cfd8f43c2 Don't fall back to vtbl_pass if no matching vtbl found
If we don't know how to convert between two encodings, make sure
we error instead of ignoring the issue.

Explicitly use vtbl_pass if we are round-tripping wchar->wchar or
8bit->8bit. Fingers crossed that nothing else relies on the
vtbl_pass fallback...
2018-10-02 16:07:22 +02:00
Dmitry Stogov
9bfb972413 typo 2018-10-02 15:38:55 +03:00
Dmitry Stogov
f521586814 Make ZEND_ACC_IMMUTABLE and ZEND_ACC_HAS_TYPE_HINTS to be common (for functions and classes) 2018-10-02 09:51:06 +03:00
Dmitry Stogov
2606566269 Rename ZEND_ACC_NO_RT_ARENA into ZEND_ACC_HEAP_RT_CACHE and use it for pseudo-main op_arrays. 2018-10-02 09:10:04 +03:00
Dmitry Stogov
a2e8334613 Allocate only necessary space for static properties of internal classes in ZTS mode. 2018-10-01 19:05:31 +03:00
Dmitry Stogov
250b577258 Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src:
  Bump phpdbg version to PHP_VERSION
2018-10-01 14:11:31 +03:00
Dmitry Stogov
34a491d1ed Turn accel_activate into module callback. 2018-10-01 14:10:54 +03:00
Peter Kokot
a3760badbe Bump phpdbg version to PHP_VERSION
The phpdbg sapi module is distributed with the release cycle of PHP.
This patch simplifes phpdbg versioning and bumps it to the PHP_VERSION.
2018-10-01 13:01:58 +02:00
Dmitry Stogov
c25e7439ae Get rid of accel_deactivate() calback 2018-10-01 13:53:15 +03:00
Dmitry Stogov
2d87b51ae9 Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src: (29 commits)
  Fix the deplister rule to not ignore the .c file (Anatol)
  Update .gitignore to include the Windows deplister program (win32/build/deplister.c)
  Bug > Feature Request
  NEWS and UPGRADING
  Fixed bug #75479
  Fix test
  Fix some tests and improve coverage for Windows in SPL
  Use already set variable
  Fix reflection arguments for sodium_memzero function
  Deprecate unbinding of $this of non-static methods
  Generalize compile_typename
  Fixed bug #76737
  Fixed bug #72635
  Remove and refactor ext/spl/examples
  Remove outdated soap examples
  Remove unused ext/bz2/php_bz2.def
  Remove redundant ce from reflection property_reference
  Only store zend_type inside reflection type_reference
  Fixed bug #76946
  Bump versions for 7.1.24-dev
  ...
2018-10-01 11:19:36 +03:00
Kalle Sommer Nielsen
4fc5833b3e Fix the deplister rule to not ignore the .c file (Anatol) 2018-10-01 08:31:49 +02:00
Kalle Sommer Nielsen
a698dcd24a Update .gitignore to include the Windows deplister program (win32/build/deplister.c) 2018-10-01 07:54:52 +02:00
Kalle Sommer Nielsen
e23a9d6a5c Bug > Feature Request 2018-10-01 07:52:22 +02:00
Remi Collet
3d5fe90e7e NEWS and UPGRADING 2018-10-01 07:24:04 +02:00
Remi Collet
959e640e6d Fixed bug #76908 PDO_OCI getColumnMeta() not implemented
* Letargie-feature-getcolumnmeta:
  Removing last unused
  Last few changes : 	. force the nls_date_format 	. add the scale to the return of the function 	. add tests on some function return 	. removing unused variables
  cs
  Changes : . Add the distinction between NUMBER and FLOAT types . Changing BFLOAT text to be BINARY_FLOAT . Changing BDOUBLE text to be BINARY_DOUBLE . Add the data types names for NCHAR, NVARCHAR and NCLOB . Few changes in the tests
  fixing comments
  Update oci_statement.c
  Add the PDOStatement::getColumnMeta() function to the pdo_oci driver
2018-10-01 07:18:20 +02:00
Remi Collet
0ae5f82135 Fixed bug #76908 PDO_OCI getColumnMeta() not implemented
Merge branch 'feature-getcolumnmeta' of https://github.com/Letargie/php-src into Letargie-feature-getcolumnmeta

* 'feature-getcolumnmeta' of https://github.com/Letargie/php-src:
  Removing last unused
  Last few changes : 	. force the nls_date_format 	. add the scale to the return of the function 	. add tests on some function return 	. removing unused variables
  cs
  Changes : . Add the distinction between NUMBER and FLOAT types . Changing BFLOAT text to be BINARY_FLOAT . Changing BDOUBLE text to be BINARY_DOUBLE . Add the data types names for NCHAR, NVARCHAR and NCLOB . Few changes in the tests
  fixing comments
  Update oci_statement.c
  Add the PDOStatement::getColumnMeta() function to the pdo_oci driver
2018-10-01 07:16:48 +02:00
Nikita Popov
eab939e1e3 Merge branch 'PHP-7.3' 2018-09-30 20:08:10 +02:00
Nikita Popov
d7e96c1b95 Merge branch 'PHP-7.2' into PHP-7.3 2018-09-30 20:07:58 +02:00
Nikita Popov
56d1578515 Merge branch 'PHP-7.1' into PHP-7.2 2018-09-30 20:07:44 +02:00
Nikita Popov
db80e0e2ad Fixed bug #75479
Wrap the zend_signal_init() call, so the hook arguments line up.
2018-09-30 20:07:15 +02:00
Nikita Popov
ab2120e4e5 Fix test 2018-09-30 19:56:28 +02:00
Kalle Sommer Nielsen
8595dc8fa9 Fix some tests and improve coverage for Windows in SPL 2018-09-30 10:41:34 +02:00
Gabriel Caruso
257bec33f8
Use already set variable 2018-09-30 02:01:10 -03:00
Nikita Popov
03ba053af0 Merge branch 'PHP-7.3' 2018-09-29 21:20:08 +02:00
Nikita Popov
b617a5b2ea Merge branch 'PHP-7.2' into PHP-7.3 2018-09-29 21:20:01 +02:00
James Titcumb
950c338f80 Fix reflection arguments for sodium_memzero function 2018-09-29 21:19:42 +02:00
Nikita Popov
fc18f44213 Deprecate unbinding of $this of non-static methods
Static calls to non-static methods have been fully deprecated in
PHP 7.0 as part of https://wiki.php.net/rfc/reclassify_e_strict.

A combination of ReflectionMethod::getClosure() ("fake closures")
and Closure::bindTo() etc can be used to achieve the same behavior.
This commit ensures that a deprecation notice will be thrown also
in this case.
2018-09-29 21:01:27 +02:00
Nikita Popov
c4cb3250ca Generalize compile_typename
Return zend_type instead of assigning to arg_info. Also move
nullable handling into the function.
2018-09-29 18:53:48 +02:00
Nikita Popov
96da1fe8a9 Fixed bug #76737
Explicitly prohibit serialization and unserialization of reflection
objects.
2018-09-29 14:47:57 +02:00
Nikita Popov
2ae2e820be Merge branch 'PHP-7.3' 2018-09-29 14:23:13 +02:00