1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 09:28:21 +02:00
Commit Graph

1210 Commits

Author SHA1 Message Date
Christoph M. Becker 1fcd6cdbb8 Fix #80139: copy_variation5.phpt fails when run on bind mount
This test case is not supposed to run on case-insensitive file system;
just checking for macOS/Windows doesn't cut it.
2020-09-23 12:14:40 +02:00
Christoph M. Becker 821f6bb511 Clean up file created during testing 2020-09-23 11:45:47 +02:00
Christoph M. Becker 05edf64436 Merge branch 'PHP-7.4' into master
* PHP-7.4:
  Fix #76735: Incorrect message in fopen on invalid mode
2020-09-23 11:14:06 +02:00
Christoph M. Becker a89ac98f15 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #76735: Incorrect message in fopen on invalid mode
2020-09-23 10:54:59 +02:00
Christoph M. Becker 2576c57a51 Fix #76735: Incorrect message in fopen on invalid mode
We have to log errors in `stream_opener` callbacks to the wrapper's
error log, because otherwise we may pick up an unrelated `errno` or a
most generic message.

Closes GH-6187.
2020-09-23 10:54:06 +02:00
Nikita Popov 625d8463a4 Consistent error handling for fgetcsv/fputcsv
Normalize the behavior between the file functions and those on
SplFileObject.

Be consistent about throwing regardless of whether the delimiter etc
is empty or has too many characters. I don't think it's worthwhile
to distinguish these cases.

Back when we looked into this originally, there was some hope that
we might want to add support for multiple-character delimiter etc,
but after a cursory look, I really don't think this is going to
happen (for fputcsv maybe, but for fgetcsv this just makes an already
broken function much more complicated.)

Closes GH-6188.
2020-09-23 10:11:04 +02:00
Máté Kocsis e950ca13ea Consolidate the usage of "either" and "one of" in error messages
Closes GH-6173
2020-09-20 19:41:47 +02:00
Nikita Popov c5401854fc Run tidy
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
2020-09-18 14:28:32 +02:00
Máté Kocsis c37a1cd650 Promote a few remaining errors in ext/standard
Closes GH-6110
2020-09-15 14:26:16 +02:00
Nikita Popov 7e339a335e Make null byte error a ValueError
Currently we treat paths with null bytes as a TypeError, which is
incorrect, and rather inconsistent, as we treat empty paths as
ValueError. We do this because the error is generated by zpp and
it's easier to always throw TypeError there.

This changes the zpp implementation to throw a TypeError only if
the type is actually wrong and throw ValueError for null bytes.
The error message is also split accordingly, to be more precise.

Closes GH-6094.
2020-09-08 15:23:23 +02:00
Máté Kocsis 2c96780e1c Fix UNKNOWN default values in ext/standard
Closes GH-6026
2020-09-07 18:58:11 +02:00
Jamie Liu c8093fe94a Fix bug #80018: Tolerate var_dump() printing floats in exponential notation in tests 2020-08-31 09:51:01 +02:00
Nikita Popov ebbe333ede Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix file name clash in test
2020-08-26 12:32:22 +02:00
Nikita Popov 358721bcf7 Fix file name clash in test 2020-08-26 12:32:06 +02:00
Máté Kocsis 2803c8fb8d Add all the missing parameter types to stubs
Closes GH-5955
2020-08-13 14:47:18 +02:00
Máté Kocsis 7aacc705d0 Add many missing closing PHP tags to tests
Closes GH-5958
2020-08-09 22:03:36 +02:00
Christoph M. Becker 0400d07e61 Merge branch 'PHP-7.4' into master
* PHP-7.4:
  Prevent tempnam tests conflicts
2020-08-07 15:06:40 +02:00
Christoph M. Becker fa9bd812fc Prevent tempnam tests conflicts 2020-08-07 15:04:27 +02:00
Nikita Popov 7c8467562d Revert "Explicitly validate popen mode"
This reverts commit ab36540bdd.

Causes a test failure on Windows.
2020-08-06 21:53:13 +02:00
Nikita Popov ab36540bdd Explicitly validate popen mode
To avoid behavior differences due to libc.
2020-08-06 10:26:46 +02:00
George Peter Banyard c3105a1f8d ValueError for empty path in stream code
Closes GH-5902
2020-07-31 13:39:58 +01:00
George Peter Banyard 73e070a614 Refactor user streams to use ZPP class check
Closes GH-5876
2020-07-28 17:12:40 +01:00
Christoph M. Becker 44ad2db15f Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79806: realpath() erroneously resolves link to link
2020-07-28 14:02:25 +02:00
Christoph M. Becker e0ebe56ebf Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79806: realpath() erroneously resolves link to link
2020-07-28 14:00:52 +02:00
Christoph M. Becker c756f82c02 Fix #79806: realpath() erroneously resolves link to link
After resolving reparse points, the path still may be a reparse point;
in that case we have to resolve that reparse point as well.
2020-07-28 13:55:22 +02:00
Christoph M. Becker 592f70bc46 Merge branch 'PHP-7.4'
* PHP-7.4:
  Revert "Fix #79806: realpath() erroneously resolves link to link"
2020-07-27 17:53:23 +02:00
Christoph M. Becker f02507469d Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Revert "Fix #79806: realpath() erroneously resolves link to link"
2020-07-27 17:51:56 +02:00
Christoph M. Becker 1aeff522b8 Revert "Fix #79806: realpath() erroneously resolves link to link"
This reverts commit d5b59b4303.
2020-07-27 17:50:41 +02:00
Christoph M. Becker 54e15dcd6f Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79806: realpath() erroneously resolves link to link
2020-07-27 15:11:39 +02:00
Christoph M. Becker 85a26fef11 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79806: realpath() erroneously resolves link to link
2020-07-27 15:10:22 +02:00
Christoph M. Becker d5b59b4303 Fix #79806: realpath() erroneously resolves link to link
After resolving reparse points, the path still may be a reparse point;
in that case we have to resolve that reparse point as well.
2020-07-27 15:08:39 +02:00
Christoph M. Becker 371e29ef3a Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix tests regarding negative fileinode()
2020-07-15 16:39:54 +02:00
Christoph M. Becker dd1d1191e1 Fix tests regarding negative fileinode()
The results of `fileinode()` may be negative due to wrap-around
behavior (at least on Windows as of PHP 7.4.0).
2020-07-15 16:38:38 +02:00
Christoph M. Becker 99c78963c8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test for x86 Windows
2020-07-13 10:53:55 +02:00
Christoph M. Becker e2c17cef4b Fix test for x86 Windows
`st_dev` deliberately overflows on such systems, cf.
<http://svn.php.net/viewvc?view=revision&revision=350100>.
2020-07-13 10:52:26 +02:00
Christoph M. Becker 2ad75ba784 Fix test cases
These tests are not supposed to check the result of `fclose(false)`.
2020-07-10 18:27:18 +02:00
Christoph M. Becker 9a5695bfc3 Merge branch 'PHP-7.4'
* PHP-7.4:
  Enable further ext/standard/tests/file tests on Windows
2020-07-10 13:42:13 +02:00
Christoph M. Becker 99aa5484e2 Enable further ext/standard/tests/file tests on Windows 2020-07-10 13:36:41 +02:00
Christoph M. Becker ef1de5e973 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix skip reasons
2020-07-10 11:28:28 +02:00
Christoph M. Becker 7edc5e5e39 Fix skip reasons
These tests fail on Windows for different reasons, but not because
symlinks, links, or lstat() would not be supported on Windows
generally.
2020-07-10 11:26:48 +02:00
Christoph M. Becker bdcda50304 Merge branch 'PHP-7.4'
* PHP-7.4:
  Enable symlink_link_linkinfo_is_link_* tests on Windows
2020-07-10 10:10:30 +02:00
Christoph M. Becker 68293b19d4 Enable symlink_link_linkinfo_is_link_* tests on Windows
We mark symlink_link_linkinfo_is_link_error2.phpt as XFAIL on Windows
ZTS.  Several Windows API file system functions ignore trailing spaces
in absolute filenames after the final directory separator, which causes
`link(' ', $link)` to actually call `CreateHardLink()` which then
fails, because linking folders is not supported.  However, with NTS
builds (as well as on other systems), the $target is found to not
exist, so the function fails without actually attempting to create the
link.  This needs further investigation.
2020-07-10 10:08:12 +02:00
Ilija Tovilo 9fa1d13301 Implement match expression
RFC: https://wiki.php.net/rfc/match_expression_v2

Closes GH-5371.
2020-07-09 23:52:17 +02:00
Christoph M. Becker e33dd6ab1f Merge branch 'PHP-7.4'
* PHP-7.4:
  Prevent parallel test conflicts
2020-07-09 12:36:57 +02:00
Christoph M. Becker db484b612d Prevent parallel test conflicts
Both tests used the same folder, which could clash in case the tests
are run simultaneously.
2020-07-09 12:35:31 +02:00
Christoph M. Becker 62f05ac01f Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix tests for x86 Windows
2020-07-03 10:39:00 +02:00
Christoph M. Becker a58d865f65 Fix tests for x86 Windows
`st_dev` deliberately overflows on such systems, cf.
<http://svn.php.net/viewvc?view=revision&revision=350100>.
2020-07-03 10:37:40 +02:00
Christoph M. Becker 807d6c0418 Merge branch 'PHP-7.4'
* PHP-7.4:
  Skip test if SeCreateSymbolicLinkPrivilege is not given
2020-07-03 09:10:37 +02:00
Christoph M. Becker 1b961c0c42 Skip test if SeCreateSymbolicLinkPrivilege is not given 2020-07-03 09:08:59 +02:00
Christoph M. Becker e2be50001b Merge branch 'PHP-7.4'
* PHP-7.4:
  Enable readlink_realpath_* tests on Windows
2020-07-02 18:31:43 +02:00