Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
2fdf3d8
ext/bcmath: applied fixers to improve test robustness
NickSdot Jul 29, 2026
74dcb2e
ext/bz2: applied fixers to improve test robustness
NickSdot Jul 29, 2026
6ce461f
ext/calendar: applied fixers to improve test robustness
NickSdot Jul 29, 2026
9099c91
ext/curl: applied fixers to improve test robustness
NickSdot Jul 29, 2026
cd9bb8b
ext/date: applied fixers to improve test robustness
NickSdot Jul 29, 2026
1dfd901
ext/dba: applied fixers to improve test robustness
NickSdot Jul 29, 2026
6323744
ext/dom: applied fixers to improve test robustness
NickSdot Jul 29, 2026
560b4aa
ext/exif: applied fixers to improve test robustness
NickSdot Jul 29, 2026
45828f0
ext/ffi: applied fixers to improve test robustness
NickSdot Jul 29, 2026
fd2d7ce
ext/fileinfo: applied fixers to improve test robustness
NickSdot Jul 29, 2026
57616f6
ext/filter: applied fixers to improve test robustness
NickSdot Jul 29, 2026
7a3dbbe
ext/ftp: applied fixers to improve test robustness
NickSdot Jul 29, 2026
696f0d2
ext/gd: applied fixers to improve test robustness
NickSdot Jul 29, 2026
460ae39
ext/gettext: applied fixers to improve test robustness
NickSdot Jul 29, 2026
4297442
ext/gmp: applied fixers to improve test robustness
NickSdot Jul 29, 2026
1e0175d
ext/hash: applied fixers to improve test robustness
NickSdot Jul 29, 2026
6168edd
ext/iconv: applied fixers to improve test robustness
NickSdot Jul 29, 2026
ce8eefd
ext/intl: applied fixers to improve test robustness
NickSdot Jul 29, 2026
589d7a1
ext/json: applied fixers to improve test robustness
NickSdot Jul 29, 2026
358dffd
ext/ldap: applied fixers to improve test robustness
NickSdot Jul 29, 2026
cd917f5
ext/libxml: applied fixers to improve test robustness
NickSdot Jul 29, 2026
2d6772b
ext/mbstring: applied fixers to improve test robustness
NickSdot Jul 29, 2026
0116ef8
ext/mysqli: applied fixers to improve test robustness
NickSdot Jul 29, 2026
ef3460a
ext/odbc: applied fixers to improve test robustness
NickSdot Jul 29, 2026
0827921
ext/opcache: applied fixers to improve test robustness
NickSdot Jul 29, 2026
334a02c
ext/openssl: applied fixers to improve test robustness
NickSdot Jul 29, 2026
0c413df
ext/pcntl: applied fixers to improve test robustness
NickSdot Jul 29, 2026
fc285b9
ext/pcre: applied fixers to improve test robustness
NickSdot Jul 29, 2026
315ba87
ext/pdo: applied fixers to improve test robustness
NickSdot Jul 29, 2026
0176505
ext/pdo_sqlite: applied fixers to improve test robustness
NickSdot Jul 29, 2026
872fa27
ext/pgsql: applied fixers to improve test robustness
NickSdot Jul 29, 2026
3a77a1a
ext/phar: applied fixers to improve test robustness
NickSdot Jul 29, 2026
3d72cfd
ext/posix: applied fixers to improve test robustness
NickSdot Jul 29, 2026
dd58f4a
ext/random: applied fixers to improve test robustness
NickSdot Jul 29, 2026
875a5b5
ext/readline: applied fixers to improve test robustness
NickSdot Jul 29, 2026
c9a1096
ext/reflection: applied fixers to improve test robustness
NickSdot Jul 29, 2026
8f020ce
ext/session: applied fixers to improve test robustness
NickSdot Jul 29, 2026
ff31198
ext/shmop: applied fixers to improve test robustness
NickSdot Jul 29, 2026
84a96da
ext/simplexml: applied fixers to improve test robustness
NickSdot Jul 29, 2026
ab53b74
ext/snmp: applied fixers to improve test robustness
NickSdot Jul 29, 2026
098ae4d
ext/soap: applied fixers to improve test robustness
NickSdot Jul 29, 2026
5af07e0
ext/sockets: applied fixers to improve test robustness
NickSdot Jul 29, 2026
326acbc
ext/sodium: applied fixers to improve test robustness
NickSdot Jul 29, 2026
29e3028
ext/spl: applied fixers to improve test robustness
NickSdot Jul 29, 2026
3513bb7
ext/sqlite3: applied fixers to improve test robustness
NickSdot Jul 29, 2026
4da598a
ext/standard: applied fixers to improve test robustness
NickSdot Jul 29, 2026
3beb047
ext/sysvmsg: applied fixers to improve test robustness
NickSdot Jul 29, 2026
66ba2a1
ext/sysvshm: applied fixers to improve test robustness
NickSdot Jul 29, 2026
130427e
ext/tidy: applied fixers to improve test robustness
NickSdot Jul 29, 2026
f861a9f
ext/tokenizer: applied fixers to improve test robustness
NickSdot Jul 29, 2026
ab990d2
ext/uri: applied fixers to improve test robustness
NickSdot Jul 29, 2026
a52fd29
ext/xml: applied fixers to improve test robustness
NickSdot Jul 29, 2026
65e3ee1
ext/xmlreader: applied fixers to improve test robustness
NickSdot Jul 29, 2026
853e767
ext/xmlwriter: applied fixers to improve test robustness
NickSdot Jul 29, 2026
7361a10
ext/zend_test: applied fixers to improve test robustness
NickSdot Jul 29, 2026
2855305
ext/zip: applied fixers to improve test robustness
NickSdot Jul 29, 2026
6ed3679
ext/zlib: applied fixers to improve test robustness
NickSdot Jul 29, 2026
fe21aad
Zend: applied fixers to improve test robustness
NickSdot Jul 29, 2026
4f9b011
tests: applied fixers to improve test robustness
NickSdot Jul 29, 2026
7bd1b03
sapi/cli: applied fixers to improve test robustness
NickSdot Jul 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 6 additions & 6 deletions Zend/tests/access_modifiers/access_modifiers_008.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@ class B2 extends A {
try {
echo A::mp() . "\n";
} catch (\Throwable $e) {
echo $e->getMessage() . "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}
echo B1::ma() . "\n"; // protected method defined also in A
try {
echo B1::mp() . "\n"; // protected method defined also in A but as private
} catch (\Throwable $e) {
echo $e->getMessage() . "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}
try {
echo B1::mb() . "\n";
} catch (\Throwable $e) {
echo $e->getMessage() . "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}
}
}
Expand All @@ -54,7 +54,7 @@ B2::test();
?>
--EXPECT--
A::ma()
Call to private method A::mp() from scope B2
Error: Call to private method A::mp() from scope B2
B1::ma()
Call to protected method B1::mp() from scope B2
Call to protected method B1::mb() from scope B2
Error: Call to protected method B1::mp() from scope B2
Error: Call to protected method B1::mb() from scope B2
4 changes: 2 additions & 2 deletions Zend/tests/add_002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $o->prop = "value";
try {
var_dump($a + $o);
} catch (Error $e) {
echo "\nException: " . $e->getMessage() . "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

$c = $a + $o;
Expand All @@ -20,7 +20,7 @@ var_dump($c);
echo "Done\n";
?>
--EXPECTF--
Exception: Unsupported operand types: array + stdClass
TypeError: Unsupported operand types: array + stdClass

Fatal error: Uncaught TypeError: Unsupported operand types: array + stdClass in %s:%d
Stack trace:
Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/add_003.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $o->prop = "value";
try {
var_dump($o + $a);
} catch (Error $e) {
echo "\nException: " . $e->getMessage() . "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

$c = $o + $a;
Expand All @@ -20,7 +20,7 @@ var_dump($c);
echo "Done\n";
?>
--EXPECTF--
Exception: Unsupported operand types: stdClass + array
TypeError: Unsupported operand types: stdClass + array

Fatal error: Uncaught TypeError: Unsupported operand types: stdClass + array in %s:%d
Stack trace:
Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/add_004.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $a = array(1,2,3);
try {
var_dump($a + 5);
} catch (Error $e) {
echo "\nException: " . $e->getMessage() . "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

$c = $a + 5;
Expand All @@ -17,7 +17,7 @@ var_dump($c);
echo "Done\n";
?>
--EXPECTF--
Exception: Unsupported operand types: array + int
TypeError: Unsupported operand types: array + int

Fatal error: Uncaught TypeError: Unsupported operand types: array + int in %s:%d
Stack trace:
Expand Down
8 changes: 4 additions & 4 deletions Zend/tests/add_006.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ try {
$c = $i + $s1;
var_dump($c);
} catch (\TypeError $e) {
echo $e->getMessage() . \PHP_EOL;
echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
$c = $i + $s2;
var_dump($c);
Expand All @@ -30,7 +30,7 @@ try {
$c = $s1 + $i;
var_dump($c);
} catch (\TypeError $e) {
echo $e->getMessage() . \PHP_EOL;
echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}

$c = $s2 + $i;
Expand All @@ -45,13 +45,13 @@ var_dump($c);
echo "Done\n";
?>
--EXPECTF--
Unsupported operand types: int + string
TypeError: Unsupported operand types: int + string

Warning: A non-numeric value encountered in %s on line %d
int(951858)
int(48550510)
float(75661.68)
Unsupported operand types: string + int
TypeError: Unsupported operand types: string + int

Warning: A non-numeric value encountered in %s on line %d
int(951858)
Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/add_007.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $s1 = "some string";
try {
var_dump($a + $s1);
} catch (Error $e) {
echo "\nException: " . $e->getMessage() . "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

$c = $a + $s1;
Expand All @@ -19,7 +19,7 @@ var_dump($c);
echo "Done\n";
?>
--EXPECTF--
Exception: Unsupported operand types: array + string
TypeError: Unsupported operand types: array + string

Fatal error: Uncaught TypeError: Unsupported operand types: array + string in %s:%d
Stack trace:
Expand Down
10 changes: 5 additions & 5 deletions Zend/tests/arg_unpack/invalid_type.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@ function test(...$args) {
try {
test(...null);
} catch (Error $e) {
echo $e::class . ": " . $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}
try {
test(...42);
} catch (Error $e) {
echo $e::class . ": " . $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}
try {
test(...new stdClass);
} catch (Error $e) {
echo $e::class . ": " . $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

try {
test(1, 2, 3, ..."foo", ...[4, 5]);
} catch (Error $e) {
echo $e::class . ": " . $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}
try {
test(1, 2, 3, ...new StdClass, ...3.14, ...[4, 5]);
} catch (Error $e) {
echo $e::class . ": " . $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

?>
Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/arg_unpack/non_integer_keys.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ function gen() {
try {
foo(...gen());
} catch (Error $ex) {
echo "Exception: " . $ex->getMessage() . "\n";
echo $ex::class, ': ', $ex->getMessage(), "\n";
}

?>
--EXPECT--
Exception: Keys must be of type int|string during argument unpacking
Error: Keys must be of type int|string during argument unpacking
4 changes: 2 additions & 2 deletions Zend/tests/arg_unpack/string_keys.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ set_error_handler(function($errno, $errstr) {
try {
var_dump(...new ArrayIterator([1, 2, "foo" => 3, 4]));
} catch (Error $ex) {
var_dump($ex->getMessage());
echo $ex::class, ': ', $ex->getMessage(), "\n";
}

?>
--EXPECT--
string(68) "Cannot use positional argument after named argument during unpacking"
Error: Cannot use positional argument after named argument during unpacking
8 changes: 4 additions & 4 deletions Zend/tests/arg_unpack/traversable_throwing_exception.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ function gen() {

try {
test(1, 2, ...new Foo, ...[3, 4]);
} catch (Exception $e) { var_dump($e->getMessage()); }
} catch (Exception $e) { echo $e::class, ': ', $e->getMessage(), "\n"; }

try {
test(1, 2, ...gen(), ...[3, 4]);
} catch (Exception $e) { var_dump($e->getMessage()); }
} catch (Exception $e) { echo $e::class, ': ', $e->getMessage(), "\n"; }

?>
--EXPECT--
string(11) "getIterator"
string(3) "gen"
Exception: getIterator
Exception: gen
8 changes: 4 additions & 4 deletions Zend/tests/array_literal_next_element_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ try {
$array = [$i => 42, new stdClass];
var_dump($array);
} catch (Error $e) {
echo $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

function test($x = [PHP_INT_MAX => 42, "foo"]) {}
try {
test();
} catch (Error $e) {
echo $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

?>
--EXPECT--
Cannot add element to the array as the next element is already occupied
Cannot add element to the array as the next element is already occupied
Error: Cannot add element to the array as the next element is already occupied
Error: Cannot add element to the array as the next element is already occupied
8 changes: 4 additions & 4 deletions Zend/tests/array_merge_recursive_next_key_overflow.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ try {
['' => [null]],
);
} catch (Throwable $e) {
echo $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

try {
Expand All @@ -17,9 +17,9 @@ try {
['foo' => str_repeat('a', 2)],
);
} catch (Throwable $e) {
echo $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
--EXPECT--
Cannot add element to the array as the next element is already occupied
Cannot add element to the array as the next element is already occupied
Error: Cannot add element to the array as the next element is already occupied
Error: Cannot add element to the array as the next element is already occupied
12 changes: 6 additions & 6 deletions Zend/tests/array_unpack/already_occupied.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@ $arr = [1, 2, 3];
try {
var_dump([PHP_INT_MAX-1 => 0, ...$arr]);
} catch (Error $e) {
echo $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

try {
var_dump([PHP_INT_MAX-1 => 0, ...[1, 2, 3]]);
} catch (Error $e) {
echo $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

const ARR = [1, 2, 3];
function test($x = [PHP_INT_MAX-1 => 0, ...ARR]) {}
try {
test();
} catch (Error $e) {
echo $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

?>
--EXPECT--
Cannot add element to the array as the next element is already occupied
Cannot add element to the array as the next element is already occupied
Cannot add element to the array as the next element is already occupied
Error: Cannot add element to the array as the next element is already occupied
Error: Cannot add element to the array as the next element is already occupied
Error: Cannot add element to the array as the next element is already occupied
4 changes: 2 additions & 2 deletions Zend/tests/array_unpack/classes.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var_dump(C::$bar);
try {
var_dump(D::A);
} catch (Error $ex) {
echo "Exception: " . $ex->getMessage() . "\n";
echo $ex::class, ': ', $ex->getMessage(), "\n";
}
?>
--EXPECT--
Expand All @@ -44,4 +44,4 @@ array(3) {
[2]=>
int(3)
}
Exception: Cannot declare self-referencing constant self::B
Error: Cannot declare self-referencing constant self::B
4 changes: 2 additions & 2 deletions Zend/tests/array_unpack/non_integer_keys.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ function gen() {
try {
[...gen()];
} catch (Error $ex) {
echo "Exception: " . $ex->getMessage() . "\n";
echo $ex::class, ': ', $ex->getMessage(), "\n";
}

?>
--EXPECT--
Exception: Keys must be of type int|string during array unpacking
Error: Keys must be of type int|string during array unpacking
8 changes: 4 additions & 4 deletions Zend/tests/arrow_functions/006.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ var_dump($int_fn($var));
try {
$int_fn("foo");
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

$varargs = fn(?int... $args): array => $args;
var_dump($varargs(20, null, 30));
try {
$varargs(40, "foo");
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

?>
--EXPECTF--
int(2)
int(10)
{closure:%s:%d}(): Argument #1 ($x) must be of type int, string given, called in %s on line %d
TypeError: {closure:%s:%d}(): Argument #1 ($x) must be of type int, string given, called in %s on line %d
array(3) {
[0]=>
int(20)
Expand All @@ -41,4 +41,4 @@ array(3) {
[2]=>
int(30)
}
{closure:%s:%d}(): Argument #2 must be of type ?int, string given, called in %s on line %d
TypeError: {closure:%s:%d}(): Argument #2 must be of type ?int, string given, called in %s on line %d
8 changes: 4 additions & 4 deletions Zend/tests/arrow_functions/007.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ zend.assertions=1
try {
assert((fn() => false)());
} catch (AssertionError $e) {
echo 'assert(): ', $e->getMessage(), ' failed', PHP_EOL;
echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}

try {
assert((fn&(int... $args): ?bool => $args[0])(false));
} catch (AssertionError $e) {
echo 'assert(): ', $e->getMessage(), ' failed', PHP_EOL;
echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}

?>
--EXPECT--
assert(): assert((fn() => false)()) failed
assert(): assert((fn&(int ...$args): ?bool => $args[0])(false)) failed
AssertionError: assert((fn() => false)())
AssertionError: assert((fn&(int ...$args): ?bool => $args[0])(false))
8 changes: 4 additions & 4 deletions Zend/tests/arrow_functions/gh7900.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ $x = fn(): never => throw new \Exception('Here');
try {
var_dump($x());
} catch (\Exception $e) {
echo $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

try {
assert((fn(): never => 42) && false);
} catch (\Error $e) {
echo $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

?>
--EXPECT--
Here
assert((fn(): never => 42) && false)
Exception: Here
AssertionError: assert((fn(): never => 42) && false)
Loading
Loading