Skip to content

ext/dba/tests/gh16390.phpt: skip if inifile is disabled #17011

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

Closed
wants to merge 1 commit into from

Conversation

orlitzky
Copy link
Contributor

@orlitzky orlitzky commented Dec 1, 2024

This test reads an ini "file" from a string, and expects a warning about locking. But if inifile support is disabled, then you'll get

Warning: dba_open(): Handler "inifile" is not available in /path/to/ext/dba/tests/gh16390.php on line 3

instead. We skip the test if inifile support is disabled.

This test reads an ini "file" from a string, and expects a warning
about locking. But if inifile support is disabled, then you'll get

  Warning: dba_open(): Handler "inifile" is not available in
  /path/to/ext/dba/tests/gh16390.php on line 3

instead. We skip the test if inifile support is disabled.
@cmb69
Copy link
Member

cmb69 commented Dec 1, 2024

Thank you! Should probably applied to PHP 8.2.

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, do you have commit rights?

Comment on lines +7 to +8
require_once __DIR__ . '/setup/setup_dba_tests.inc';
check_skip('inifile');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comparing this with the SKIPIF section of https://github.com/php/php-src/pull/17005/files#diff-0f4f5dbb2a00f5b3a7c047f212cb553bbf1e3112ebe500f52b2188222a746260R9-R10, I wonder what's the preferred way nowadays.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, this happens every time I add a SKIPIF. They both get the job done, but the check_skip() function is a bit newer so I placed my bet on that.

@orlitzky
Copy link
Contributor Author

orlitzky commented Dec 2, 2024

LGTM, do you have commit rights?

I do not

@nielsdos
Copy link
Member

nielsdos commented Dec 6, 2024

I'll merge this in 8.3 and up, thanks!

@nielsdos nielsdos closed this in def271a Dec 6, 2024
charmitro pushed a commit to wasix-org/php that referenced this pull request Mar 13, 2025
This test reads an ini "file" from a string, and expects a warning
about locking. But if inifile support is disabled, then you'll get

  Warning: dba_open(): Handler "inifile" is not available in
  /path/to/ext/dba/tests/gh16390.php on line 3

instead. We skip the test if inifile support is disabled.

Closes phpGH-17011.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants