PHP 8.0 | New `PHPCompatibility.ParameterValues.ChangedIntToBoolParamType` sniff by jrfnl · Pull Request #1232 · PHPCompatibility/PHPCompatibility

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@jrfnl

Copy link Copy Markdown

Member

@jrfnl jrfnl commented

Oct 2, 2020

edited

Loading

The $auto_release parameter of sem_get() was changed to accept bool values
rather than int.

The $flag parameter of ob_implicit_flush() was changed to accept bool
values rather than int.

This new sniff will detect hard-coded integer/float values being passed as the affected parameter in the above mentioned functions.

The sniff has been set up to allow for more functions / function parameters to be added in the future.

Includes unit tests.

Refs:

Related to #809

…amType` sniff

>  The `$auto_release` parameter of `sem_get()` was changed to accept bool values
>  rather than int.

> The $flag parameter of ob_implicit_flush() was changed to accept bool
> values rather than int.

This new sniff will detect hard-coded integer/float values being passed as the affected parameter in the above mentioned functions.

The sniff has been set up to allow for more functions / function parameters to be added in the future.

Includes unit tests.

Refs:
* https://github.com/php/php-src/blob/0a84fba0deb1c1b75770a436c4236dc56e6d0463/UPGRADING#L621-L622
* https://github.com/php/php-src/blob/0a84fba0deb1c1b75770a436c4236dc56e6d0463/UPGRADING#L813-L814
* php/php-src#6148
* php/php-src@46d22e4

@wimg wimg merged commit 8bb9c67 into develop

Nov 21, 2020

@wimg wimg deleted the php-8.0/new-changedinttoboolparamtype-sniff branch

November 21, 2020 18:22

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

Reviewers

@wimg wimg wimg approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

10.0.0-alpha1

Development

Successfully merging this pull request may close these issues.

2 participants

@jrfnl @wimg