1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Commit Graph

1549 Commits

Author SHA1 Message Date
Peter Kokot
085da2725f Merge branch 'PHP-8.3'
* PHP-8.3:
  Use EXTENSIONS instead of SKIPIF sections in *.phpt
2024-01-31 11:20:56 +01:00
Peter Kokot
8d5fc8d23f Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Use EXTENSIONS instead of SKIPIF sections in *.phpt
2024-01-31 11:20:44 +01:00
Peter Kokot
218a93b898 Use EXTENSIONS instead of SKIPIF sections in *.phpt
This also fixes skipped tests due to different naming "zend-test"
instead of "zend_test" and "PDO" instead of "pdo":

- ext/dom/tests/libxml_global_state_entity_loader_bypass.phpt
- ext/simplexml/tests/libxml_global_state_entity_loader_bypass.phpt
- ext/xmlreader/tests/libxml_global_state_entity_loader_bypass.phpt
- ext/zend_test/tests/observer_sqlite_create_function.phpt

EXTENSIONS section is used for the Windows build to load the non-static
extensions.

Closes GH-13276
2024-01-31 11:18:21 +01:00
Peter Kokot
52dba99d47 Sync headers installation
This syncs the installed sapi and extension headers on *nix and Windows
systems by installing only what is intended outside of php-src.

- ext/gd: without gd_arginfo.h and gd_compat.h
- ext/hash: php_hash_joaat.h and php_hash_fnv.h added also on Windows
  installation; xxhash/xxhash.h added on both installations as it is
  included in php_hash_xxhash.h; Include path for xxhash.h changed to
  relative so the php_hash_xxhash.h can be included outside of php-src;
  Redundant include flags removed
- ext/iconv: without iconv_arginfo.h
- ext/mysqli: mysqli_mysqlnd.h was missing on Windows
- ext/phar: php_phar.h was missing on Windows
- ext/sodium: php_libsodium.h was missing on *nix
- ext/xml: without xml_arginfo.h
- sapi/cli: cli.h was missing on Windows

Closes GH-13210
Closes GH-13213
2024-01-28 19:50:55 +01:00
Niels Dossche
b8ff8c04f8 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-10344: imagettfbbox(): Could not find/open font UNC path
  Fix GH-13037: PharData incorrectly extracts zip file
2024-01-25 20:07:52 +01:00
Niels Dossche
78986a6734 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-10344: imagettfbbox(): Could not find/open font UNC path
  Fix GH-13037: PharData incorrectly extracts zip file
2024-01-25 20:07:33 +01:00
Niels Dossche
ba80372a58 Fix GH-13037: PharData incorrectly extracts zip file
The code currently assumes that the extra field length of the central
directory entry and the local entry are the same, but that's not the
case. For example, the "Extended Timestamp extra field" differs in size
for local vs central directory entries. This causes the file contents
offset to be incorrect because it is based on the central directory
length instead of the local entry length. Fix it by reading the local
entry and getting the size from there as well as checking consistency
for the file name length.

Closes GH-13045.
2024-01-25 20:05:45 +01:00
Daniil Gentili
c16ad918ba Change default method of disabling JIT
https://wiki.php.net/rfc/jit_config_defaults
Closes GH-12678
2024-01-15 09:39:13 +01:00
Niels Dossche
488528d274 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix phar/tests/bug77432.phpt
2024-01-12 17:24:22 +01:00
Niels Dossche
e062fe02ef Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix phar/tests/bug77432.phpt
2024-01-12 17:24:07 +01:00
Niels Dossche
5a988d5764 Fix phar/tests/bug77432.phpt
- For Windows we just have to set the right error_reporting value
- Test cannot be used repeatedly on Opcache because the unlink will have
  no effect because of caching.

Closes GH-13129.
2024-01-12 17:23:50 +01:00
Peter Kokot
b632528eb3 Merge branch 'PHP-8.3'
* PHP-8.3:
  Update year to 2024
2024-01-04 19:30:19 +01:00
Peter Kokot
bafb17adcf Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Update year to 2024
2024-01-04 19:29:37 +01:00
Peter Kokot
2575e6b88c Update year to 2024 2024-01-04 19:26:32 +01:00
Niels Dossche
ddbc74c419 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix #71465: PHAR doesn't know about litespeed
2024-01-03 21:35:09 +01:00
Niels Dossche
7525e690f6 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix #71465: PHAR doesn't know about litespeed
2024-01-03 21:34:59 +01:00
Niels Dossche
85dbbe19e2 Fix #71465: PHAR doesn't know about litespeed
We should perhaps look into a generic system to ask the SAPI whether
a feature should be supported or not. Or, we should look into making
a denylist instead of an allowlist.
Anyway, let's not try doing anything fancy on stable branches.

Closes GH-13070.
2024-01-03 21:31:09 +01:00
Niels Dossche
ea6110f52e Merge branch 'PHP-8.3'
* PHP-8.3:
  Skip on Windows
2024-01-01 15:59:01 +01:00
Niels Dossche
b131681d4c Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Skip on Windows
2024-01-01 15:58:52 +01:00
Niels Dossche
0d2c83ef9c Skip on Windows 2024-01-01 15:58:47 +01:00
Niels Dossche
7213e448de Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix test not emitting warning because of Windows paths
2024-01-01 15:27:48 +01:00
Niels Dossche
8d095af1c0 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix test not emitting warning because of Windows paths
2024-01-01 15:27:43 +01:00
Niels Dossche
7677df4cf1 Fix test not emitting warning because of Windows paths 2024-01-01 15:27:33 +01:00
Niels Dossche
f391a26895 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix test on Windows
2024-01-01 14:57:04 +01:00
Niels Dossche
e5e2190d45 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix test on Windows
2024-01-01 14:56:58 +01:00
Niels Dossche
c86f05307e Fix test on Windows 2024-01-01 14:56:49 +01:00
Niels Dossche
c35fc1c4d4 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix #77432: Segmentation fault on including phar file
2024-01-01 13:46:58 +01:00
Niels Dossche
e787790cfc Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix #77432: Segmentation fault on including phar file
2024-01-01 13:46:27 +01:00
Niels Dossche
1edcfccdca Fix #77432: Segmentation fault on including phar file
phar_get_pharfp() can return NULL. In this case this is because the
stream gets closed by the include code in the engine. However, the phar
entry is still cached, so when the next include happens the engine tries
to read from a closed (and nullified) stream.
Use the same fix as in phar_open_entry_fp(): take into account that the
phar_get_pharfp() can return NULL and in that case reopen the phar
archive.

Closes GH-13056.
2024-01-01 13:45:40 +01:00
Peter Kokot
82349769b0 Remove obsolete SVN files excluding when packaging phar (#12920)
This was used in pecl.php.net/phar packaging when using the obsolete SVN
PHP repository.
2023-12-11 09:55:13 +01:00
Daniil Gentili
2ca142ecd8 Improve jit tests
Closes GH-12425
2023-11-14 20:09:27 +01:00
Niels Dossche
3e33eda39a Fix cloning attribute with namespace disappearing namespace
Closes GH-12547.
2023-10-29 17:22:41 +01:00
Niels Dossche
a470c4aeef Fix GH-12532: PharData created from zip has incorrect timestamp
The datetime stored in the DOS time fields, which is what zip standard
uses, is local time without a timezone. There's an extension to the zip
file format since '97 that allows storing a unix timestamp (in UTC) in
the header for both the central directory and the local entries.
This patch adds support for this.

Closes GH-12548.
2023-10-29 17:20:44 +01:00
Ilija Tovilo
f39b5c4c25 Close PHP tags in tests
Closes GH-12422
2023-10-18 17:34:10 +02:00
Cristian Rodríguez
782ffd761b Use a single version of strnlen (#12015)
* Zend: Make zend_strnlen available for use outside zend_compile

* exif: remove local php_strnlen, use zend_strnlen instead

* main: remove local strnlen, use zend_strnlen instead

* phar: remove local strnlen, use zend_strnlen
2023-08-22 17:40:24 +02:00
Ayesh Karunaratne
1887f02b0b Add class constant types to Phar extension (#11826) 2023-08-21 07:14:45 +02:00
Kamil Tekiela
f907a009f9 Align highlight_string|file with HTML standard and modern browsers
Closes GH-11913
2023-08-12 15:08:28 +01:00
Ilija Tovilo
fc9266a5fc Move ASAN built to GitHub actions
Cirrus will no longer offer unlimited free builds starting next month. We don't
have an alternative for FreeBSD and ARM, so move what we can for now.

Closes GH-11898
2023-08-09 14:06:36 +02:00
Niels Dossche
1b092c6aa2 Merge branch 'PHP-8.2'
* PHP-8.2:
  Mark buildFromIterator test as conflicting
2023-08-04 21:09:03 +02:00
Niels Dossche
00ab6bb078 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Mark buildFromIterator test as conflicting
2023-08-04 21:08:57 +02:00
Niels Dossche
dc586b121a Mark buildFromIterator test as conflicting
Commit 0b2e6bc2b0 started caching the directory entry type to improve
performance. Shortly after, we've seen flaky failures of the
buildFromIterator phar test.

When it fails, it's always a value error in the constructor of
RecursiveDirectoryIterator::__construct() with a "no such file or
directory" error. What's happening here is this:
1) A parallel test creates a subdirectory in the current working dir.
2) This test checks hasChildren() on a directory entry, the cached entry
   returns "yes" on the subdirectory.
3) The parallel test finishes and removes the subdirectory.
4) The constructor mentioned above is called, causing an exception
   because the directory is gone.

This race has always been possible, even before said commit. It's just
that it was very hard to hit before: the expensive stat call made the
race window hard to hit. The race is now easier to hit because of the
caching that is fast.

Since there's many tests that modify the current working directory, it
seems best to mark this as an "all" conflict. We cannot avoid every
TOC-TOU race when working with files with these phar tests.

In particular, mounteddir.phpt caused every conflict I saw on CI, but
there's more tests that create subdirectories in the current working
directory.

Closes GH-11869.
2023-08-04 21:08:39 +02:00
Derick Rethans
86afbe10e2 Merge branch 'PHP-8.2' 2023-07-31 19:57:02 +01:00
Derick Rethans
deddf4692a Merge branch 'PHP-8.1' into PHP-8.2 2023-07-31 19:54:44 +01:00
Derick Rethans
0870ebb862 Merge branch 'PHP-8.0' into PHP-8.1 2023-07-31 19:53:43 +01:00
Niels Dossche
80316123f3 Fix buffer mismanagement in phar_dir_read()
Fixes GHSA-jqcx-ccgc-xwhv.
2023-07-31 19:47:05 +01:00
Máté Kocsis
840d665583 Deprecate Phar::setStub(resource $stub, int $length) 2023-07-18 12:59:21 +02:00
Niels Dossche
15bdc85e00 Merge branch 'PHP-8.2'
* PHP-8.2:
  Add missing check on EVP_VerifyUpdate() in phar util
2023-07-09 23:00:49 +02:00
Niels Dossche
3ee2ade917 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Add missing check on EVP_VerifyUpdate() in phar util
2023-07-09 22:55:01 +02:00
Niels Dossche
0d07b6d647 Add missing check on EVP_VerifyUpdate() in phar util
Closes GH-11640.
2023-07-09 22:54:27 +02:00
Niels Dossche
0b2e6bc2b0 Cache d_type in directory entry 2023-07-07 18:02:32 +02:00