Skip to content

Add rest_sanitize_boolean() to unslashing sanitizing functions #2530

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

Merged
merged 1 commit into from
Jun 25, 2025

Conversation

westonruter
Copy link
Member

The rest_sanitize_boolean() function always returns a bool so it is essentially the same as boolval().

@GaryJones
Copy link
Member

The test failure looks unrelated to the changes in this PR.

@jrfnl We pull in PHPCSUtils develop for the tests - maybe PHPCSStandards/PHPCSUtils#677 or similar upstream is related for the PHP 8.4 test failure on the public $notAllowed property?

Copy link
Member

@GaryJones GaryJones left a comment

Choose a reason for hiding this comment

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

@jrfnl
Copy link
Member

jrfnl commented Jun 10, 2025

The test failure looks unrelated to the changes in this PR.

Correct.

@jrfnl We pull in PHPCSUtils develop for the tests - maybe PHPCSStandards/PHPCSUtils#677 or similar upstream is related for the PHP 8.4 test failure on the public $notAllowed property?

This is actually related to a change in PHP 8.4, which will be supported in PHPCS 4.x and which PHPCSUtils 1.1.0 will support for both PHPCS 3.x as well as 4.x: properties in interfaces are now allowed.
See: PHPCSStandards/PHPCSUtils@8471a1c

@jrfnl
Copy link
Member

jrfnl commented Jun 10, 2025

This is actually related to a change in PHP 8.4, which will be supported in PHPCS 4.x and which PHPCSUtils 1.1.0 will support for both PHPCS 3.x as well as 4.x: properties in interfaces are now allowed. See: PHPCSStandards/PHPCSUtils@8471a1c

FYI: I have a fix ready for this, but that fix needs PHPCSUtils 1.1.0 (for supporting PHPCS 3.x), so I'll pull it once that's been released (expected this week).

@jrfnl
Copy link
Member

jrfnl commented Jun 14, 2025

Thanks @westonruter ! LGTM.

Once PR #2532 has been merged, this can be rebased and merged.

@jrfnl
Copy link
Member

jrfnl commented Jun 23, 2025

@westonruter When you have time, would you please rebase this PR (without changes), so we can have a passing build before merging ?

@westonruter westonruter force-pushed the add/rest-sanitize-boolean branch from ab84c0b to 538196c Compare June 25, 2025 03:14
@westonruter
Copy link
Member Author

@jrfnl rebased!

@jrfnl
Copy link
Member

jrfnl commented Jun 25, 2025

Thanks @westonruter ! Merging now.

@jrfnl jrfnl merged commit b3713e7 into develop Jun 25, 2025
50 checks passed
@jrfnl jrfnl deleted the add/rest-sanitize-boolean branch June 25, 2025 11:00
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