PHP 8.0 | New `PHPCompatibility.ParameterValues.ChangedIntToBoolParamType` sniff by jrfnl · Pull Request #1232 · PHPCompatibility/PHPCompatibility
Navigation Menu
{{ message }}
PHPCompatibility / PHPCompatibility Public
- Notifications You must be signed in to change notification settings
- Fork 204
Merged
Conversation
Copy link Copy Markdown
Member
The
$auto_releaseparameter ofsem_get()was changed to accept bool values
rather than int.
The
$flagparameter ofob_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
- Change int types to bool when possible php/php-src#6148
- php/php-src@46d22e4
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
jrfnl
added
Type: enhancement
PR: ready for review
labels
jrfnl
added this to the
10.0.0 milestone
jrfnl
requested a review
from wimg
wimg approved these changes Nov 21, 2020
wimg
merged commit
8bb9c67
into
develop
wimg
deleted the
php-8.0/new-changedinttoboolparamtype-sniff
branch
jrfnl
removed
the
PR: ready for review
label
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment