Skip to content

Commit 24e0b99

Browse files
committed
Merge remote-tracking branch 'upstream/PHP-5.6' into use-function
* upstream/PHP-5.6: (399 commits) Fixed issue php#115 (path issue when using phar). Fixed issue php#149 (Phar mount points not working with OPcache enabled). Added tests for PHAR/OPCahce incompatibilities Update NEWS Fixed bug #65947 (basename is no more working after fgetcsv in certain situation) Update NEWS Fixed Bug #66043 (Segfault calling bind_param() on mysqli) NEWS entry NEWS entry Fix bug #65946 - pdo_sql_parser.c permanently converts values bound to strings bump API versions Add a couple more test cases to parse_url() tests fix missing change from 'tcp_socket' to the more common 'server' fix many parallel test issues Cleanup temp test file Revert "Fixed issue php#115 (path issue when using phar)." Update LiteSpeed SAPI code to V6.4 Fixed typo in Makefile.frag updated NEWS Remove outdate codes, make it clearer, although just a bit.. Update NEWS ... Conflicts: Zend/zend_compile.h
2 parents 602fef0 + 0e5c507 commit 24e0b99

File tree

698 files changed

+28595
-16866
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

698 files changed

+28595
-16866
lines changed

.travis.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,15 @@ notifications:
88
email: false
99

1010
env:
11-
- REPORT_EXIT_STATUS=1
11+
global:
12+
- MYSQL_TEST_HOST=127.0.0.1
13+
- MYSQL_TEST_USER=travis
14+
- PDO_MYSQL_TEST_DSN="mysql:host=127.0.0.1;dbname=test"
15+
- PDO_MYSQL_TEST_USER=travis
16+
- PDO_MYSQL_TEST_PASS=
17+
- PDO_MYSQL_TEST_HOST=127.0.0.1
18+
matrix:
19+
- REPORT_EXIT_STATUS=1
1220

1321
before_script:
1422
# Compile PHP
@@ -21,4 +29,4 @@ before_script:
2129
- . ./travis/ext/pdo_pgsql/setup.sh
2230

2331
# Run PHPs run-tests.php
24-
script: ./sapi/cli/php run-tests.php -p `pwd`/sapi/cli/php -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --show-diff
32+
script: ./sapi/cli/php run-tests.php -p `pwd`/sapi/cli/php -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --show-diff --set-timeout 120

CODING_STANDARDS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ Naming Conventions
151151

152152
7. Classes should be given descriptive names. Avoid using abbreviations where
153153
possible. Each word in the class name should start with a capital letter,
154-
without underscore delimiters (CampelCaps starting with a capital letter).
154+
without underscore delimiters (CamelCaps starting with a capital letter).
155155
The class name should be prefixed with the name of the 'parent set' (e.g.
156156
the name of the extension)::
157157

NEWS

Lines changed: 54 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,35 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3-
?? ??? 201?, PHP 5.6.0
3+
?? ??? 20??, PHP 5.6.0
44

55
- Core:
66
. Improved IS_VAR operands fetching. (Laruence, Dmitry)
77
. Implemented internal operator overloading
88
(RFC: https://wiki.php.net/rfc/operator_overloading_gmp). (Nikita)
9+
. Made calls from incompatible context issue an E_DEPRECATED warning instead
10+
of E_STRICT (phase 1 of RFC: https://wiki.php.net/rfc/incompat_ctx).
11+
(Gustavo)
12+
. Uploads equal or greater than 2GB in size are now accepted.
13+
(Ralf Lang, Mike)
14+
. Reduced POST data memory usage by 200-300%. Removed INI setting
15+
always_populate_raw_post_data and the $HTTP_RAW_POST_DATA global
16+
variable. (Mike)
17+
. Implemented dedicated syntax for variadic functions
18+
(RFC: https://wiki.php.net/rfc/variadics). (Nikita)
19+
. Fixed bug #50333 Improving multi-threaded scalability by using
20+
emalloc/efree/estrdup (Anatol, Dmitry)
921

10-
- Session:
11-
. Fixed Bug #65315 (session.hash_function silently fallback to default md5)
12-
(Yasuo)
13-
. Implemented Request #54649 (Create session_serializer_name()). (Yasuo)
14-
. Implemented Request #17860 (Session write short circuit). (Yasuo)
15-
. Implemented Request #20421 (session_abort() and session_reset() function).
16-
(Yasuo)
17-
. Implemented Request #11100 (session_gc() function). (Yasuo)
22+
- cURL:
23+
. Implemented FR #65646 (re-enable CURLOPT_FOLLOWLOCATION with open_basedir
24+
or safe_mode). (Adam)
25+
26+
- GMP:
27+
. Moved GMP to use object as the underlying structure and implemented various
28+
improvements based on this.
29+
(RFC: https://wiki.php.net/rfc/operator_overloading_gmp). (Nikita)
30+
31+
- Hash:
32+
. Added gost-crypto (CryptoPro S-box) GOST hash algo. (Manuel Mausz)
1833

1934
- mysqlnd:
2035
. Disabled flag for SP OUT variables for 5.5+ servers as they are not natively
@@ -27,14 +42,40 @@ PHP NEWS
2742
cache_slots) in op_array->literals table. (Laruence, Dmitry)
2843
. Added script level constant replacement optimization pass. (Dmitry)
2944

45+
- Openssl:
46+
. Added crypto_method option for the ssl stream context. (Martin Jansen)
47+
. Added certificate fingerprint support. (Tjerk Meesters)
48+
. Added explicit TLSv1.1 and TLSv1.2 stream transports. (Daniel Lowrey)
49+
. Fixed bug #65729 (CN_match gives false positive). (Tjerk Meesters)
50+
3051
- PDO_pgsql:
3152
. Fixed Bug #42614 (PDO_pgsql: add pg_get_notify support). (Matteo)
3253
. Fixed Bug #63657 (pgsqlCopyFromFile, pgsqlCopyToArray use Postgres < 7.3
3354
syntax). (Matteo)
3455

35-
- GMP:
36-
. Moved GMP to use object as the underlying structure and implemented various
37-
improvements based on this.
38-
(RFC: https://wiki.php.net/rfc/operator_overloading_gmp). (Nikita)
56+
- Session:
57+
. Fixed Bug #65315 (session.hash_function silently fallback to default md5)
58+
(Yasuo)
59+
. Implemented Request #54649 (Create session_serializer_name()). (Yasuo)
60+
. Implemented Request #17860 (Session write short circuit). (Yasuo)
61+
. Implemented Request #20421 (session_abort() and session_reset() function).
62+
(Yasuo)
63+
. Implemented Request #11100 (session_gc() function). (Yasuo)
64+
65+
- Standard:
66+
. Implemented FR #65634 (HTTP wrapper is very slow with protocol_version
67+
1.1). (Adam)
68+
. Implemented Change crypt() behavior w/o salt RFC. (Yasuo)
69+
https://wiki.php.net/rfc/crypt_function_salt
70+
71+
- XMLReader:
72+
. Fixed bug #55285 (XMLReader::getAttribute/No/Ns methods inconsistency).
73+
(Mike)
74+
75+
- Zip:
76+
. update libzip to version 1.11.1.
77+
PHP don't use any ilibzip private symbol anymore. (Pierre, Remi)
78+
. new method ZipArchive::setPassword($password). (Pierre)
79+
. add --with-libzip option to build with system libzip. (Remi)
3980

4081
<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>

README.EXT_SKEL

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ HOW TO USE IT
3131

3232
./buildconf; ./configure --enable-module_name; make
3333

34+
The definition of PHP_MODULE_NAME_VERSION will be present in the
35+
php_module_name.h and injected into the zend_module_entry definition. This
36+
is required by the PECL website for the version string conformity checks
37+
against package.xml
38+
3439
But if you already have planned the overall scheme of your module, what
3540
functions it will contain, their return types and the arguments they take
3641
(a very good idea) and don't want to bother yourself with creating function

README.SELF-CONTAINED-EXTENSIONS

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,18 @@ ADDING SHARED MODULE SUPPORT TO A MODULE
153153
#ifdef COMPILE_DL_FOO
154154
ZEND_GET_MODULE(foo)
155155
#endif
156+
157+
PECL SITE CONFORMITY
158+
159+
If you plan to release an extension to the PECL website, there are several
160+
points to be regarded.
161+
162+
1. Add LICENSE or COPYING to the package.xml
163+
164+
2. The following should be defined in one of the extension header files
165+
166+
#define PHP_FOO_VERSION "1.2.3"
167+
168+
This macros has to be used within your foo_module_entry to indicate the
169+
extension version.
170+

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ See https://wiki.php.net/rfc and https://wiki.php.net/rfc/voting for more
1717
information on the process.
1818

1919
Bug fixes **do not** require an RFC, but require a bugtracker ticket. Always
20-
open a ticket at http://bugs.php.net and reference the bug id using #NNNNNN.
20+
open a ticket at https://bugs.php.net and reference the bug id using #NNNNNN.
2121

2222
Fix #55371: get_magic_quotes_gpc() throws deprecation warning
2323

@@ -28,3 +28,12 @@ open a ticket at http://bugs.php.net and reference the bug id using #NNNNNN.
2828

2929
We do not merge pull requests directly on github. All PRs will be
3030
pulled and pushed through http://git.php.net.
31+
32+
33+
Guidelines for contributors
34+
===========================
35+
- [CODING_STANDARDS](/CODING_STANDARDS)
36+
- [README.GIT-RULES](/README.GIT-RULES)
37+
- [README.MAILINGLIST_RULES](/README.MAILINGLIST_RULES)
38+
- [README.RELEASE_PROCESS](/README.RELEASE_PROCESS)
39+

TSRM/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## process this file with automake to produce Makefile.am
22
AUTOMAKE_OPTIONS=foreign
33
noinst_LTLIBRARIES=libtsrm.la
4-
libtsrm_la_SOURCES = TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c
4+
libtsrm_la_SOURCES = TSRM.c tsrm_strtok_r.c
55

66
depend:

TSRM/TSRM.dsp

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

TSRM/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// vim:ft=javascript
22
// $Id$
33

4-
ADD_SOURCES("TSRM", "TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c tsrm_win32.c");
4+
ADD_SOURCES("TSRM", "TSRM.c tsrm_strtok_r.c tsrm_win32.c");
55

TSRM/tsrm_win32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#ifdef TSRM_WIN32
3333
#include <Sddl.h>
3434
#include "tsrm_win32.h"
35-
#include "tsrm_virtual_cwd.h"
35+
#include "zend_virtual_cwd.h"
3636

3737
#ifdef ZTS
3838
static ts_rsrc_id win32_globals_id;

UPGRADING

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,32 @@ PHP X.Y UPGRADE NOTES
2020
1. Backward Incompatible Changes
2121
========================================
2222

23+
- Core:
24+
Removed $HTTP_RAW_POST_DATA global variable. Restore backwards compatibility
25+
by:
26+
<?php
27+
global $HTTP_RAW_POST_DATA;
28+
if (!isset($HTTP_RAW_POST_DATA)) {
29+
$HTTP_RAW_POST_DATA = file_get_contents("php://input");
30+
}
31+
?>
2332

2433
========================================
2534
2. New Features
2635
========================================
2736

37+
- Added dedicated syntax for variadic functions.
38+
(https://wiki.php.net/rfc/variadics)
39+
40+
- The php://input stream is now re-usable and can be used concurrently with
41+
enable_post_data_reading=0.
42+
43+
- Added gost-crypto (CryptoPro S-box) hash algo.
44+
45+
- Added openssl certificate fingerprint support (inclusive stream context
46+
option).
47+
48+
- Added openssl crypto method stream context option.
2849

2950
========================================
3051
2. Changes in SAPI modules
@@ -35,6 +56,9 @@ PHP X.Y UPGRADE NOTES
3556
3. Deprecated Functionality
3657
========================================
3758

59+
- Incompatible context calls:
60+
Instance calls from an incompatible context are now deprecated and issue
61+
E_DEPRECATED instead of E_STRICT. See https://wiki.php.net/rfc/incompat_ctx
3862

3963
========================================
4064
4. Changed Functions
@@ -44,10 +68,26 @@ PHP X.Y UPGRADE NOTES
4468
CURLOPT_SAFE_UPLOAD is now turned on by default and uploads with @file
4569
do not work unless it is explicitly set to false.
4670

71+
- Crypt:
72+
crypt() will now raise an E_NOTICE error if the salt parameter is omitted.
73+
See: https://wiki.php.net/rfc/crypt_function_salt
74+
75+
- XMLReader:
76+
XMLReader::getAttributeNs and XMLReader::getAttributeNo now return NULL if
77+
the attribute could not be found, just like XMLReader::getAttribute.
78+
4779
========================================
4880
5. New Functions
4981
========================================
5082

83+
- Openssl:
84+
Added string openssl_x509_fingerprint($x509, $type, $binary).
85+
86+
- LDAP:
87+
Added ldap_escape($value, $ignore = "", $flags = 0).
88+
89+
- Zip:
90+
Added ZipArchive::setPassword($password)
5191

5292
========================================
5393
6. New Classes and Interfaces
@@ -83,15 +123,27 @@ PHP X.Y UPGRADE NOTES
83123
9. New Global Constants
84124
========================================
85125

126+
- LDAP:
127+
LDAP_ESCAPE_FILTER int(1)
128+
LDAP_ESCAPE_DN int(2)
86129

87130
========================================
88131
10. Changes to INI File Handling
89132
========================================
90133

134+
- Core:
135+
Removed always_populate_raw_post_data.
91136

92137
========================================
93138
11. Other Changes
94139
========================================
95140

96141
- File upload:
97142
Uploads equal or greater than 2GB in size are now accepted.
143+
144+
- HTTP stream wrapper:
145+
HTTP 1.1 requests now include a Connection: close header unless explicitly
146+
overridden by setting a Connection header via the header context option.
147+
148+
- Zip:
149+
New --with-libzip option allow to use system libzip. Version > 0.11 required.

UPGRADING.INTERNALS

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ UPGRADE NOTES - PHP X.Y
44

55
1. Internal API changes
66
a. Addition of do_operation and compare object handlers
7+
b. return_value_ptr now always available, RETVAL_ZVAL_FAST macros
8+
c. POST data handling
9+
d. Arginfo changes
710

811
2. Build system changes
912
a. Unix build system changes
@@ -43,6 +46,70 @@ UPGRADE NOTES - PHP X.Y
4346

4447
Further docs in the RFC: https://wiki.php.net/rfc/operator_overloading_gmp
4548

49+
b. return_value_ptr now always available, RETVAL_ZVAL_FAST macros
50+
51+
The return_value_ptr argument to internal functions is now always set.
52+
Previously it was only available for functions returning by-reference.
53+
return_value_ptr can now be used to return zvals without copying them.
54+
For this purpose two new macros are provided:
55+
56+
RETVAL_ZVAL_FAST(zv); /* analog to RETVAL_ZVAL(zv, 1, 0) */
57+
RETURN_ZVAL_FAST(zv); /* analog to RETURN_ZVAL(zv, 1, 0) */
58+
59+
The macros behave similarly to the non-FAST variants with copy=1 and
60+
dtor=0, but will try to return the zval without making a copy by utilizing
61+
return_value_ptr.
62+
63+
c. POST data handling
64+
65+
The sapi_request_info's members post_data, post_data_len and raw_post_data as
66+
well as raw_post_data_len have been replaced with a temp PHP stream
67+
request_body.
68+
69+
The recommended way to access raw POST data is to open and use a php://input
70+
stream wrapper. It is safe to be used concurrently and more than once.
71+
72+
d. Arginfo changes
73+
74+
The pass_rest_by_reference argument of the ZEND_BEGIN_ARG_INFO and
75+
ZEND_BEGIN_ARG_INFO_EX() is no longer used. The value passed to it is ignored.
76+
77+
Instead a variadic argument is created using ZEND_ARG_VARIADIC_INFO():
78+
79+
ZEND_ARG_VARIADIC_INFO(0, name) /* pass rest by value */
80+
ZEND_ARG_VARIADIC_INFO(1, name) /* pass rest by reference */
81+
ZEND_ARG_VARIADIC_INFO(ZEND_SEND_PREFER_REF, name)
82+
/* pass rest by prefer-ref */
83+
84+
ZEND_ARG_VARIADIC_INFO() should only be used for the last argument.
85+
86+
The following changes were applied to the zend_arg_info struct:
87+
88+
typedef struct _zend_arg_info {
89+
const char *class_name;
90+
zend_uint class_name_len;
91+
zend_uchar type_hint;
92+
+ zend_uchar pass_by_reference;
93+
zend_bool allow_null;
94+
- zend_bool pass_by_reference;
95+
+ zend_bool is_variadic;
96+
} zend_arg_info;
97+
98+
The following changes were applied to the zend_internal_function_info struct:
99+
100+
typedef struct _zend_internal_function_info {
101+
zend_uint required_num_args;
102+
zend_uchar _type_hint;
103+
zend_bool return_reference;
104+
- zend_bool pass_rest_by_reference;
105+
+ zend_bool _allow_null;
106+
+ zend_bool _is_variadic;
107+
} zend_internal_function_info;
108+
109+
The CHECK_ARG_SEND_TYPE(), ARG_MUST_BE_SENT_BY_REF(),
110+
ARG_SHOULD_BE_SENT_BY_REF() and ARG_MAY_BE_SENT_BY_REF() macros now assume
111+
that the argument passed to them is a zend_function* and that it is non-NULL.
112+
46113
========================
47114
2. Build system changes
48115
========================

Zend/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ libZend_la_SOURCES=\
1818
zend_default_classes.c \
1919
zend_iterators.c zend_interfaces.c zend_exceptions.c \
2020
zend_strtod.c zend_closures.c zend_float.c zend_string.c zend_signal.c \
21-
zend_generators.c
21+
zend_generators.c zend_virtual_cwd.c
2222

2323
libZend_la_LDFLAGS =
2424
libZend_la_LIBADD = @ZEND_EXTRA_LIBS@

0 commit comments

Comments
 (0)