Skip to content

RFC: Deprecate type juggling to and from bool for function type juggling context #18879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 38 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
be5368a
Zend/zend_execute: make some functions private
Girgias Jun 19, 2025
6674845
Deprecate type juggling to/from bool for function context
Girgias Jun 19, 2025
7f46548
Fix run-tests
Girgias Jul 1, 2025
6bdd8f6
fix some tests
Girgias Jun 19, 2025
fd57f96
Fix
Girgias Jun 20, 2025
efa5b72
tests: Fix tests affected by bool type juggling deprecation
Girgias Jun 20, 2025
3c5514f
ext/date: Fix tests
Girgias Jun 20, 2025
18ed668
ext/phar: Fix tests [WIP]
Girgias Jun 20, 2025
e92ed23
ext/reflection: Remove ZPP tests and use bool
Girgias Jun 20, 2025
c3593e6
ext/standard/tests/array: Fix tests and remove ZPP tests
Girgias Jun 20, 2025
22c05f6
ext/standard/tests/file: Fix tests and remove ZPP tests
Girgias Jun 20, 2025
fe2b149
ext/standard/tests/general_functions: Fix tests and remove ZPP tests
Girgias Jun 21, 2025
b803a47
ext/standard/tests/http: Fix tests
Girgias Jun 21, 2025
15d89dd
ext/standard/tests/math: Fix tests and remove ZPP tests
Girgias Jun 21, 2025
7d21d73
ext/standard/tests/misc: Fix tests
Girgias Jun 21, 2025
6ea2a4e
ext/standard/tests/network: Fix tests
Girgias Jun 21, 2025
cda9234
ext/standard/tests/url: Fix tests
Girgias Jun 21, 2025
8c78400
ext/standard/tests/streams: Fix tests
Girgias Jun 21, 2025
b76cf4e
ext/standard/tests/strings: W.I.P. Fix tests and remove ZPP tests
Girgias Jun 21, 2025
d942130
ext/json: Remove bool type coercions in tests
Girgias Jun 21, 2025
5a68bd4
ext/posix: Fix manual ZPP tests
Girgias Jun 23, 2025
eb39385
sapi/cli: Remove bool type coercions in tests
Girgias Jun 23, 2025
3a6984e
ext/gd: Remove bool type coercions in tests and ZPP tests
Girgias Jun 24, 2025
6ab02a9
ext/iconv: Remove bool type coercions in tests
Girgias Jun 24, 2025
e541e6b
ext/curl: Remove bool type coercions in tests
Girgias Jun 24, 2025
6c29261
ext/openssl: Remove bool type coercions in tests
Girgias Jun 24, 2025
91fa608
ext/intl: Remove bool type coercions in tests
Girgias Jun 24, 2025
71cfd2c
ext/intl: Fix tests
Girgias Jun 24, 2025
5b8c837
Fix FPM?
Girgias Jun 24, 2025
9cf851e
mbstring fix
Girgias Jun 24, 2025
f1bd5bf
image fix
Girgias Jun 24, 2025
a0b1f30
ext/gettext: Remove bool type coercions in tests
Girgias Jun 24, 2025
8417c2a
ext/pdo_dblib: Remove bool type coercions in tests
Girgias Jun 24, 2025
8acff1b
ext/pdo_pgsql: Remove bool type coercions in tests
Girgias Jun 24, 2025
c251952
ext/mysqli: Remove bool type coercions in tests
Girgias Jun 24, 2025
10cbc92
ext/snmp: Remove bool type coercions in tests
Girgias Jun 24, 2025
27566c5
Sockets win
Girgias Jun 25, 2025
e1a3dc6
Add deprecation to EXPECTF temporarily for Zend test that relies on S…
Girgias Jul 1, 2025
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ext/gettext: Remove bool type coercions in tests
  • Loading branch information
Girgias committed Jul 1, 2025
commit a0b1f30736624aae059f51f6b9cc9c26e57fa442
41 changes: 17 additions & 24 deletions ext/gettext/tests/gettext_bind_textdomain_codeset-retval.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,29 @@
test if bind_textdomain_codeset() returns correct value
--EXTENSIONS--
gettext
--CREDITS--
Florian Holzhauer fh-pt@fholzhauer.de
PHP Testfest Berlin 2009-05-09
--FILE--
<?php
try {
bind_textdomain_codeset(false,false);
} catch (ValueError $e) {
echo $e->getMessage() . PHP_EOL;
}

try {
bind_textdomain_codeset("", "UTF-8");
} catch (ValueError $e) {
echo $e->getMessage() . PHP_EOL;
}
try {
bind_textdomain_codeset("", "UTF-8");
} catch (ValueError $e) {
echo $e->getMessage() . PHP_EOL;
}

// bind_textdomain_codeset() always returns false on musl
// because musl only supports UTF-8. For more information:
//
// * https://github.com/php/doc-en/issues/4311,
// * https://github.com/php/php-src/issues/17163
//
$result = bind_textdomain_codeset('messages', "UTF-8");
var_dump($result === false || $result === "UTF-8");
// bind_textdomain_codeset() always returns false on musl
// because musl only supports UTF-8. For more information:
//
// * https://github.com/php/doc-en/issues/4311,
// * https://github.com/php/php-src/issues/17163
//
$result = bind_textdomain_codeset('messages', "UTF-8");
var_dump($result === false || $result === "UTF-8");

echo "Done\n";
echo "Done\n";
?>
--EXPECT--
bind_textdomain_codeset(): Argument #1 ($domain) must not be empty
bind_textdomain_codeset(): Argument #1 ($domain) must not be empty
bool(true)
Done
--CREDITS--
Florian Holzhauer fh-pt@fholzhauer.de
PHP Testfest Berlin 2009-05-09