Skip to content

Commit a641a04

Browse files
authored
Merge branch 'master' into imagetype-avif
2 parents 7554747 + c34d29d commit a641a04

File tree

8,069 files changed

+169135
-162268
lines changed

Some content is hidden

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

8,069 files changed

+169135
-162268
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ include/
8080
libs/
8181
modules/
8282

83-
# Used by scripts/dev/gen_stub.php
84-
scripts/dev/PHP-Parser-*
83+
# Used by build/gen_stub.php
84+
build/PHP-Parser-*
8585

8686
# ------------------------------------------------------------------------------
8787
# Configuration headers generated by the PHP build system
@@ -209,7 +209,7 @@ php
209209
# Generated by x64 compiler, includes Debug, Debug_TS, Release, Release_TS
210210
/x64/
211211

212-
# Miscellaneous files generated by Windows build sytem
212+
# Miscellaneous files generated by Windows build system
213213
/main/config.w32.h
214214
/win32/build/deplister.exe
215215
/win32/build/deplister.obj

.travis.yml

Lines changed: 7 additions & 2 deletions
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
@@ -73,6 +74,8 @@ jobs:
7374
arch: amd64
7475
- env: ENABLE_ZTS=1 ENABLE_DEBUG=1 SKIP_IO_CAPTURE_TESTS=1 ARM64=1
7576
arch: arm64
77+
- env: ENABLE_ZTS=1 ENABLE_DEBUG=1 SKIP_IO_CAPTURE_TESTS=1 S390X=1
78+
arch: s390x
7679

7780
before_script:
7881
- ccache --version
@@ -88,7 +91,9 @@ before_script:
8891

8992
# Run PHPs run-tests.php
9093
script:
91-
- ./sapi/cli/php run-tests.php -P -d extension=`pwd`/modules/zend_test.so $(if [ $ENABLE_DEBUG == 0 ]; then echo "-d opcache.enable_cli=1 -d opcache.protect_memory=1 -d opcache.jit_buffer_size=16M -d zend_extension=`pwd`/modules/opcache.so"; fi) -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --show-slow 1000 --set-timeout 120 -j$(nproc)
94+
# ARM64 CI reports nproc=32, which is excessive.
95+
- if [ -z "$ARM64" ]; then export JOBS=$(nproc); else export JOBS=16; fi
96+
- ./sapi/cli/php run-tests.php -P -d extension=`pwd`/modules/zend_test.so $(if [ $ENABLE_DEBUG == 0 ]; then echo "-d opcache.enable_cli=1 -d opcache.protect_memory=1 -d opcache.jit_buffer_size=16M -d zend_extension=`pwd`/modules/opcache.so"; fi) -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --show-slow 1000 --set-timeout 120 -j$JOBS
9297
- sapi/cli/php -d extension_dir=`pwd`/modules -r 'dl("zend_test");'
9398

9499
after_success:

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: 79 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,48 @@ PHP NEWS
1010
(Nikita)
1111
. Fixed bug #49555 (Fatal error "Function must be a string" message should be
1212
renamed). (Nikita)
13+
. Fixed bug #70839 (Converting optional argument to variadic forbidden by LSP
14+
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)
19+
. Fixed bug #79462 (method_exists and property_exists incoherent behavior).
20+
(cmb)
21+
. Fixed bug #79368 ("Unexpected end of file" is not an acceptable error
22+
message). (Alex Dowad)
23+
. Fixed bug #36365 (scandir duplicates file name at every 65535th file).
24+
(cmb)
25+
. Use SSE2 instructions do locale independent strtolower. (Laruence)
26+
. Fixed bug #79521 (Check __set_state structure). (carusogabriel)
27+
. Fixed bug #79467 (data:// wrappers are writable). (cmb)
28+
29+
- BZ2:
30+
. Fixed bug #71263 (fread() does not report bzip2.decompress errors). (cmb)
31+
32+
- CURL:
33+
. Bumped required libcurl version to 7.29.0. (cmb)
1334

1435
- Date:
1536
. Fixed bug #65547 (Default value for sunrise/sunset zenith still wrong).
1637
(cmb)
17-
. Fixed bug #69044 (discrepency between time and microtime). (krakjoe)
38+
. Fixed bug #69044 (discrepancy between time and microtime). (krakjoe)
1839

1940
- DOM:
2041
. Add property DOMXPath::$registerNodeNamespaces and constructor argument
2142
that allow global flag to configure query() or evaluate() calls.
2243

44+
- Enchant:
45+
. Add LIBENCHANT_VERSION macro
46+
. Deprecate enchant_broker_set_dict_path, enchant_broker_get_dict_path
47+
enchant_dict_add_to_personal and enchant_dict_is_in_session
48+
. Add enchant_dict_add and enchant_dict_is_added functions
49+
. Use libenchant-2 when available
50+
51+
- FPM:
52+
. Fixed bug #64865 (Search for .user.ini files from script dir up to
53+
CONTEXT_DOCUMENT_ROOT). (Will Bender)
54+
2355
- GD:
2456
. Fixed bug #55005 (imagepolygon num_points requirement). (cmb)
2557
. Replaced gd resources with objects. (Mark Randall)
@@ -28,16 +60,22 @@ PHP NEWS
2860
. Removed deprecated png2wbmp() and jpeg2wbmp(). (cmb)
2961
. Added imagegetinterpolation(). (cmb)
3062

63+
- Iconv:
64+
. Dropped support for iconv without proper errno setting. (cmb)
65+
3166
- Intl:
3267
. Removed deprecated INTL_IDNA_VARIANT_2003. (cmb)
3368

3469
- JIT:
3570
. Fixed bug #77857 (Wrong result if executed with JIT). (Laruence)
71+
. Fixed bug #79255 (PHP cannot be compiled with enable JIT).
72+
(Laruence, Dmitry)
3673

3774
- LDAP:
3875
. Removed deprecated ldap_sort. (mcmic)
3976

4077
- MBString:
78+
. Fixed bug #76999 (mb_regex_set_options() return current options). (cmb)
4179
. Removed the unused $is_hex parameter from mb_decode_numericentity(). (cmb)
4280

4381
- MySQLi:
@@ -48,13 +86,14 @@ PHP NEWS
4886
. Fixed #60594 (mysqlnd exposes 160 lines of stats in phpinfo). (PeeHaa)
4987

5088
- OpCache:
51-
. Fixed bug #78654 (Incorrectly computed opcache checksum on files with
89+
. Fixed bug #78654 (Incorrectly computed opcache checksum on files with
5290
non-ascii characters). (mhagstrand)
5391

5492
- PCRE:
5593
. Don't ignore invalid escape sequences. (sjon)
5694

5795
- PDO:
96+
. Changed default PDO error mode to exceptions. (AllenJB)
5897
. Fixed bug #77849 (Disable cloning of PDO handle/connection objects).
5998
(camporter)
6099

@@ -70,8 +109,17 @@ PHP NEWS
70109
. Fixed bug #77805 (phpdbg build fails when readline is shared). (krakjoe)
71110

72111
- Reflection:
73-
. Fixed bug #78697 (ReflectionClass::implementsInterface - inaccurate error
112+
. Fixed bug #78697 (ReflectionClass::implementsInterface - inaccurate error
74113
message with traits). (villfa)
114+
. Implement ReflectionProperty::hasDefaultValue and
115+
Reflection::getDefaultValue (beberlei)
116+
. Fixed bug #64592 (ReflectionClass::getMethods() returns methods out of
117+
scope). (Nikita)
118+
. Fixed bug #77325 (ReflectionClassConstant::$class returns wrong class when
119+
extending). (Nikita)
120+
. Fixed bug #69180 (Reflection does not honor trait conflict resolution /
121+
method aliasing). (Nikita)
122+
. Fixed bug #74939 (Nested traits' aliased methods are lowercased). (Nikita)
75123

76124
- Session:
77125
. Fixed bug #78624 (session_gc return value for user defined session
@@ -95,6 +143,10 @@ PHP NEWS
95143
filter). (kkopachev)
96144
. Fixed bug #78385 (parse_url() does not include 'query' when question mark
97145
is the last char). (Islam Israfilov)
146+
. Fixed bug #75902 (str_replace should warn when misused with nested arrays).
147+
(Nikita)
148+
. Fixed bug #47983 (mixed LF and CRLF line endings in mail()). (cmb)
149+
. Made quoting of cmd execution functions consistent. (cmb)
98150

99151
- tidy:
100152
. Removed the unused $use_include_path parameter from tidy_repair_string().
@@ -104,10 +156,32 @@ PHP NEWS
104156
. Fixed bug #76874 (xml_parser_free() should never leak memory). (Nikita)
105157

106158
- XMLWriter:
107-
. Changed functions to accept/return XMKWriter objects instead of resources.
159+
. Changed functions to accept/return XMLWriter objects instead of resources.
108160
(cmb)
109161

110162
- Zip:
111-
. Fixed bug #72374 (remove_path strips first char of filename). (tyage)
163+
. Fixed bug #72374 (remove_path strips first char of filename). (tyage, Remi)
164+
. Add ZipArchive::setMtimeName and ZipArchive::setMtimeIndex methods. (Remi)
165+
. Add ZipArchive::setProgressCallback method (since libzip 1.3.0). (Remi)
166+
. Add ZipArchive::setCancelCallback method (since libzip 1.6.0). (Remi)
167+
. Add optional "flags" parameter to ZipArchive::addEmptyDir, addFile and
168+
addFromString methods. (Remi)
169+
. Add "flags" options to ZipArchive::addGlob and addPattern methods
170+
keeping previous behavior having FL_OVERWRITE by default. (Remi)
171+
. Add ZipArchive::replaceFile() method. (Remi)
172+
. Add lastId property to ZipArchive. (Remi)
173+
. ZipArchive::status and ZipArchive::statusSys properties and
174+
ZipArchive::getStatusString() method stay valid after the archive
175+
is closed. (Remi)
176+
. Fixed bug #50678 (files extracted by ZipArchive class lost their
177+
original modified time). (Remi)
178+
. Implemented FR #77960 (add compression / encryption options for
179+
ZipArchive::addGlob and ZipArchive::addPattern). (Remi)
180+
. Add ZipArchive::EM_UNKNOWN and ZipArchive::EM_TRAD_PKWARE constants. (Remi)
181+
. Add ZipArchive::isCompressionMethodSupported() and
182+
ZipArchive::isEncryptionMethodSupported() method (libzip 1.7.0). (Remi)
183+
184+
- Zlib:
185+
. Fixed bug #71417 (fread() does not report zlib.inflate errors). (cmb)
112186

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

README.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,31 @@ For other systems, see the [installation chapter](https://php.net/install).
3939

4040
*For Windows, see [Build your own PHP on Windows](https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2).*
4141

42-
PHP uses autotools on Unix systems to configure the build:
42+
For a minimal PHP build from Git, you will need autoconf, bison, and re2c. For
43+
a default build, you will additionally need libxml2 and libsqlite3. On Ubuntu,
44+
you can install these using:
4345

44-
./buildconf
45-
./configure [options]
46+
sudo apt install -y build-essential autoconf bison re2c \
47+
libxml2-dev libsqlite3-dev
48+
49+
Generate configure:
4650

47-
*See `./configure -h` for configuration options.*
51+
./buildconf
4852

49-
make [options]
53+
Configure your build. `--enable-debug` is recommended for development, see
54+
`./configure --help` for a full list of options.
5055

51-
*See `make -h` for make options.*
56+
# For development
57+
./configure --enable-debug
58+
# For production
59+
./configure
5260

53-
The `-j` option shall set the maximum number of jobs `make` can use for the
54-
build:
61+
Build PHP. To speed up the build, specify the maximum number of jobs using `-j`:
5562

5663
make -j4
5764

58-
Shall run `make` with a maximum of 4 concurrent jobs: Generally the maximum
59-
number of jobs should not exceed the number of cores available.
65+
The number of jobs should usually match the number of available cores, which
66+
can be determined using `nproc`.
6067

6168
## Testing PHP source code
6269

TSRM/tsrm_win32.c

Lines changed: 11 additions & 9 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);
@@ -613,14 +613,16 @@ TSRM_API int shmget(key_t key, size_t size, int flags)
613613
{/*{{{*/
614614
shm_pair *shm;
615615
char shm_segment[26], shm_info[29];
616-
HANDLE shm_handle, info_handle;
616+
HANDLE shm_handle = NULL, info_handle = NULL;
617617
BOOL created = FALSE;
618618

619-
snprintf(shm_segment, sizeof(shm_segment), "TSRM_SHM_SEGMENT:%d", key);
620-
snprintf(shm_info, sizeof(shm_info), "TSRM_SHM_DESCRIPTOR:%d", key);
619+
if (key != IPC_PRIVATE) {
620+
snprintf(shm_segment, sizeof(shm_segment), "TSRM_SHM_SEGMENT:%d", key);
621+
snprintf(shm_info, sizeof(shm_info), "TSRM_SHM_DESCRIPTOR:%d", key);
621622

622-
shm_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_segment);
623-
info_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_info);
623+
shm_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_segment);
624+
info_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_info);
625+
}
624626

625627
if (!shm_handle && !info_handle) {
626628
if (flags & IPC_CREAT) {
@@ -631,8 +633,8 @@ TSRM_API int shmget(key_t key, size_t size, int flags)
631633
DWORD high = 0;
632634
DWORD low = size;
633635
#endif
634-
shm_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, high, low, shm_segment);
635-
info_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(shm->descriptor), shm_info);
636+
shm_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, high, low, key == IPC_PRIVATE ? NULL : shm_segment);
637+
info_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(shm->descriptor), key == IPC_PRIVATE ? NULL : shm_info);
636638
created = TRUE;
637639
}
638640
if (!shm_handle || !info_handle) {

0 commit comments

Comments
 (0)