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

435 Commits

Author SHA1 Message Date
Levi Morrison
7843ef7ad5 Merge branch 'PHP-8.3' 2023-11-21 18:33:14 -07:00
Levi Morrison
c524dc6565 test: allow other zend extensions to not fail the test 2023-11-21 18:32:50 -07:00
Niels Dossche
5cc6979210 Merge branch 'PHP-8.3'
* PHP-8.3:
  php_cli_server: ensure single date header is present
2023-10-06 17:54:03 +02:00
Niels Dossche
7c41509e26 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  php_cli_server: ensure single date header is present
2023-10-06 17:51:38 +02:00
Niels Dossche
a1845944ce Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  php_cli_server: ensure single date header is present
2023-10-06 17:50:13 +02:00
coppolafab
f6ac08c6a3 php_cli_server: ensure single date header is present
Currently the PHP Development Server appends a Date header in the
response, despite already set from user code.

Added a check condition before append the header, and a test file.

Closes GH-12363.
2023-10-06 17:49:30 +02:00
Niels Dossche
cb0d04e9f4 Merge branch 'PHP-8.3'
* PHP-8.3:
  Ignore optional warning output in test
2023-10-02 22:55:54 +02:00
Niels Dossche
af15ed94bf Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Ignore optional warning output in test
2023-10-02 22:55:44 +02:00
Niels Dossche
6aa20956fb Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Ignore optional warning output in test
2023-10-02 22:55:28 +02:00
Niels Dossche
6cf76d552e Ignore optional warning output in test
Due to the greedy behaviour of regex, we can't seem to use %A?
Use a for loop with a marker instead to ignore module startup warnings.
2023-10-02 22:53:39 +02:00
Niels Dossche
c24478fb12 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix test under older CI configurations
2023-10-02 21:53:09 +02:00
Niels Dossche
98e2ff44bc Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix test under older CI configurations
2023-10-02 21:53:03 +02:00
Niels Dossche
87cd401aaf Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix test under older CI configurations
2023-10-02 21:52:52 +02:00
Niels Dossche
b140f6e9f8 Fix test under older CI configurations 2023-10-02 21:52:44 +02:00
Niels Dossche
e2c50f6bcb Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix #80092: ZTS + preload = segfault on shutdown
2023-10-02 19:42:45 +02:00
Niels Dossche
0427e26729 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix #80092: ZTS + preload = segfault on shutdown
2023-10-02 19:42:10 +02:00
Niels Dossche
28a909d40a Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix #80092: ZTS + preload = segfault on shutdown
2023-10-02 19:37:09 +02:00
Niels Dossche
bdc87b0f66 Fix #80092: ZTS + preload = segfault on shutdown
After preloading has executed, the executor globals for class_table and
function_table are still referring to the values during preloading.
If no request happens after that then these values will remain dangling
pointers. If then the -v option on CLI or -h option (and possibly
others) on CGI is provided, there is a double free.
Fix it by nulling the pointers explicitly after preloading has finished
to fix it for all SAPIs.

Closes GH-12311.
2023-10-02 19:33:41 +02:00
Niels Dossche
9b6afd88fb Make sure core module has number 0 (#12272)
* Make sure core module has number 0

Some places, possibly also outside PHP, assume the core extension has
module number 0. After 8a812c3fda this wasn't the case anymore as
reported in [1]. Fix it by changing how the next module ID is computed.

[1] https://github.com/php/php-src/pull/12246#issuecomment-1731432377

* Add assertion

* Add test
2023-09-25 17:36:13 +02:00
Christian Clauss
886bf820c9 [skip ci] Fix typos discovered by codespell (#12228) 2023-09-18 11:07:17 +01:00
Ilija Tovilo
c9e5e1fc52 Switch asan build to Ubuntu 23.04 in Docker
Closes GH-12034
2023-08-23 20:40:15 +02:00
George Peter Banyard
e055e12a2c [skip ci] Mark test as XLEAK due to LSAN bug (#12018)
This is due to apparently some combination of glibc and Clang 14 which we are unfortunately hitting
2023-08-23 13:19:13 +01:00
Ilija Tovilo
bad5298707 Make php_cli_server_pdeathsig.phpt SKIPIF more specific 2023-08-22 23:51:56 +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
Niels Dossche
f16b34f1d0 Implement GH-10024: support linting multiple files at once using php -l
This is supported in both the CLI and CGI modes. For CLI this required
little changes.

For CGI, the tricky part was that the options parsing happens inside the
loop. This means that options passed after the -l flag were previously
simply ignored. As we now re-enter the loop we would parse the options
again, and if they are handled but don't set the script name, then CGI
will think you want to read from standard in. To keep the same "don't
parse options" behaviour I simply wrapped the options handling inside an
if.

Closes GH-10024.
Closes GH-10710.
2023-07-05 15:20:36 +02:00
Ilija Tovilo
7f700bf603 [skip ci] Increase php_cli_server_pdeathsig.phpt retries
Fixes GH-11401
2023-06-21 19:29:43 +02:00
Niels Dossche
ac5920f92b Fix GH-11141: Could not open input file: should be sent to stderr
I grepped for php_printf cases in main/ and sapi/ and converted the
cases which clearly indicate errors to fprintf(stderr, ...), like
suggested in the linked issue.

Closes GH-11163.
2023-05-05 19:31:23 +02:00
Cédric Anne
c02348cf9d Make SERVER_SOFTWARE compliant with RFC3875 (#11093) 2023-05-05 12:43:34 +01:00
Ilija Tovilo
11fbf3da35 Merge branch 'PHP-8.2'
* PHP-8.2:
  Unparallelize IO heavy tests
2023-03-27 16:34:19 +02:00
Ilija Tovilo
9b15537e9a Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Unparallelize IO heavy tests
2023-03-27 16:34:11 +02:00
Ilija Tovilo
e1ec67acd6 Unparallelize IO heavy tests
Alternative to GH-10892. This is somewhat unfortunate since these are also the
slow tests. I'm also not sure if this actually helps.

Closes GH-10953
2023-03-27 16:33:36 +02:00
Ilija Tovilo
3a9a950472 Merge branch 'PHP-8.2'
* PHP-8.2:
  [skip ci] Skip upload_2G.phpt on Cirrus
2023-03-15 02:11:59 +01:00
Ilija Tovilo
70c29f84b1 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Skip upload_2G.phpt on Cirrus
2023-03-15 02:11:49 +01:00
Ilija Tovilo
84e7d4a3c8 [skip ci] Skip upload_2G.phpt on Cirrus 2023-03-15 02:11:11 +01:00
Niels Dossche
dcc3255b18 Fix GH-10489: run-tests.php does not escape path when building cmd (#10560)
Multiple tests had to be changed to escape the arguments in shell
commands. Some tests are skipped because they behave differently with
spaces in the path versus without. One notable example of this is the
hashbang test which does not work because spaces in hashbangs paths are
not supported in Linux.

Co-authored-by: Michael Voříšek <mvorisek@mvorisek.cz>
2023-02-25 14:02:06 +00:00
Ilija Tovilo
1fb40b501d Disable CLI server pdeathsig test on 32-bit GitHub actions 2022-11-03 21:16:34 +01:00
Ilija Tovilo
481a7eb2d4 Improve flaky php-cli server test 2022-09-14 22:56:13 +02:00
Ilija Tovilo
5cb9e72feb Fix pdeathsig test on FreeBSD
For FreeBSD a small usleep is required to make sure the processes have
time to terminate.

Closes GH-9506
2022-09-08 16:07:06 +02:00
Ilija Tovilo
ecc3fc180f Use PDEATHSIG to kill cli-server workers if parent exists
Closes GH-9476
2022-09-08 10:48:20 +02:00
Christoph M. Becker
aff99f5c1f Support sapi/cli/tests/017.phpt on Windows, too
`escapeshellarg()` is pretty useless on Windows, and there is no way to
support multiple lines (i.e. line breaks).  Thus, we use `proc_open()`
instead of `shell_exec()`.

We also remove some apparently superfluous empty lines from the test
expectation; that seems to match libedit behavior on Linux.

Closes GH-9474.
2022-09-05 14:45:05 +02:00
Vedran Miletić
7065a222b7 Respond with HTTP status 405 to DELETE/PUT/PATCH request on a static resource
Co-authored-by: Marin Martuslović <marin.martuslovic@student.uniri.hr>
2022-08-28 13:26:30 +01:00
Vedran Miletić
4f509058a9 Respond without body to HEAD request on a static resource
Co-authored-by: Marin Martuslović <marin.martuslovic@student.uniri.hr>
2022-08-28 13:26:30 +01:00
Jakub Zelenka
0a4a55fd44 Allow to not close stream on rscr dtor in php cli sapi 2022-07-18 10:58:50 +01:00
Arnaud Le Blanc
da1cbd20c3 Merge branch 'PHP-8.1'
* PHP-8.1:
  [ci skip] NEWS
  Fix GH-8952: std streams can not be deliberately closed (#8953)
  intl extension, build fix for icu >= 69.x release. ubrk/ucnv_safeClone had been deprecated in favor of ubrk/ucnv_clone which does not use user provided stacks but remain thread safe.
2022-07-09 23:01:07 +02:00
Arnaud Le Blanc
2dbde18b29 Fix GH-8952: std streams can not be deliberately closed (#8953) 2022-07-09 22:58:02 +02:00
Máté Kocsis
49d3dde211 Declare true return types (#8759) 2022-06-18 22:06:50 +02:00
Derick Rethans
6770158d47 Only warn when an incorrect timezone is set through 'date.timezone' 2022-06-02 09:24:13 +01:00
George Peter Banyard
3bf4098eee Refactor (again) CLI SAPI server_client struct to use zend_string* (#8605)
This time in a way which works under a RC Debug build.
2022-05-30 13:03:23 +01:00
Christoph M. Becker
cf971a1401 Fix potential parallel test conflict
Cf. <https://ci.appveyor.com/project/php/php-src/builds/43644961/job/xibhmsbs8panajy2?fullLog=true#L15770>.
2022-05-24 16:49:19 +02:00
Nikita Popov
82d407b7e0 Revert "Refactor CLI SAPI php_cli_server_client struct to use zend_string (#8522)"
This reverts commit 9b19d90432.

This has broken the ZEND_RC_DEBUG build.
2022-05-21 16:52:21 +02:00