| 1 | tests: match stream error messages with and without the path
|
| 2 |
|
| 3 | PHP 8.6 removed the path parameter from the stream error functions
|
| 4 | (php/php-src#22792, merged as 34c686a5b4e), so warnings are now emitted
|
| 5 | as "readfile(): Failed to open stream" instead of
|
| 6 | "readfile(<url>): Failed to open stream". php-src updated 30 of its own
|
| 7 | .phpt files the same way, so this is intentional, not a regression.
|
| 8 |
|
| 9 | Use %S (zero or more non-newline characters) inside the parentheses so
|
| 10 | the expectation matches both the pre-8.6 and 8.6+ output, keeping the
|
| 11 | test working across all supported PHP versions.
|
| 12 |
|
| 13 | |
| 14 | |
| 15 | @@ -15,8 +15,8 @@
|
| 16 | --EXPECTF--
|
| 17 | Warning: readfile(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in %s
|
| 18 |
|
| 19 | -Warning: readfile(https://github.com/kjdev/php-ext-zstd/raw/master/tests/streaming.zst): %sailed to open stream: no suitable wrapper could be found in %s
|
| 20 | +Warning: readfile(%S): %sailed to open stream: no suitable wrapper could be found in %s
|
| 21 |
|
| 22 | -Warning: readfile(compress.zstd://https://github.com/kjdev/php-ext-zstd/raw/master/tests/streaming.zst): %sailed to open stream: operation failed in %s
|
| 23 | +Warning: readfile(%S): %sailed to open stream: operation failed in %s
|
| 24 |
|
| 25 | ===Done===
|