Skip to content

ext/curl: improved tests - #23183

Open
NickSdot wants to merge 1 commit into
php:masterfrom
NickSdot:hardening/22908-tests
Open

ext/curl: improved tests#23183
NickSdot wants to merge 1 commit into
php:masterfrom
NickSdot:hardening/22908-tests

Conversation

@NickSdot

@NickSdot NickSdot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Follow up to #22908.

@Sjord

Sjord commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Is this just to make it look neat, or is there a risk that the wrong exception is thrown?

@NickSdot

Copy link
Copy Markdown
Contributor Author

Is this just to make it look neat, or is there a risk that the wrong exception is thrown?

Regression protection. See the in progress effort in #22799; it's something that gets often flagged.

@LamentXU123

Copy link
Copy Markdown
Member

@Sjord As you are the author of that piece of code, do you think this change is good to go?

@LamentXU123

LamentXU123 commented Aug 11, 2026

Copy link
Copy Markdown
Member

Oh, and @NickSdot Since people constantly forget about applying these new error test styles, do you think it is reasonable to mention them in CODING_STANDARD.md? If you think so, feel free to open a PR, Cheers :)
(I am not approving it, just giving ideas. Because I think nowadays AI agents (which by the way are the most popular way newcomers contribute to the project) write tests in the exact same style of other tests, and if you don't mention this specifically, it won't remember your proposal.)

@NickSdot

Copy link
Copy Markdown
Contributor Author

Oh, and @NickSdot Since people constantly forget about applying these new error test styles, do you think it is reasonable to mention them in CODING_STANDARD.md? If you think so, feel free to open a PR, Cheers :)

Good idea! PR incoming.

write tests in the exact same style of other tests

My point exactly; that's why I think unifying is important. :)

@Sjord

Sjord commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

It seems these changes are also in #23038. Perhaps it's better to close this one and continue with #23038?

I think these changes are fine. These tests already catch a ValueError so I can't see this going wrong easily, but it's nice to have this checked and consistent. The commit message could use some more detail.

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.

3 participants