1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 22:11:12 +02:00
Commit Graph

122745 Commits

Author SHA1 Message Date
Christoph M. Becker
0374943a0b Merge branch 'PHP-8.0'
* PHP-8.0:
  Add missing SKIPIF clause for recently introduced test case
2021-01-21 17:30:26 +01:00
Christoph M. Becker
02933f923e Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Add missing SKIPIF clause for recently introduced test case
2021-01-21 17:28:41 +01:00
Christoph M. Becker
edb389730d Add missing SKIPIF clause for recently introduced test case 2021-01-21 17:27:09 +01:00
Nikita Popov
3370b5fd87 Accept zend_string in zend_prepare_string_for_scanning 2021-01-21 10:31:32 +01:00
Dmitry Stogov
ba89dcb75a Fixed crash in ZTS build with --repeat option 2021-01-21 11:39:13 +03:00
Dusk
13c430b1db Add array_is_list(array $array) function
This function tests if an array contains only sequential integer keys. While
list isn't an official type, this usage is consistent with the community usage
of "list" as an annotation type, cf.
https://psalm.dev/docs/annotating_code/type_syntax/array_types/#lists

Rebased and modified version of #4886

- Use .stub.php files
- Add opcache constant evaluation when argument is a constant
- Change from is_list(mixed $value) to array_is_list(array $array)

RFC: https://wiki.php.net/rfc/is_list

Co-Authored-By: Tyson Andre <tysonandre775@hotmail.com>
Co-Authored-By: Dusk <dusk@woofle.net>

Closes GH-6070
2021-01-20 18:53:48 -05:00
Christoph M. Becker
04db2c8735 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #80648: Fix for bug 79296 should be based on runtime version
2021-01-20 16:25:08 +01:00
Christoph M. Becker
c4e63c378c Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #80648: Fix for bug 79296 should be based on runtime version
2021-01-20 16:24:53 +01:00
Christoph M. Becker
6adfb8c962 Fix #80648: Fix for bug 79296 should be based on runtime version
Instead of checking for actually affected libzip versions, we now always
`ZIP_TRUNCATE` empty files unless `ZIP_RDONLY` is set.

Closes GH-6625.
2021-01-20 16:20:13 +01:00
Christoph M. Becker
a48d9ede08 Merge branch 'PHP-8.0'
* PHP-8.0:
  Add missing SKIPIF clauses to new test cases
2021-01-20 11:05:39 +01:00
Christoph M. Becker
0ad78817a3 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Add missing SKIPIF clauses to new test cases
2021-01-20 11:04:48 +01:00
Christoph M. Becker
4c1b3e3036 Add missing SKIPIF clauses to new test cases 2021-01-20 11:02:52 +01:00
Nikita Popov
32cf58f7ba Merge branch 'PHP-8.0'
* PHP-8.0:
  Skip preloading test on windows
2021-01-20 10:09:46 +01:00
Nikita Popov
286c13e1e6 Skip preloading test on windows 2021-01-20 10:09:31 +01:00
Dmitry Stogov
378f870d7c Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #80634 (write_property handler of internal classes is skipped on preloaded JITted code)
2021-01-20 11:04:30 +03:00
Dmitry Stogov
6288228b56 Fixed bug #80634 (write_property handler of internal classes is skipped on preloaded JITted code) 2021-01-20 11:03:37 +03:00
Alex Dowad
d8c785b894 Update 'East Asian Width' table to comply with Unicode 13.0
Instead of manually maintaining the data in eaw_table.h, it is now automatically
generated by ucgendat/ucgendat.php, using the EastAsianWidth.txt file from
the Unicode Consortium.

Something must be said about the deleted test case. Back in 2004, someone
noticed that `mb_strwidth` didn't comply with Unicode 4.0. A test case was
added to expose the problem. Well, time keeps moving on, and with the changing
years, new Unicodes are born and old Unicodes die. Some characters which were
counted as double-width in Unicode 4.0 are no longer such in Unicode 13.0,
which renders the test case obsolete.

At the same time, make a couple of spelling/grammar fixes in ucgendat.php.
2021-01-19 20:38:44 +02:00
Gabriel Caruso
28fa0b6365 Merge branch 'PHP-8.0' 2021-01-19 13:15:58 -03:00
Gabriel Caruso
34f0f60db5 Next is 8.0.3 2021-01-19 13:00:48 -03:00
Gabriel Caruso
f65fea0a24 Merge branch 'PHP-8.0' 2021-01-19 12:33:59 -03:00
Gabriel Caruso
9ce200f6cb Fix NEWS placeholder for the next version
This aligns with the PHP-7.4 and PHP-7.3 branches, and should
fix the `sgolemon/php-release` script run for releasing 8.0.2.
2021-01-19 12:32:17 -03:00
George Peter Banyard
ef36de1317 Use zend_string_equals() in PDO
Closes GH-6623
2021-01-19 15:11:21 +00:00
Derick Rethans
6bc7f62b95 Merge branch 'PHP-8.0' 2021-01-19 14:59:29 +00:00
Derick Rethans
b5599a37d7 Merge branch 'PHP-7.4' into PHP-8.0 2021-01-19 14:59:19 +00:00
Derick Rethans
a33d0c3aae Update NEWS and version 2021-01-19 14:58:38 +00:00
Derick Rethans
e8a89c49db Update NEWS for PHP 7.4.15RC1 2021-01-19 14:44:32 +00:00
Nikita Popov
dbe5725ff3 Rename zend-test to zend_test
The extension name should match the name of the ext/ directory,
otherwise it will not get picked up by run-tests. It would be possible
to remap this in run-tests, but I think it's better to rename the
extension to follow the standard format. Other extensions also
use underscore instead of hyphen (e.g. pdo_mysql and not pdo-mysql).
Of course, the ./configure option remains hyphenated.

Closes GH-6613.
2021-01-19 15:28:15 +01:00
Nikita Popov
d1fe9ae05f Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix observer tests on Windows
2021-01-19 15:27:38 +01:00
Nikita Popov
f3415758d1 Fix observer tests on Windows
Use %e instead of a hardcoded forward slash.
2021-01-19 15:27:14 +01:00
Nikita Popov
8c3d279cb3 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #80644: ResourceBundle::get() doesn't reset error state
2021-01-19 15:21:09 +01:00
Nikita Popov
05d168013a Fixed bug #80644: ResourceBundle::get() doesn't reset error state 2021-01-19 15:20:55 +01:00
George Peter Banyard
a6e8ebf99a Use standard C99 64bits int types
Closes GH-6622
2021-01-19 13:44:36 +00:00
George Peter Banyard
b44e29f843 php_pdo_register_driver() might fail
Therefore correctly report failure in MINIT for the drivers which didn't.
2021-01-19 12:55:07 +00:00
George Peter Banyard
424b4802d2 Remove unnecessary (char*) casts
The functions accepts a const char*
2021-01-19 12:40:50 +00:00
George Peter Banyard
a78aea8948 Refactor PDO's last inserted ID handler to use and return zend_string
Closes GH-6617
2021-01-19 11:54:25 +00:00
George Peter Banyard
94ea8e247b Refactor PDO doer handler to use zend_string 2021-01-19 11:42:39 +00:00
Nikita Popov
9be0ee4309 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #42560
2021-01-19 11:44:49 +01:00
Nikita Popov
1bdd8f7ae4 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fixed bug #42560
2021-01-19 11:44:22 +01:00
sj-i
5d31ee302d Fixed bug #42560
Check open_basedir after the fallback to the system's temporary
directory in tempnam().

In order to preserve the current behavior of upload_tmp_dir
(do not check explicitly specified dir, but check fallback),
new flags are added to check open_basedir for explicit dir
and for fallback.

Closes GH-6526.
2021-01-19 11:41:58 +01:00
Christoph M. Becker
a4992cbf66 Merge branch 'PHP-8.0'
* PHP-8.0:
  ldap_search() and friends can return array
2021-01-19 10:35:35 +01:00
Christoph M. Becker
f33105dcb6 ldap_search() and friends can return array
See the description of <https://www.php.net/ldap-search>, and also the
implementation.

Closes GH-6620.
2021-01-19 10:35:17 +01:00
Christoph M. Becker
e1a1918f26 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #69279: Compressed ZIP Phar extractTo() creates garbage files
2021-01-19 10:31:06 +01:00
Christoph M. Becker
cfae999f1b Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #69279: Compressed ZIP Phar extractTo() creates garbage files
2021-01-19 10:30:28 +01:00
Christoph M. Becker
68f5289e9e Fix #69279: Compressed ZIP Phar extractTo() creates garbage files
When extracting compressed files from an uncompressed Phar, we must not
use the direct file pointer, but rather get an uncompressed file
pointer.

We also add a test to show that deflated and stored entries are
properly extracted.

This also fixes #79912, which appears to be a duplicate of #69279.

Co-authored-by: Anna Filina <afilina@gmail.com>

Closes GH-6599.
2021-01-19 10:28:54 +01:00
Nikita Popov
e422ab2af7 Merge branch 'PHP-8.0'
* PHP-8.0:
  Keep JIT region executable under ZTS
2021-01-19 10:28:42 +01:00
Dylan K. Taylor
872f302b8d Keep JIT region executable under ZTS
When one thread tries to compile a script, another thread may
already be executing JITed code. In this case we can't make the
memory non-executable.

This violates the W^X principle, but doesn't seem to be avoidable
for ZTS builds for now. The same problem does not exist for NTS,
as it's a different process executing there, which has it's own
memory protection mapping.

Closes GH-6595.
2021-01-19 10:25:42 +01:00
Nikita Popov
29cf59895a Merge branch 'PHP-8.0'
* PHP-8.0:
  Observe unused return values in JIT
2021-01-19 10:10:08 +01:00
Nikita Popov
fbd8e20ed5 Observe unused return values in JIT
Even if the return value is not used, it should still be available
to the observer.
2021-01-19 10:09:53 +01:00
Nikita Popov
64a4128c16 Merge branch 'PHP-8.0'
* PHP-8.0:
  Disable opcache optimizations during some observer tests
2021-01-19 10:03:28 +01:00
Nikita Popov
dd7d829896 Disable opcache optimizations during some observer tests
Opcache inlines functions that only return a constant. Disable
optimizations to prevent differences in tests where such functions
are used (or rewrite the test to not depend on it).
2021-01-19 10:02:08 +01:00