Skip to content

ext/standard: Removes ZPP tests - #23837

Open
NickSdot wants to merge 3 commits into
php:masterfrom
NickSdot:test/hardening/ext-standard-review
Open

NickSdot wants to merge 3 commits into
php:masterfrom
NickSdot:test/hardening/ext-standard-review

Conversation

@NickSdot

Copy link
Copy Markdown
Contributor

Requested in #23136 (review), cc @Girgias

@Girgias Girgias left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good only one question

Comment on lines -58 to -63
ValueError: flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN
--- Iteration 1 ---
ValueError: flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN
--- Iteration 2 ---
ValueError: flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN
--- Iteration 3 ---

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are these condition still tested somewhere?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Semantically, in flock.phpt yes. ZPP in integer, yes. Exact flock(), no.

Comment on lines +30 to 34
/*8*/ true,
false,
TRUE,
FALSE,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We probably should get rid of these duplicate tests too, same with strings where HEREDOC/NOWDOCS/single quote/double quotes are tested

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed TRUE/FALSE. Okay to doing the coercion/string stuff a separate PR as you mention below.

Comment on lines 72 to -75
"0",
TRUE,
FALSE,
"string12",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In some way the coercion is also a ZPP test, but happy to punt this to another PR.

@NickSdot
NickSdot force-pushed the test/hardening/ext-standard-review branch from ce1b631 to e66b976 Compare September 22, 2026 09:20
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.

2 participants