Skip to content
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

Fix floating deprecations with % operator #57

Merged
merged 1 commit into from
Aug 24, 2022

Conversation

Korbeil
Copy link
Member

@Korbeil Korbeil commented Aug 24, 2022

Base deprecation:

PHP Deprecated:  Implicit conversion from float 205311.7 to int loses precision in /var/www/project/lib/tests/vendor/jolicode/asynit/src/Output/PhpUnitAlike.php on line 160

Deprecated: Implicit conversion from float 205311.7 to int loses precision in /var/www/project/lib/tests/vendor/jolicode/asynit/src/Output/PhpUnitAlike.php on line 160
PHP Deprecated:  Implicit conversion from float 3.421861666666667 to int loses precision in /var/www/project/lib/tests/vendor/jolicode/asynit/src/Output/PhpUnitAlike.php on line 161

Deprecated: Implicit conversion from float 3.421861666666667 to int loses precision in /var/www/project/lib/tests/vendor/jolicode/asynit/src/Output/PhpUnitAlike.php on line 161

It's here because of: https://wiki.php.net/rfc/implicit-float-int-deprecate
Basically, % operator does cast its parameters to int, if they are not int, it will trigger this deprecation notice.

@Korbeil Korbeil force-pushed the feature/php-8.1-deprecations branch from ea62a3d to 752f0b8 Compare August 24, 2022 09:51
@Korbeil Korbeil force-pushed the feature/php-8.1-deprecations branch from 752f0b8 to 5dad7ba Compare August 24, 2022 10:16
@Korbeil Korbeil changed the title Fix floating deprecations with round Fix floating deprecations with % operator Aug 24, 2022
Copy link
Member

@lyrixx lyrixx left a comment

Choose a reason for hiding this comment

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

Thanks 👍🏼

@lyrixx lyrixx merged commit 406eb5e into jolicode:master Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants