Skip to content

Conversation

@MajorOli
Copy link

@MajorOli MajorOli commented Jan 4, 2025

Add test for convert issue at #212
It looks like the PR #222 will fix the issue

…hod.

fix: to prevent time conflicts at Convert::version() set the default timezone "UTC" at the setUp() function
1) ts3phpframework\src\Helper\Convert.php:89
Implicit conversion from float 90.083 to int loses precision
https://www.php.net/manual/en/migration81.deprecated.php

change to explicit integer conversion
add test cases for negative time format. So it's possible to handle negative seconds
@MajorOli
Copy link
Author

MajorOli commented Jan 4, 2025

I found a few more changes:

  • fix: Convert::version() returns an Object so we need the toString() method. To prevent time conflicts at ConvertTest.php set default timezone "UTC" at the setUp() function
  • fix deprecation warning
    1 test triggered 1 PHP deprecation:
    at ts3phpframework\src\Helper\Convert.php:89 Implicit conversion from float 90.083 to int loses precision
    source: https://www.php.net/manual/en/migration81.deprecated.php
    so changed to explicit integer conversion
  • change format for negative time / seconds and add test cases to validate negative time format. So it's possible to handle the format for negative values

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