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 deprecated warning implicit conversion from float (#20083) #20144

Conversation

skepticspriggan
Copy link
Contributor

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues 20083

Copy link

what-the-diff bot commented Mar 30, 2024

PR Summary

  • Deprecated Warning Fix
    A bug fix was added to address a warning about a deprecated coding practice in the float conversion. This ensures the smooth operation of our code and removes potentially confusing warnings for developers.

  • Typecasting Update in Formatter
    Updates were made in Formatter.php to explicitly convert certain data to integers during a method called setTimestamp. This helps in maintaining accuracy and precision in our time-related functions.

  • Test Assertion Addition in FormatterDateTest
    For heightened reliability of our duration functions, a new test assertion has been added in FormatterDateTest.php. This specifically checks the asDuration method when it is given a float value, helping us catch potential issues earlier in the development process.

Copy link

codecov bot commented Mar 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.82%. Comparing base (97ca1f2) to head (407f742).

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #20144   +/-   ##
=========================================
  Coverage     64.82%   64.82%           
  Complexity    11376    11376           
=========================================
  Files           429      429           
  Lines         37074    37074           
=========================================
  Hits          24034    24034           
  Misses        13040    13040           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@samdark samdark added this to the 2.0.50 milestone Apr 2, 2024
@samdark samdark merged commit e56e777 into yiisoft:master Apr 2, 2024
73 checks passed
@samdark
Copy link
Member

samdark commented Apr 2, 2024

Thank you!

@skepticspriggan skepticspriggan deleted the 20083-fix-deprecated-warning-implicit-conversion-from-float branch June 29, 2024 12:05
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.

2 participants