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

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Jun 19, 2025

RFC: https://wiki.php.net/rfc/deprecate-function-bool-type-juggling

@nicolas-grekas this should allow you to check if SF is affected :)

Girgias added a commit to php/doc-en that referenced this pull request Jun 19, 2025
@Girgias Girgias force-pushed the bool-juggling-dep-poc branch from 0e1de90 to abacde3 Compare June 21, 2025 15:53
Girgias added a commit that referenced this pull request Jun 21, 2025
- Use INI sections
- Use CGI sections
- Move data into a subfolder
- Remove ZPP tests
- Fix various bugs within tests
- Simplify some


Found while working on #18879
@Girgias Girgias force-pushed the bool-juggling-dep-poc branch from abacde3 to 8f5f75b Compare June 21, 2025 20:20
@Girgias Girgias force-pushed the bool-juggling-dep-poc branch from 8f5f75b to 6487506 Compare June 23, 2025 13:13
@Girgias Girgias force-pushed the bool-juggling-dep-poc branch from c246c9e to e1a3dc6 Compare July 1, 2025 20:48
@NattyNarwhal
Copy link
Member

do you know why I get the following with the ODBC failures on CI

Not sure how the Windows tests are set up, but I think it's coming from here; it'd be returning false if they don't exist (similar to ext/pdo/test/pdo_test.inc):

if (false !== getenv('PDOTEST_DSN')) {
// user should have to set PDOTEST_DSN so that:
// 1. test is skipped if user doesn't want to test it, even if they have MS Access installed
// 2. it detects if ODBC driver is not installed - to avoid test bug
// 3. it detects if ODBC driver is installed - so test will be run
// 4. so a specific ODBC driver can be tested - if system has multiple ODBC drivers
$config['ENV']['PDOTEST_DSN'] = getenv('PDOTEST_DSN');
$config['ENV']['PDOTEST_USER'] = getenv('PDOTEST_USER');
$config['ENV']['PDOTEST_PASS'] = getenv('PDOTEST_PASS');
if (false !== getenv('PDOTEST_ATTR')) {
$config['ENV']['PDOTEST_ATTR'] = getenv('PDOTEST_ATTR');
}

That include seems to assume the other variables are set if this one is, which doesn't seem to be the case here:

set PDOTEST_DSN=odbc:%ODBC_TEST_DSN%

@Girgias
Copy link
Member Author

Girgias commented Jul 1, 2025

do you know why I get the following with the ODBC failures on CI

Not sure how the Windows tests are set up, but I think it's coming from here; it'd be returning false if they don't exist (similar to ext/pdo/test/pdo_test.inc):

if (false !== getenv('PDOTEST_DSN')) {
// user should have to set PDOTEST_DSN so that:
// 1. test is skipped if user doesn't want to test it, even if they have MS Access installed
// 2. it detects if ODBC driver is not installed - to avoid test bug
// 3. it detects if ODBC driver is installed - so test will be run
// 4. so a specific ODBC driver can be tested - if system has multiple ODBC drivers
$config['ENV']['PDOTEST_DSN'] = getenv('PDOTEST_DSN');
$config['ENV']['PDOTEST_USER'] = getenv('PDOTEST_USER');
$config['ENV']['PDOTEST_PASS'] = getenv('PDOTEST_PASS');
if (false !== getenv('PDOTEST_ATTR')) {
$config['ENV']['PDOTEST_ATTR'] = getenv('PDOTEST_ATTR');
}

That include seems to assume the other variables are set if this one is, which doesn't seem to be the case here:

set PDOTEST_DSN=odbc:%ODBC_TEST_DSN%

Ah lovely, I love how many bugs this proposal is finding in our own test suite lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment