Skip to content

Commit c31f57d

Browse files
committed
Merge branch 'master' into str_contains
2 parents 8a60b3c + 78b64bd commit c31f57d

File tree

1,075 files changed

+16904
-13665
lines changed

Some content is hidden

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

1,075 files changed

+16904
-13665
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ git:
33

44
dist: xenial
55
language: c
6-
sudo: required
6+
os: linux
77
addons:
88
apt:
99
packages:
@@ -27,6 +27,7 @@ addons:
2727
- libpspell-dev
2828
- libsasl2-dev
2929
- libsqlite3-dev
30+
- libsodium-dev
3031
- libtidy-dev
3132
- libwebp-dev
3233
- libxml2-dev

EXTENSIONS

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ STATUS: Working
3737
-------------------------------------------------------------------------------
3838
EXTENSION: cli
3939
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>, Edin Kadribasic <edink@php.net>
40-
MAINTENANCE: Unknown
40+
MAINTENANCE: Xinchen Hui <laruence@php.net> (2013 - 2020)
4141
STATUS: Working
4242
SINCE: 4.3.0
4343
-------------------------------------------------------------------------------
@@ -166,7 +166,7 @@ COMMENT: Use PostgreSQL 7.0.x or later. PostgreSQL 6.5.3 or less hav
166166
-------------------------------------------------------------------------------
167167
EXTENSION: sqlite3
168168
PRIMARY MAINTAINER: Scott MacVicar <scottmac@php.net> (2008 - 2011)
169-
Christoph M. Becker <cmb@php.net> (2016 - 2019)
169+
Christoph M. Becker <cmb@php.net> (2016 - 2020)
170170
MAINTENANCE: Maintained
171171
STATUS: Working
172172
SINCE: 5.3
@@ -255,7 +255,7 @@ STATUS: Working
255255
-------------------------------------------------------------------------------
256256
EXTENSION: com_dotnet
257257
PRIMARY MAINTAINER: Wez Furlong <wez@php.net> (2003 - 2005)
258-
Christoph M. Becker <cmb@php.net> (2018 - 2019)
258+
Christoph M. Becker <cmb@php.net> (2018 - 2020)
259259
MAINTENANCE: Maintained
260260
STATUS: Windows
261261
SINCE: 5.0
@@ -318,7 +318,7 @@ STATUS: Working
318318
-------------------------------------------------------------------------------
319319
EXTENSION: gd
320320
PRIMARY MAINTAINER: Pierre-Alain Joye <pajoye@php.net> (2002 - 2016)
321-
Christoph M. Becker <cmb@php.net> (2015 - 2019)
321+
Christoph M. Becker <cmb@php.net> (2015 - 2020)
322322
MAINTENANCE: Maintained
323323
STATUS: Working
324324
-------------------------------------------------------------------------------
@@ -330,7 +330,7 @@ STATUS: Working
330330
EXTENSION: gmp
331331
PRIMARY MAINTAINER: Stanislav Malyshev <stas@php.net> (2000 - 2019)
332332
Antony Dovgal <tony2001@php.net> (2005 - 2010)
333-
Nikita Popov <nikic@php.net> (2013 - 2019)
333+
Nikita Popov <nikic@php.net> (2013 - 2020)
334334
MAINTENANCE: Maintained
335335
STATUS: Working
336336
SINCE: 4.0.4
@@ -379,14 +379,14 @@ STATUS: Working
379379
-------------------------------------------------------------------------------
380380
EXTENSION: mbstring
381381
PRIMARY MAINTAINER: Rui Hirokawa <hirokawa@php.net> (2001 - 2013)
382-
Nikita Popov <nikic@php.net> (2017 - 2019)
382+
Nikita Popov <nikic@php.net> (2017 - 2020)
383383
MAINTENANCE: Maintained
384384
STATUS: Working
385385
-------------------------------------------------------------------------------
386386
EXTENSION: opcache
387387
PRIMARY MAINTAINER: Dmitry Stogov <dmitry@php.net> (2013 - 2018)
388-
Xinchen Hui <laruence@php.net> (2013 - 2018)
389-
Nikita Popov <nikic@php.net> (2016 - 2019)
388+
Xinchen Hui <laruence@php.net> (2013 - 2020)
389+
Nikita Popov <nikic@php.net> (2016 - 2020)
390390
MAINTENANCE: Maintained
391391
STATUS: Working
392392
SINCE: 5.5.0
@@ -438,6 +438,7 @@ STATUS: Working
438438
EXTENSION: reflection
439439
PRIMARY MAINTAINER: Marcus Börger <helly@php.net> (2003 - 2009)
440440
Johannes Schlüter <johannes@php.net> (2006 - 2014)
441+
Nikita Popov <nikic@php.net> (2019 - 2020)
441442
MAINTENANCE: Maintained
442443
STATUS: Working
443444
-------------------------------------------------------------------------------
@@ -503,12 +504,13 @@ STATUS: Working
503504
-------------------------------------------------------------------------------
504505
EXTENSION: tokenizer
505506
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net> (2002 - 2002)
506-
Nikita Popov <nikic@php.net> (2013 - 2019)
507+
Nikita Popov <nikic@php.net> (2013 - 2020)
507508
MAINTENANCE: Maintained
508509
STATUS: Working
509510
-------------------------------------------------------------------------------
510511
EXTENSION: zip
511512
PRIMARY MAINTAINER: Pierre-Alain Joye <pajoye@php.net> (2006 - 2011)
513+
Remi Collet <remi@php.net> (2013-2020)
512514
MAINTENANCE: Maintained
513515
STATUS: Working
514516
-------------------------------------------------------------------------------

NEWS

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ PHP NEWS
1212
renamed). (Nikita)
1313
. Fixed bug #70839 (Converting optional argument to variadic forbidden by LSP
1414
checks). (Nikita)
15+
. Fixed bug #69084 (Unclear error message when not implementing a renamed
16+
abstract trait function). (Nikita)
17+
. Fixed bug #62609 (Allow implementing Traversable on abstract classes).
18+
(Nikita)
1519

1620
- CURL:
1721
. Bumped required libcurl version to 7.29.0. (cmb)
@@ -42,6 +46,8 @@ PHP NEWS
4246

4347
- JIT:
4448
. Fixed bug #77857 (Wrong result if executed with JIT). (Laruence)
49+
. Fixed bug #79255 (PHP cannot be compiled with enable JIT).
50+
(Laruence, Dmitry)
4551

4652
- LDAP:
4753
. Removed deprecated ldap_sort. (mcmic)
@@ -83,6 +89,13 @@ PHP NEWS
8389
message with traits). (villfa)
8490
. Implement ReflectionProperty::hasDefaultValue and
8591
Reflection::getDefaultValue (beberlei)
92+
. Fixed bug #64592 (ReflectionClass::getMethods() returns methods out of
93+
scope). (Nikita)
94+
. Fixed bug #77325 (ReflectionClassConstant::$class returns wrong class when
95+
extending). (Nikita)
96+
. Fixed bug #69180 (Reflection does not honor trait conflict resolution /
97+
method aliasing). (Nikita)
98+
. Fixed bug #74939 (Nested traits' aliased methods are lowercased). (Nikita)
8699

87100
- Session:
88101
. Fixed bug #78624 (session_gc return value for user defined session
@@ -106,6 +119,9 @@ PHP NEWS
106119
filter). (kkopachev)
107120
. Fixed bug #78385 (parse_url() does not include 'query' when question mark
108121
is the last char). (Islam Israfilov)
122+
. Fixed bug #75902 (str_replace should warn when misused with nested arrays).
123+
(Nikita)
124+
. Made quoting of cmd execution functions consistent. (cmb)
109125

110126
- tidy:
111127
. Removed the unused $use_include_path parameter from tidy_repair_string().
@@ -119,9 +135,20 @@ PHP NEWS
119135
(cmb)
120136

121137
- Zip:
122-
. Fixed bug #72374 (remove_path strips first char of filename). (tyage)
138+
. Fixed bug #72374 (remove_path strips first char of filename). (tyage, Remi)
123139
. Add ZipArchive::setMtimeName and ZipArchive::setMtimeIndex methods. (Remi)
124140
. Add ZipArchive::setProgressCallback method (since libzip 1.3.0). (Remi)
125141
. Add ZipArchive::setCancelCallback method (since libzip 1.6.0). (Remi)
142+
. Add optional "flags" parameter to ZipArchive::addEmptyDir, addFile and
143+
addFromString methods. (Remi)
144+
. Add "flags" options to ZipArchive::addGlob and addPattern methods
145+
keeping previous behavior having FL_OVERWRITE by default. (Remi)
146+
. Add ZipArchive::replaceFile() method. (Remi)
147+
. Add lastId property to ZipArchive. (Remi)
148+
. ZipArchive::status and ZipArchive::statusSys properties and
149+
ZipArchive::getStatusString() method stay valid after the archive
150+
is closed. (Remi)
151+
. Fixed bug #50678 (files extracted by ZipArchive class lost their
152+
original modified time). (Remi)
126153

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

TSRM/tsrm_win32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,12 +478,12 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
478478
return NULL;
479479
}
480480

481-
cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof(" /c ")+2);
481+
cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof(" /s /c ")+2);
482482
if (!cmd) {
483483
return NULL;
484484
}
485485

486-
sprintf(cmd, "%s /c \"%s\"", TWG(comspec), command);
486+
sprintf(cmd, "%s /s /c \"%s\"", TWG(comspec), command);
487487
cmdw = php_win32_cp_any_to_w(cmd);
488488
if (!cmdw) {
489489
free(cmd);

UPGRADING

Lines changed: 94 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,39 @@ PHP 8.0 UPGRADE NOTES
130130
exception.
131131
. Some "Only variables should be passed by reference" notices have been converted
132132
to "Cannot pass parameter by reference" exception.
133+
. The generated name for anonymous classes has changed. It will now include
134+
the name of the first parent or interface:
135+
136+
new class extends ParentClass {};
137+
// -> ParentClass@anonymous
138+
new class implements FirstInterface, SecondInterface {};
139+
// -> FirstInterface@anonymous
140+
new class {};
141+
// -> class@anonymous
142+
143+
The name shown above is still followed by a null byte and and a unique
144+
suffix.
145+
. Declaring a required parameter after an optional one is deprecated. As an
146+
exception, declaring a parameter of the form "Type $param = null" before
147+
a required one continues to be allowed, because this pattern was sometimes
148+
used to achieve nullable types in older PHP versions.
149+
150+
function test($a = [], $b) {} // Deprecated
151+
function test(Foo $a = null, $b) {} // Allowed
152+
. Non-absolute trait method references in trait alias adaptations are now
153+
required to be unambiguous:
154+
155+
class X {
156+
use T1, T2 {
157+
func as otherFunc;
158+
}
159+
function func() {}
160+
}
161+
162+
If both T1::func() and T2::func() exist, this code was previously silently
163+
accepted, and func as assumed to refer to T1::func. Now it will generate a
164+
fatal error instead, and either T1::func or T2::func needs to be written
165+
explicitly.
133166

134167
- COM:
135168
. Removed the ability to import case-insensitive constants from type
@@ -266,6 +299,7 @@ PHP 8.0 UPGRADE NOTES
266299
representation of the type, and is no longer deprecated. In particular the
267300
result will include a nullability indicator for nullable types. The format
268301
of the return value is not stable and may change between PHP versions.
302+
. Reflection export() methods have been removed.
269303

270304
- Socket:
271305
. The deprecated AI_IDN_ALLOW_UNASSIGNED and AI_IDN_USE_STD3_ASCII_RULES
@@ -309,6 +343,7 @@ PHP 8.0 UPGRADE NOTES
309343
. convert_cyr_string() has been removed.
310344
. money_format() has been removed.
311345
. ezmlm_hash() has been removed.
346+
. restore_include_path() has been removed.
312347
. get_magic_quotes_gpc() and get_magic_quotes_gpc_runtime() has been removed.
313348
. FILTER_SANITIZE_MAGIC_QUOTES has been removed.
314349
. Calling implode() with parameters in a reverse order ($pieces, $glue) is no
@@ -321,6 +356,10 @@ PHP 8.0 UPGRADE NOTES
321356
http://example.com/foo?# => query = "", fragment = ""
322357

323358
Previously all cases resulted in query and fragment being null.
359+
. var_dump() and debug_zval_dump() will now print floating-point numbers
360+
using serialize_precision rather than precision. In a default configuration,
361+
this means that floating-point numbers are now printed with full accuracy
362+
by these debugging functions.
324363

325364
- tidy:
326365
. The $use_include_path parameter, which was not used internally, has been
@@ -338,11 +377,8 @@ PHP 8.0 UPGRADE NOTES
338377
objects instead of resources.
339378

340379
- Zip:
341-
. The remove_path option of ZipArchive::addGlob() and ::addPattern() is now
342-
treated as arbitrary string prefix (for consistency with the add_path
343-
option), whereas formerly it was treated as directory name. This means that
344-
if no trailing directory separator is given, the following character is
345-
no longer stripped from the filename.
380+
. ZipArchive::OPSYS_Z_CPM have been removed, should use ZipArchive::OPSYS_CPM
381+
(this name was a typo).
346382

347383
- Zlib:
348384
. gzgetss() has been removed.
@@ -367,21 +403,44 @@ PHP 8.0 UPGRADE NOTES
367403
class B extends A {
368404
public function method(...$everything) {}
369405
}
406+
. "static" (as in "late static binding") can now be used as a return type:
407+
408+
class Test {
409+
public function create(): static {
410+
return new static();
411+
}
412+
}
413+
414+
RFC: https://wiki.php.net/rfc/static_return_type
370415
. It is now possible to fetch the class name of an object using
371416
`$object::class`. The result is the same as `get_class($object)`.
372417
RFC: https://wiki.php.net/rfc/class_name_literal_on_object
373-
. New and instanceof can now be used with arbitary expressions, using
418+
. New and instanceof can now be used with arbitrary expressions, using
374419
`new (expression)(...$args)` and `$obj instanceof (expression)`.
375420
RFC: https://wiki.php.net/rfc/variable_syntax_tweaks
376421
. Some consistency fixes to variable syntax have been applied, for example
377422
writing `Foo::BAR::$baz` is now allowed.
378423
RFC: https://wiki.php.net/rfc/variable_syntax_tweaks
379-
424+
. Added Stringable.
425+
RFC: https://wiki.php.net/rfc/stringable
380426

381427
- Date:
382428
. Added DateTime::createFromInterface() and
383429
DateTimeImmutable::createFromInterface().
384430

431+
- dom:
432+
. Introduce DOMParentNode and DOMChildNode with new traversal and manipulation APIs
433+
RFC: https://wiki.php.net/rfc/dom_living_standard_api
434+
435+
- Zip:
436+
. Extension updated to version 1.18
437+
. New ZipArchive::lastId property to get index value of last added entry.
438+
. Error can be checked after an archive is closed using ZipArchive::status,
439+
ZipArchive::statusSys properties or ZipArchive::getStatusString() method.
440+
. The remove_path option of ZipArchive::addGlob() and ::addPattern() is now
441+
treated as arbitrary string prefix (for consistency with the add_path
442+
option), whereas formerly it was treated as directory name.
443+
385444
========================================
386445
3. Changes in SAPI modules
387446
========================================
@@ -398,10 +457,23 @@ PHP 8.0 UPGRADE NOTES
398457
5. Changed Functions
399458
========================================
400459

460+
- Zip
461+
. ZipArchive::addGlob and ZipArchive::addPattern methods accept a "flags"
462+
value in the "options" array argument.
463+
. ZipArchive::addEmptyDir, ZipArchive::addFile and aZipArchive::addFromString
464+
methods have a new "flags" argument. This allow to manage name encoding
465+
(ZipArchive::FL_ENC_*) and entry replacement (ZipArchive::FL_OVERWRITE)
466+
. ZipArchive::extractTo now restore file modification time.
467+
401468
========================================
402469
6. New Functions
403470
========================================
404471

472+
- PCRE:
473+
. Added preg_last_error_msg(), which returns a human-readable message for
474+
the last PCRE error. It complements preg_last_error(), which returns an
475+
integer enum instead.
476+
405477
- SQLite3:
406478
. Add SQLite3::setAuthorizer() and respective class constants to set a
407479
userland callback that will be used to authorize or not an action on the
@@ -413,6 +485,13 @@ PHP 8.0 UPGRADE NOTES
413485
IEEE 754 semantics. Division by zero is considered well-defined and
414486
will return one of Inf, -Inf or NaN.
415487

488+
- Zip:
489+
. ZipArchive::setMtimeName and ZipArchive::setMtimeIndex to set the
490+
modification time of an entry.
491+
. ZipArchive::setProgressCallback to provide updates during archive close.
492+
. ZipArchive::setCancelCallback to allow cancellation during archive close.
493+
. ZipArchive::replaceFile to replace an entry content.
494+
416495
========================================
417496
7. New Classes and Interfaces
418497
========================================
@@ -436,6 +515,9 @@ PHP 8.0 UPGRADE NOTES
436515
. The function imagegetinterpolation() to get the current interpolation method
437516
has been added.
438517

518+
- MBString:
519+
. The Unicode data tables have been updated to version 13.0.0.
520+
439521
========================================
440522
10. New Global Constants
441523
========================================
@@ -452,6 +534,11 @@ PHP 8.0 UPGRADE NOTES
452534
12. Windows Support
453535
========================================
454536

537+
- Standard:
538+
. Program execution functions (proc_open(), exec(), popen() etc.) using the
539+
shell now consistently execute `%comspec% /s /c "$commandline"`, which has
540+
the same effect as executing `$commandline` (without additional quotes).
541+
455542
- php-test-pack:
456543
. The test runner has been renamed from run-test.php to run-tests.php, to
457544
match its name in php-src.

0 commit comments

Comments
 (0)