Skip to content

Commit fef18f4

Browse files
committed
Merge branch 'master' into merge-fastcgi
2 parents ba5ecf3 + 8d7003f commit fef18f4

File tree

608 files changed

+5586
-1893
lines changed

Some content is hidden

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

608 files changed

+5586
-1893
lines changed

CONTRIBUTING.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Contributing to PHP
2+
3+
Anybody who programs in PHP can be a contributing member of the community that
4+
develops and deploys it; the task of deploying PHP, documentation and
5+
associated websites is a never ending one. With every release, or release
6+
candidate comes a wave of work, which takes a lot of organization and
7+
co-ordination.
8+
9+
## Pull requests
10+
11+
PHP welcomes pull requests to [add tests](#writing-tests), fix bugs and to
12+
implement RFCs. Please be sure to include tests as appropriate!
13+
14+
If you are fixing a bug, then please submit your PR against the lowest branch
15+
of PHP that the bug affects, or the oldest fully supported version (the first
16+
green branch on
17+
[the supported version page](http://php.net/supported-versions.php). For
18+
example, at the time of writing in mid-2015, this is PHP 5.5, which corresponds
19+
to the `PHP-5.5` branch in Git. Please also make sure you add a link to the PR
20+
in the bug on [the bug tracker](https://bugs.php.net/).
21+
22+
Pull requests to implement RFCs should be submitted against `master`.
23+
24+
## Filing bugs
25+
26+
Bugs can be filed on the [PHP bug tracker](https://bugs.php.net/). If this is
27+
the first time you've filed a bug, we suggest reading the
28+
[guide to reporting a bug](https://bugs.php.net/how-to-report.php).
29+
30+
Where possible, please include a self-contained reproduction case!
31+
32+
## Feature requests
33+
34+
Feature requests are generally submitted in the form of
35+
[Requests for Comment](https://wiki.php.net/rfc/howto), ideally accompanied by
36+
[pull requests](#pull-requests). You can find the extremely large list of RFCs
37+
that have been previously considered on the
38+
[PHP Uncyclo](https://wiki.php.net/rfc).
39+
40+
You may want to read
41+
[The Mysterious PHP RFC Process](https://blogs.oracle.com/opal/entry/the_mysterious_php_rfc_process)
42+
for additional notes on the best way to approach submitting an RFC.
43+
44+
## Writing tests
45+
46+
We love getting new tests! PHP is a huge project and improving code coverage is
47+
a huge win for every PHP user.
48+
49+
[Our QA site includes a page detailing how to write test cases.](http://qa.php.net/write-test.php)
50+
Please note that the section on submitting pull requests is outdated: in
51+
addition to the process listed there, you can also
52+
[submit pull requests](#pull-requests).
53+
54+
## Writing documentation
55+
56+
There are two ways to contribute to the PHP manual. You can edit the manual and
57+
send patches anonymously via [the online editor](https://edit.php.net/), or you
58+
can check the XML source out from Subversion and edit that and build it
59+
[per the instructions on the documentation site](http://doc.php.net/tutorial/).
60+
Patches created that way should be sent to the
61+
[documentation mailing list](mailto:[email protected]).
62+
63+
## Getting help
64+
65+
If you are having trouble contributing to PHP, or just want to talk to a human
66+
about what you're working on, you can contact us via the
67+
[internals mailing list](mailto:[email protected]), or the
68+
[documentation mailing list](mailto:[email protected]) for documentation
69+
issues.
70+
71+
Although not a formal channel, you can also find a number of core developers on
72+
the #php.pecl channel on [EFnet](http://www.efnet.org/). Similarly, many
73+
documentation writers can be found on #php.doc.

INSTALL

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ LoadModule php7_module modules/libphp7.so
464464
Or, if we wanted to allow .php, .php2, .php3, .php4, .php5, .php7,
465465
and .phtml files to be executed as PHP, but nothing else, we'd use
466466
this:
467-
<FilesMatch "\.ph(p[2-6]?|tml)$">
467+
<FilesMatch "\.ph(p[2-7]?|tml)$">
468468
SetHandler application/x-httpd-php
469469
</FilesMatch>
470470
And to allow .phps files to be handled by the php source filter,

NEWS

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
. Refactor MIME type handling to use a hash table instead of linear search.
77
(Adam)
88
. Update the MIME type list from the one shipped by Apache HTTPD. (Adam)
9+
. Added support for SEARCH WebDav method. (Mats Lindh)
910

1011
- Core:
12+
. Fixed bug #68475 (Add support for $callable() sytnax with 'Class::method').
13+
(Julien, Aaron Piotrowski)
1114
. Fixed bug #69485 (Double free on zend_list_dtor). (Laruence)
1215
. Fixed bug #69427 (Segfault on magic method __call of private method in
1316
superclass). (Laruence)
@@ -23,10 +26,6 @@
2326
(Laruence)
2427
. Fixed bug #68933 (Invalid read of size 8 in zend_std_read_property).
2528
(Laruence, arjen at react dot com)
26-
. Fixed bug #68868 (Segfault in clean_non_persistent_constants() in SugarCRM
27-
6.5.20). (Laruence)
28-
. Fixed bug #68104 (Segfault while pre-evaluating a disabled function).
29-
(Laruence)
3029
. Fixed bug #68252 (segfault in Zend/zend_hash.c in function
3130
_zend_hash_del_el). (Laruence)
3231
. Fixed bug #65598 (Closure executed via static autoload incorrectly marked as
@@ -36,24 +35,17 @@
3635
. Fixed bug #69568 (call a private function in closure failed). (Nikita)
3736
. Added PHP_INT_MIN constant. (Andrea)
3837
. Added Closure::call() method. (Andrea)
39-
. Implemented FR #38409 (parse_ini_file() looses the type of booleans). (Tjerk)
4038
. Fixed bug #67959 (Segfault when calling phpversion('spl')). (Florian)
4139
. Implemented the RFC `Catchable "Call to a member function bar() on a
4240
non-object"`. (Timm)
4341
. Added options parameter for unserialize allowing to specify acceptable
4442
classes (https://wiki.php.net/rfc/secure_unserialize). (Stas)
45-
. Fixed bug #68185 ("Inconsistent insteadof definition."- incorrectly
46-
triggered). (Julien)
47-
. Fixed bug #65419 (Inside trait, self::class != __CLASS__). (Julien)
48-
. Fixed bug #65576 (Constructor from trait conflicts with inherited
49-
constructor). (dunglas at gmail dot com)
5043
. Fixed bug #63734 (Garbage collector can free zvals that are still
5144
referenced). (Dmitry)
5245
. Removed ZEND_ACC_FINAL_CLASS, promoting ZEND_ACC_FINAL as final class
5346
modifier. (Guilherme Blanco)
5447
. is_long() & is_integer() is now an alias of is_int(). (Kalle)
5548
. Implemented FR #55467 (phpinfo: PHP Variables with $ and single quotes). (Kalle)
56-
. Fixed bug #55415 (php_info produces invalid anchor names). (Kalle, Johannes)
5749
. Added ?? operator. (Andrea)
5850
. Added <=> operator. (Andrea)
5951
. Added \u{xxxxx} Unicode Codepoint Escape Syntax. (Andrea)
@@ -86,6 +78,8 @@
8678
. Implemented the RFC `Fix "foreach" behavior`. (Dmitry)
8779
. Implemented the RFC `Generator Delegation`. (Bob)
8880
. Implemented the RFC ` Anonymous Class Support`. (Joe, Nikita, Dmitry)
81+
. Fixed bug #69511 (Off-by-one buffer overflow in php_sys_readlink).
82+
(Jan Starke, Anatol)
8983

9084
- Curl:
9185
. Fixed bug #68937 (Segfault in curl_multi_exec). (Laruence)
@@ -102,7 +96,7 @@
10296
. Implemented FR #69089: Added DateTime::RFC3339_EXTENDED to output in
10397
RFC3339 Extended format which includes fraction of seconds (Mariano
10498
Iglesias)
105-
99+
106100
- DBA:
107101
. Fixed bug #62490 (dba_delete returns true on missing item (inifile)). (Mike)
108102
. Fixed bug #68711 (useless comparisons). (bugreports at internot dot info)
@@ -125,7 +119,7 @@
125119
. Implement request #67106 (Split main fpm config). (Elan Ruusamäe, Remi)
126120

127121
- FTP:
128-
. Fixed bug #69082 FTPS support on Windows
122+
. Fixed bug #69082 (FTPS support on Windows). (Anatol)
129123

130124
- Intl:
131125
. Removed deprecated aliases datefmt_set_timezone_id() and
@@ -137,6 +131,9 @@
137131
. Fixed bug #68938 (json_decode() decodes empty string without error).
138132
(jeremy at bat-country dot us)
139133

134+
- LDAP
135+
. Fixed bug #47222 (Implement LDAP_OPT_DIAGNOSTIC_MESSAGE). (Andreas Heigl)
136+
140137
- LiteSpeed:
141138
. Updated LiteSpeed SAPI code from V5.5 to V6.6. (George Wang)
142139

@@ -146,6 +143,8 @@
146143
. Removed mcrypt_ecb(), mcrypt_cbc(), mcrypt_cfb(), mcrypt_ofb(). (Nikita)
147144

148145
- Opcache:
146+
. Fixed bug #69688 (segfault with eval and opcache fast shutdown).
147+
(Laruence)
149148
. Added experimental (disabled by default) file based opcode cache.
150149
(Dmitry, Laruence, Anatol)
151150
. Fixed bug with try blocks being removed when extended_info opcode
@@ -165,6 +164,8 @@
165164
. Fixed bug #60509 (pcntl_signal doesn't decrease ref-count of old handler
166165
when setting SIG_DFL). (Julien)
167166
. Added wifcontinued and wcontinued. (xilon-jul)
167+
. Added rusage support to pcntl_wait() and pcntl_waitpid(). (Anton Stepanenko,
168+
Tony)
168169

169170
- PCRE:
170171
. Removed support for the /e (PREG_REPLACE_EVAL) modifier. (Nikita)
@@ -183,6 +184,7 @@
183184

184185
- Reflection
185186
. Fixed inheritance chain of Reflector interface. (Tjerk)
187+
. Added ReflectionGenerator class. (Bob)
186188

187189
- Session:
188190
. Fixed bug #67694 (Regression in session_regenerate_id()). (Tjerk)
@@ -200,13 +202,13 @@
200202
nor curruption state). (Julien)
201203
. Fixed bug #66405 (RecursiveDirectoryIterator::CURRENT_AS_PATHNAME
202204
breaks the RecursiveIterator). (Paul Garvin)
203-
. Fixed bug #68479 (Added escape parameter to SplFileObject::fputcsv). (Salathe)
204205

205206
- Sqlite3:
206207
. Fixed bug #68260 (SQLite3Result::fetchArray declares wrong
207208
required_num_args). (Julien)
208209

209210
- Standard:
211+
. Fixed bug #69523 (Cookie name cannot be empty). (Christoph M. Becker)
210212
. Fixed bug #69325 (php_copy_file_ex does not pass the argument).
211213
(imbolk at gmail dot com)
212214
. Fixed bug #69299 (Regression in array_filter's $flag argument in PHP 7).
@@ -221,7 +223,10 @@
221223
. Fixed bug #65272 (flock() out parameter not set correctly in windows).
222224
(Daniel Lowrey)
223225
. Added preg_replace_callback_array function. (Wei Dai)
224-
. Deprecated salt option to password_hash. (Anthony)
226+
. Deprecated salt option to password_hash. (Anthony)
227+
. Fixed bug #69686 (password_verify reports back error on PHP7 will null
228+
string). (Anthony)
229+
. Added Windows support for getrusage(). (Kalle)
225230

226231
- Streams:
227232
. Fixed bug #68532 (convert.base64-encode omits padding bytes).
@@ -242,5 +247,7 @@
242247
. Added ZipArchive::setCompressionName and ZipArchive::setCompressionIndex
243248
methods (Remi, Cedric Delmas)
244249
. Update bundled libzip to 1.0.1 (Remi, Anatol)
250+
. Fixed bug #67161. (ZipArchive::getStream() returns NULL for certain file)
251+
(Christoph M. Becker)
245252

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

UPGRADING

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ Standard library changes
435435
and also renamed zend_qsort to zend_sort.
436436
. Added stable sorting algo zend_insert_sort.
437437
. Removed dl() function on fpm-fcgi.
438+
. setcookie() with an empty cookie name now issues a WARNING and doesn't send an empty set-cookie header line anymore.
438439

439440
Other
440441
=====
@@ -521,7 +522,7 @@ Other
521522
. Added null coalesce operator (??).
522523
(RFC: https://wiki.php.net/rfc/isset_ternary)
523524
. Support for strings with length >= 2^31 bytes in 64 bit builds.
524-
. Closure::call() method added.
525+
. Closure::call() method added (works only with userland classes).
525526
. Added \u{xxxxxx} Unicode Codepoint Escape Syntax for double-quoted strings
526527
and heredocs.
527528
. define() now supports arrays as constant values, fixing an oversight where define() did not support arrays yet const syntax did.
@@ -536,6 +537,9 @@ Other
536537
built against OpenSSL 1.0.2 or newer. Negotiated protocol information is
537538
accessible through stream_get_meta_data() output.
538539

540+
- Reflection
541+
. Added a ReflectionGenerator class (yield from Traces, current file/line etc.)
542+
539543
========================================
540544
3. Changes in SAPI modules
541545
========================================

Zend/Zend.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,4 +462,4 @@ if test "$ZEND_GCC_GLOBAL_REGS" = "yes"; then
462462
else
463463
HAVE_GCC_GLOBAL_REGS=no
464464
fi
465-
AC_MSG_RESULT(ZEND_GCC_GLOBAL_REGS)
465+
AC_MSG_RESULT($ZEND_GCC_GLOBAL_REGS)

Zend/configure.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ int zend_sprintf(char *buffer, const char *format, ...);
9090
#define zend_isinf(a) 0
9191
#endif
9292

93-
#ifdef HAVE_FINITE
94-
#define zend_finite(a) finite(a)
95-
#elif defined(HAVE_ISFINITE) || defined(isfinite)
93+
#if defined(HAVE_ISFINITE) || defined(isfinite)
9694
#define zend_finite(a) isfinite(a)
95+
#elif defined(HAVE_FINITE)
96+
#define zend_finite(a) finite(a)
9797
#elif defined(fpclassify)
9898
#define zend_finite(a) ((fpclassify((a))!=FP_INFINITE&&fpclassify((a))!=FP_NAN)?1:0)
9999
#else

Zend/tests/028.phpt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@ bool(true)
2020

2121
Notice: Undefined offset: 2 in %s on line %d
2222

23-
Fatal error: Function name must be a string in %s on line %d
23+
Fatal error: Uncaught EngineException: Function name must be a string in %s:%d
24+
Stack trace:
25+
#0 {main}
26+
thrown in %s on line %d

Zend/tests/037.phpt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@ var_dump($x::$x);
1616
--EXPECTF--
1717
int(1)
1818

19-
Fatal error: Access to undeclared static property: Closure::$x in %s on line %d
19+
Fatal error: Uncaught EngineException: Access to undeclared static property: Closure::$x in %s:%d
20+
Stack trace:
21+
#0 {main}
22+
thrown in %s on line %d

Zend/tests/access_modifiers_010.phpt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,9 @@ new c;
2828

2929
?>
3030
--EXPECTF--
31-
Fatal error: Call to private method d::test2() from context 'a' in %s on line %d
31+
Fatal error: Uncaught EngineException: Call to private method d::test2() from context 'a' in %s:%d
32+
Stack trace:
33+
#0 %s(%d): a->test()
34+
#1 %s(%d): c->__construct()
35+
#2 {main}
36+
thrown in %s on line %d

Zend/tests/add_002.phpt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,7 @@ Exception: Unsupported operand types
2626

2727
Notice: Object of class stdClass could not be converted to int in %s on line %d
2828

29-
Fatal error: Unsupported operand types in %s on line %d
29+
Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d
30+
Stack trace:
31+
#0 {main}
32+
thrown in %s on line %d

Zend/tests/add_003.phpt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,7 @@ Exception: Unsupported operand types
2626

2727
Notice: Object of class stdClass could not be converted to int in %s on line %d
2828

29-
Fatal error: Unsupported operand types in %s on line %d
29+
Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d
30+
Stack trace:
31+
#0 {main}
32+
thrown in %s on line %d

Zend/tests/add_004.phpt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@ echo "Done\n";
1919
--EXPECTF--
2020
Exception: Unsupported operand types
2121

22-
Fatal error: Unsupported operand types in %s on line %d
22+
Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d
23+
Stack trace:
24+
#0 {main}
25+
thrown in %s on line %d

Zend/tests/add_007.phpt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,7 @@ echo "Done\n";
2121
--EXPECTF--
2222
Exception: Unsupported operand types
2323

24-
Fatal error: Unsupported operand types in %s on line %d
24+
Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d
25+
Stack trace:
26+
#0 {main}
27+
thrown in %s on line %d

Zend/tests/array_type_hint_001.phpt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,8 @@ foo(123);
1212
--EXPECTF--
1313
3
1414

15-
Fatal error: Argument 1 passed to foo() must be of the type array, integer given, called in %sarray_type_hint_001.php on line 7 and defined in %sarray_type_hint_001.php on line 2
15+
Fatal error: Uncaught TypeException: Argument 1 passed to foo() must be of the type array, integer given, called in %sarray_type_hint_001.php on line 7 and defined in %sarray_type_hint_001.php:2
16+
Stack trace:
17+
#0 %s(%d): foo(123)
18+
#1 {main}
19+
thrown in %sarray_type_hint_001.php on line 2

Zend/tests/assert/expect_002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ assert(false);
99
var_dump(true);
1010
?>
1111
--EXPECTF--
12-
Fatal error: Uncaught exception 'AssertionException' with message 'assert(false)' in %sexpect_002.php:%d
12+
Fatal error: Uncaught AssertionException: assert(false) in %sexpect_002.php:%d
1313
Stack trace:
1414
#0 %sexpect_002.php(%d): assert(false, 'assert(false)')
1515
#1 {main}

Zend/tests/assert/expect_007.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class HeaderMalfunctionException extends AssertionException {}
1616
assert (preg_match("~^([a-zA-Z0-9-]+)$~", $data["key"]), new HeaderMalfunctionException("malformed key found at {$next} \"{$data["key"]}\""));
1717
?>
1818
--EXPECTF--
19-
Fatal error: Uncaught exception 'HeaderMalfunctionException' with message 'malformed key found at 1 "X-HTTP "' in %sexpect_007.php:10
19+
Fatal error: Uncaught HeaderMalfunctionException: malformed key found at 1 "X-HTTP " in %sexpect_007.php:10
2020
Stack trace:
2121
#0 {main}
2222
thrown in %sexpect_007.php on line 10

Zend/tests/assert/expect_009.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Two extends One {
1717
new Two();
1818
?>
1919
--EXPECTF--
20-
Fatal error: Uncaught exception 'AssertionException' with message 'assert(false)' in %sexpect_009.php:%d
20+
Fatal error: Uncaught AssertionException: assert(false) in %sexpect_009.php:%d
2121
Stack trace:
2222
#0 %sexpect_009.php(%d): assert(false, 'assert(false)')
2323
#1 %sexpect_009.php(%d): Two->__construct()

Zend/tests/assert/expect_010.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Two extends One {}
1515
new Two();
1616
?>
1717
--EXPECTF--
18-
Fatal error: Uncaught exception 'AssertionException' with message 'assert(false)' in %sexpect_010.php:%d
18+
Fatal error: Uncaught AssertionException: assert(false) in %sexpect_010.php:%d
1919
Stack trace:
2020
#0 %sexpect_010.php(%d): assert(false, 'assert(false)')
2121
#1 %sexpect_010.php(%d): One->__construct()

Zend/tests/assert/expect_011.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Two extends One {}
2222
new Two();
2323
?>
2424
--EXPECTF--
25-
Fatal error: Uncaught exception 'AssertionException' with message '[Message]: MyExpectations' in %sexpect_011.php:%d
25+
Fatal error: Uncaught AssertionException: [Message]: MyExpectations in %sexpect_011.php:%d
2626
Stack trace:
2727
#0 %sexpect_011.php(%d): assert(false, '[Message]: MyEx...')
2828
#1 %sexpect_011.php(%d): One->__construct()

0 commit comments

Comments
 (0)