Merge branch 'PHP-8.2' into PHP-8.3

* PHP-8.2:
  Use EXTENSIONS instead of SKIPIF sections in *.phpt
This commit is contained in:
Peter Kokot 2024-01-31 11:20:44 +01:00
commit 8d5fc8d23f
25 changed files with 57 additions and 72 deletions

View file

@ -1,7 +1,7 @@
--TEST-- --TEST--
Calling bzerr* functions on non-bz2 streams Calling bzerr* functions on non-bz2 streams
--SKIPIF-- --EXTENSIONS--
<?php if (!extension_loaded("bz2")) print "skip"; ?> bz2
--FILE-- --FILE--
<?php <?php
$f = fopen(__FILE__, 'r'); $f = fopen(__FILE__, 'r');

View file

@ -1,8 +1,9 @@
--TEST-- --TEST--
Bug GH-8778 (Integer arithmethic with large number variants fails) Bug GH-8778 (Integer arithmethic with large number variants fails)
--EXTENSIONS--
com_dotnet
--SKIPIF-- --SKIPIF--
<?php <?php
if (!extension_loaded("com_dotnet")) die("skip com_dotnet extension not available");
if (PHP_INT_SIZE < 8) die("skip for 64bit only"); if (PHP_INT_SIZE < 8) die("skip for 64bit only");
?> ?>
--FILE-- --FILE--

View file

@ -1,9 +1,7 @@
--TEST-- --TEST--
Bug #79971 (special character is breaking the path in xml function) Bug #79971 (special character is breaking the path in xml function)
--SKIPIF-- --EXTENSIONS--
<?php dom
if (!extension_loaded('dom')) die('skip dom extension not available');
?>
--FILE-- --FILE--
<?php <?php
$imp = new DOMImplementation; $imp = new DOMImplementation;

View file

@ -1,10 +1,11 @@
--TEST-- --TEST--
GHSA-3qrf-m4j2-pcrr (libxml global state entity loader bypass) GHSA-3qrf-m4j2-pcrr (libxml global state entity loader bypass)
--EXTENSIONS--
dom
libxml
zend_test
--SKIPIF-- --SKIPIF--
<?php <?php
if (!extension_loaded('libxml')) die('skip libxml extension not available');
if (!extension_loaded('dom')) die('skip dom extension not available');
if (!extension_loaded('zend-test')) die('skip zend-test extension not available');
if (!function_exists('zend_test_override_libxml_global_state')) die('skip not for Windows'); if (!function_exists('zend_test_override_libxml_global_state')) die('skip not for Windows');
?> ?>
--FILE-- --FILE--

View file

@ -1,9 +1,7 @@
--TEST-- --TEST--
Bug #77221 (Request IP address filter flag to exclude non-global IP addresses) Bug #77221 (Request IP address filter flag to exclude non-global IP addresses)
--SKIPIF-- --EXTENSIONS--
<?php filter
if (!extension_loaded('filter')) die("skip filter extension not available");
?>
--FILE-- --FILE--
<?php <?php

View file

@ -1,9 +1,7 @@
--TEST-- --TEST--
Bug #81122 (SSRF bypass in FILTER_VALIDATE_URL) Bug #81122 (SSRF bypass in FILTER_VALIDATE_URL)
--SKIPIF-- --EXTENSIONS--
<?php filter
if (!extension_loaded('filter')) die("skip filter extension not available");
?>
--FILE-- --FILE--
<?php <?php
$urls = [ $urls = [

View file

@ -1,9 +1,7 @@
--TEST-- --TEST--
Bug GH-10647 (Spoofchecker::isSuspicious $errorCode always null) Bug GH-10647 (Spoofchecker::isSuspicious $errorCode always null)
--SKIPIF-- --EXTENSIONS--
<?php intl
if (!extension_loaded("intl")) die("skip intl extension not available");
?>
--FILE-- --FILE--
<?php <?php
$error = 123; $error = 123;

View file

@ -1,9 +1,7 @@
--TEST-- --TEST--
Bug GH-8364 (msgfmt_format $values may not support references) Bug GH-8364 (msgfmt_format $values may not support references)
--SKIPIF-- --EXTENSIONS--
<?php intl
if (!extension_loaded("intl")) die("skip intl extension not available");
?>
--FILE-- --FILE--
<?php <?php
$formatter = new MessageFormatter('en', 'translate {0}'); $formatter = new MessageFormatter('en', 'translate {0}');

View file

@ -1,9 +1,7 @@
--TEST-- --TEST--
Bug #72809 (Locale::lookup() wrong result with canonicalize option) Bug #72809 (Locale::lookup() wrong result with canonicalize option)
--SKIPIF-- --EXTENSIONS--
<?php intl
if (!extension_loaded('intl')) die("skip intl extension not avaible");
?>
--FILE-- --FILE--
<?php <?php
var_dump( var_dump(

View file

@ -1,9 +1,7 @@
--TEST-- --TEST--
GH-8086 (mb_send_mail() function not working correctly in PHP 8.x) GH-8086 (mb_send_mail() function not working correctly in PHP 8.x)
--SKIPIF-- --EXTENSIONS--
<?php mbstring
if (!extension_loaded("mbstring")) die("skip mbstring extension not available");
?>
--INI-- --INI--
sendmail_path={MAIL:{PWD}/gh8086.eml} sendmail_path={MAIL:{PWD}/gh8086.eml}
mail.mixed_lf_and_crlf=on mail.mixed_lf_and_crlf=on

View file

@ -1,9 +1,7 @@
--TEST-- --TEST--
Bug #50293 (Several openssl functions ignore the VCWD) Bug #50293 (Several openssl functions ignore the VCWD)
--SKIPIF-- --EXTENSIONS--
<?php openssl
if (!extension_loaded("openssl")) die("skip openssl not loaded");
?>
--FILE-- --FILE--
<?php <?php
$cert = "file://" . __DIR__ . "/cert.crt"; $cert = "file://" . __DIR__ . "/cert.crt";

View file

@ -1,9 +1,7 @@
--TEST-- --TEST--
GH-9339: oid_file path check warning contains uninitialized path GH-9339: oid_file path check warning contains uninitialized path
--SKIPIF-- --EXTENSIONS--
<?php openssl
if (!extension_loaded("openssl")) die("skip openssl not loaded");
?>
--FILE-- --FILE--
<?php <?php
$configCode = <<<CONFIG $configCode = <<<CONFIG

View file

@ -1,8 +1,9 @@
--TEST-- --TEST--
GH-8626: PDOStatement->execute() failed, then execute successfully, errorInfo() information is incorrect GH-8626: PDOStatement->execute() failed, then execute successfully, errorInfo() information is incorrect
--EXTENSIONS--
pdo
--SKIPIF-- --SKIPIF--
<?php <?php
if (!extension_loaded('pdo')) die('skip');
$dir = getenv('REDIR_TEST_DIR'); $dir = getenv('REDIR_TEST_DIR');
if (false == $dir) die('skip no driver'); if (false == $dir) die('skip no driver');
require_once $dir . 'pdo_test.inc'; require_once $dir . 'pdo_test.inc';

View file

@ -1,8 +1,10 @@
--TEST-- --TEST--
GitHub #7723 (Fix error message allocation of PDO PgSQL) GitHub #7723 (Fix error message allocation of PDO PgSQL)
--EXTENSIONS--
pdo
pdo_pgsql
--SKIPIF-- --SKIPIF--
<?php <?php
if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
require __DIR__ . '/config.inc'; require __DIR__ . '/config.inc';
PDOTest::skip(); PDOTest::skip();

View file

@ -1,8 +1,10 @@
--TEST-- --TEST--
Bug GH-9411 (PgSQL large object resource is incorrectly closed) Bug GH-9411 (PgSQL large object resource is incorrectly closed)
--EXTENSIONS--
pdo
pdo_pgsql
--SKIPIF-- --SKIPIF--
<?php <?php
if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
require __DIR__ . '/config.inc'; require __DIR__ . '/config.inc';
require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
PDOTest::skip(); PDOTest::skip();

View file

@ -1,7 +1,7 @@
--TEST-- --TEST--
GHSA-jqcx-ccgc-xwhv (Buffer overflow and overread in phar_dir_read()) GHSA-jqcx-ccgc-xwhv (Buffer overflow and overread in phar_dir_read())
--SKIPIF-- --EXTENSIONS--
<?php if (!extension_loaded("phar")) die("skip"); ?> phar
--INI-- --INI--
phar.readonly=0 phar.readonly=0
--FILE-- --FILE--

View file

@ -1,8 +1,9 @@
--TEST-- --TEST--
Bug #81211 (Symlinks are followed when creating PHAR archive) Bug #81211 (Symlinks are followed when creating PHAR archive)
--EXTENSIONS--
phar
--SKIPIF-- --SKIPIF--
<?php <?php
if (!extension_loaded('phar')) die('skip phar extension is not available');
if (PHP_OS_FAMILY === 'Windows') { if (PHP_OS_FAMILY === 'Windows') {
if (false === include __DIR__ . '/../../standard/tests/file/windows_links/common.inc') { if (false === include __DIR__ . '/../../standard/tests/file/windows_links/common.inc') {
die('skip windows_links/common.inc is not available'); die('skip windows_links/common.inc is not available');

View file

@ -1,10 +1,11 @@
--TEST-- --TEST--
GHSA-3qrf-m4j2-pcrr (libxml global state entity loader bypass) GHSA-3qrf-m4j2-pcrr (libxml global state entity loader bypass)
--EXTENSIONS--
libxml
simplexml
zend_test
--SKIPIF-- --SKIPIF--
<?php <?php
if (!extension_loaded('libxml')) die('skip libxml extension not available');
if (!extension_loaded('simplexml')) die('skip simplexml extension not available');
if (!extension_loaded('zend-test')) die('skip zend-test extension not available');
if (!function_exists('zend_test_override_libxml_global_state')) die('skip not for Windows'); if (!function_exists('zend_test_override_libxml_global_state')) die('skip not for Windows');
?> ?>
--FILE-- --FILE--

View file

@ -1,10 +1,11 @@
--TEST-- --TEST--
GHSA-3qrf-m4j2-pcrr (libxml global state entity loader bypass) GHSA-3qrf-m4j2-pcrr (libxml global state entity loader bypass)
--EXTENSIONS--
libxml
xmlreader
zend_test
--SKIPIF-- --SKIPIF--
<?php <?php
if (!extension_loaded('libxml')) die('skip libxml extension not available');
if (!extension_loaded('xmlreader')) die('skip xmlreader extension not available');
if (!extension_loaded('zend-test')) die('skip zend-test extension not available');
if (!function_exists('zend_test_override_libxml_global_state')) die('skip not for Windows'); if (!function_exists('zend_test_override_libxml_global_state')) die('skip not for Windows');
?> ?>
--FILE-- --FILE--

View file

@ -2,7 +2,7 @@
Observer: PDO::sqliteCreateFunction() can be observed Observer: PDO::sqliteCreateFunction() can be observed
--EXTENSIONS-- --EXTENSIONS--
zend_test zend_test
PDO pdo
pdo_sqlite pdo_sqlite
--INI-- --INI--
zend_test.observer.enabled=1 zend_test.observer.enabled=1

View file

@ -1,9 +1,7 @@
--TEST-- --TEST--
Bug #77978 (Dirname ending in colon unzips to wrong dir) Bug #77978 (Dirname ending in colon unzips to wrong dir)
--SKIPIF-- --EXTENSIONS--
<?php zip
if (!extension_loaded("zip")) die("skip zip extension not available");
?>
--FILE-- --FILE--
<?php <?php
$file = __DIR__ . "/bug77978.zip"; $file = __DIR__ . "/bug77978.zip";

View file

@ -1,8 +1,9 @@
--TEST-- --TEST--
Bug #80833 (ZipArchive::getStream doesn't use setPassword) Bug #80833 (ZipArchive::getStream doesn't use setPassword)
--EXTENSIONS--
zip
--SKIPIF-- --SKIPIF--
<?php <?php
if (!extension_loaded('zip')) die("skip zip extension not available");
if (!method_exists('ZipArchive', 'setEncryptionName')) die('skip encryption not supported'); if (!method_exists('ZipArchive', 'setEncryptionName')) die('skip encryption not supported');
?> ?>
--FILE-- --FILE--

View file

@ -1,9 +1,7 @@
--TEST-- --TEST--
Bug #81420 (ZipArchive::extractTo extracts outside of destination) Bug #81420 (ZipArchive::extractTo extracts outside of destination)
--SKIPIF-- --EXTENSIONS--
<?php zip
if (!extension_loaded("zip")) die("skip zip extension not available");
?>
--FILE-- --FILE--
<?php <?php
$zip = new ZipArchive(); $zip = new ZipArchive();

View file

@ -1,9 +1,7 @@
--TEST-- --TEST--
Bug #81490 (ZipArchive::extractTo() may leak memory) Bug #81490 (ZipArchive::extractTo() may leak memory)
--SKIPIF-- --EXTENSIONS--
<?php zip
if (!extension_loaded("zip")) die("skip zip extension not available");
?>
--FILE-- --FILE--
<?php <?php
$zip = new ZipArchive(); $zip = new ZipArchive();

View file

@ -1,9 +1,7 @@
--TEST-- --TEST--
Bug GH-8781 (ZipArchive deletes zip file with no contents) Bug GH-8781 (ZipArchive deletes zip file with no contents)
--SKIPIF-- --EXTENSIONS--
<?php zip
if (!extension_loaded('zip')) die('skip zip extension not available');
?>
--FILE-- --FILE--
<?php <?php
touch($file = __DIR__ . '/bug_gh8781.zip'); touch($file = __DIR__ . '/bug_gh8781.zip');