Skip to content

Conversation

@jrfnl
Copy link
Member

@jrfnl jrfnl commented Oct 2, 2020

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants