1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 16:38:25 +02:00
Commit Graph

5973 Commits

Author SHA1 Message Date
Saki Takamachi ed1c9d8954 ext/standard: Add more tests to round() (#13399) 2024-02-17 13:44:55 +00:00
Jorg Adam Sowa e7b1f2a95b Change long2ip return type (#13395) 2024-02-16 17:11:18 +01:00
Ilija Tovilo 59211a51b7 [skip ci] Move RFC1867 tests as requested by Jakub 2024-02-09 16:01:14 +01:00
Saki Takamachi f62f6a6d4b Follow-up to remove IMAP ext (#13248)
Fixed and optimized tests that depend on imap in standard ext tests.

Also, the location of the setup script for hmailserver has changed.
2024-02-09 21:32:07 +09:00
Saki Takamachi 78970ef6b2 Fix GH-12143: Optimize round
Fixed an error in the result due to "pre-rounding" of the round function.

"Pre-rounding" has been abolished and the method of comparing numbers has
been changed.

Closes GH-12268.
2024-02-03 22:23:02 +09:00
Ilija Tovilo a135517376 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix instable array during in-place modification in uksort
2024-01-31 19:25:59 +01:00
Ilija Tovilo d65c395049 Fix instable array during in-place modification in uksort
The array isn't just observable if the array has RCn, but also if it is inside a
reference that is RCn. By-ref parameters are always RCn and as such always
observable.

Fixes GH-13279
Closes GH-13285
2024-01-31 19:25:30 +01:00
divinity76 50c51d098a missing SKIP_SLOW_TESTS (#13156)
* missing SKIP_SLOW_TESTS

this test took 2 seconds to execute on a 5GHz AMD Ryzen 9 7950x (one of AMD's fastest single-thread-performance CPUs), it should have SKIP_SLOW_TESTS

* skip message nitpick
2024-01-17 11:10:24 +01:00
Niels Dossche 23b94cb5a7 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-13071: Copying large files using mmap-able source streams may exhaust available memory and fail
2024-01-16 23:53:12 +01:00
Niels Dossche 47454cb771 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13071: Copying large files using mmap-able source streams may exhaust available memory and fail
2024-01-16 23:46:43 +01:00
Niels Dossche 5e9e9c9d51 Fix GH-13071: Copying large files using mmap-able source streams may exhaust available memory and fail
Commit 5cbe5a538c disabled chunking for all writes to streams. However,
user streams have a callback where code is executed on data that is
subject to the memory limit. Therefore, when using large writes or
stream_copy_to_stream/copy the memory limit can easily be hit with large
enough data.

To solve this, we reintroduce chunking for userspace streams.
Users have control over the chunk size, which is neat because
they can improve the performance by setting the chunk size if
that turns out to be a bottleneck.

In an ideal world, we add an option so we can "ask" the stream whether
it "prefers" chunked writes, similar to how we have
php_stream_mmap_supported & friends. However, that cannot be done on
stable branches.

Closes GH-13136.
2024-01-16 23:44:58 +01:00
Max Semenik a2b2830f9b ext/standard: make debug_zval_dump() output whether the array is packed (#12641) 2024-01-12 00:33:14 +00:00
Niels Dossche 5e34bb8916 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-13094: range(9.9, '0') causes segmentation fault
2024-01-09 22:12:35 +01:00
Niels Dossche 1d6f344bea Fix GH-13094: range(9.9, '0') causes segmentation fault
`start_type + end_type < 2*IS_STRING` is not right, in this test case
the types are start_type==5 (IS_DOUBLE), end_type==7 (IS_ARRAY).
The IS_ARRAY type is a sentinel to disambiguate single-byte strings.
The path must be taken when one of the types is not a string nor a
single-byte string. Therefore, use < IS_STRING with an OR condition.

Closes GH-13105.
2024-01-09 22:11:45 +01:00
Jorg Adam Sowa f5f44bb22d Refactor tests for pow() function (#13005) 2023-12-26 23:43:52 +00:00
Jorg Adam Sowa 94ddc74c9a RFC: Add 4 new rounding modes to round() function (#12056)
https://wiki.php.net/rfc/new_rounding_modes_to_round_function

Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
2023-12-21 13:28:05 +01:00
Ilija Tovilo b10e357461 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix clean for higher branches
2023-12-13 15:22:15 +01:00
Ilija Tovilo aa52c29f28 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix clean for higher branches
2023-12-13 15:22:09 +01:00
Ilija Tovilo 23ea89404b Fix clean for higher branches 2023-12-13 15:21:19 +01:00
Ilija Tovilo e2972e4c15 Merge branch 'PHP-8.3'
* PHP-8.3:
  Disambiguate fileVar8 test folder
2023-12-13 14:32:01 +01:00
Ilija Tovilo cb38d7b23f Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Disambiguate fileVar8 test folder
2023-12-13 14:31:56 +01:00
Ilija Tovilo cda7718f51 Disambiguate fileVar8 test folder
Closes GH-12951
2023-12-13 14:31:40 +01:00
Marc Bennewitz b3f259d623 number_format: cast large floats within range of int to int
This prevents loosing precision for numbers above 2^52.

Closes GH-12333
2023-12-09 19:07:37 +00:00
Máté Kocsis 2d057757c4 Deprecate calling stream_context_set_option() with 2 arguments 2023-12-04 22:35:30 +01:00
Vinicius Dias f1af7223f8 Fixing incorrect error message when passing null to join/implode's array parameter (#12683)
Closes GH-12682
2023-12-01 09:55:20 +00:00
Niels Dossche f283f50f1a Merge branch 'PHP-8.3'
* PHP-8.3:
  Add missing NULL checks for spl autoload table
  Add missing NULL pointer checks related to the previous call frame
2023-12-01 09:11:32 +01:00
Niels Dossche 0e69329bb0 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Add missing NULL checks for spl autoload table
  Add missing NULL pointer checks related to the previous call frame
2023-12-01 09:09:58 +01:00
Niels Dossche bedf1083f3 Add missing NULL pointer checks related to the previous call frame 2023-12-01 09:08:47 +01:00
Gina Peter Banyard 4c6e08dd09 Merge branch 'PHP-8.3'
* PHP-8.3:
  Mention correct bug number
2023-11-22 04:15:07 +00:00
Gina Peter Banyard af155cf2dc Mention correct bug number
I'm tired
2023-11-22 04:14:37 +00:00
Gina Peter Banyard e5b3e37684 Merge branch 'PHP-8.3'
* PHP-8.3:
  ext/standard: Fix GH-9316
2023-11-22 04:10:39 +00:00
Gina Peter Banyard 37f67a9a98 ext/standard: Fix GH-9316
http_build_query() default null argument for  is implicitly coerced to string

Closes GH-9316
2023-11-22 04:09:40 +00:00
Máté Kocsis ed6e289c31 Make the return type of some stream context related functions true (#12720)
Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
2023-11-19 20:36:42 +01:00
Ilija Tovilo 02494e7657 Merge branch 'PHP-8.3'
* PHP-8.3:
  [skip ci] Fix more test tmp file conflicts
2023-11-16 16:28:46 +01:00
Ilija Tovilo 8828d6ac1d Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Fix more test tmp file conflicts
2023-11-16 16:28:40 +01:00
Ilija Tovilo d5c6633bd1 [skip ci] Fix more test tmp file conflicts 2023-11-16 16:28:12 +01:00
Ilija Tovilo 4a06c1d18b Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix file test race condition
2023-11-16 15:40:48 +01:00
Ilija Tovilo 3060edf6af Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix file test race condition
2023-11-16 15:40:41 +01:00
Ilija Tovilo a742010a0a Fix file test race condition
005_variation2.phpt creates files with special names, and
filesize_variation5.phpt checks for filesize of inexistent files with special
names. Create the files in a separate directory to avoid these tests clashing.

Closes GH-12692
2023-11-16 15:40:16 +01:00
Ilija Tovilo 9f7148ece5 Merge branch 'PHP-8.3'
* PHP-8.3:
  [skip ci] Further increase allowable atime deviation
2023-11-14 18:37:32 +01:00
Ilija Tovilo aa452ed315 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Further increase allowable atime deviation
2023-11-14 18:37:17 +01:00
Ilija Tovilo 9b07b013fc [skip ci] Further increase allowable atime deviation
MSAN is slow in particular, leading to potentially higher deviations.
2023-11-14 18:36:07 +01:00
Niels Dossche 17d2917fb7 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-12655: proc_open() does not take into account references in the descriptor array
2023-11-13 19:34:49 +01:00
Niels Dossche 5c25742c26 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12655: proc_open() does not take into account references in the descriptor array
2023-11-13 19:34:40 +01:00
Niels Dossche 86c7d3ed1f Fix GH-12655: proc_open() does not take into account references in the descriptor array
Closes GH-12658.
2023-11-13 19:29:44 +01:00
Ilija Tovilo f8c2d1ec2f Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix astat imperciseness excemption in test
2023-11-12 14:07:17 +01:00
Ilija Tovilo a687465c45 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix astat imperciseness excemption in test
2023-11-12 14:07:10 +01:00
Ilija Tovilo d224faa10f Fix astat imperciseness excemption in test 2023-11-12 14:06:02 +01:00
Ilija Tovilo a202bf54df Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix undeclared variable in stat tests
2023-11-11 21:01:26 +01:00
Ilija Tovilo 85107c94d1 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix undeclared variable in stat tests
2023-11-11 21:01:19 +01:00