-
-
Notifications
You must be signed in to change notification settings - Fork 89
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 Laravel 11 compability #99
base: master
Are you sure you want to change the base?
Conversation
have you tried the last release? |
Yes, doesnt work as new L11 projects comes with Carbon 3. |
tests failed with this PR, work on that and i'm ready to merge it |
Yes, because of a deprecation notice (float -> int):
still looking into this atm. |
yes, since it's late now I'll be waiting for your fix, or i will look into it tomorrow by myself. |
It's late here too :D will look into it tomorrow too! |
I found the problem, its caused only if you use Carbon 3, as it changed the behaivour of Changing the function protected function newExpiration($period)
{
try {
$periodCarbon = $this->xHoursPeriod($period) ?? Carbon::now()->{'endOf' . Str::studly($period)}();
} catch (Exception $e) {
throw new Exception("Wrong period: `{$period}`! please update config/visits.php file.");
}
return (int) abs($periodCarbon->diffInSeconds()) + 1;
} Still ongoing to figure out that last problem.
|
Changed the variable name from 'key' to 'search' in valueList method across the engine classes to be more descriptive about its functionality. Moreover, adjusted the data types for variables in setExpiration methods from float to integer to ensure consistency throughout the code. An enhancement in Periods class has been made to make sure the difference in seconds is always an absolute integer.
Tests now should all pass, I changed them and the return type of |
i pushed the last change before seeing your last comment, i would've pulled it instead of changing this myself. absolutely right. thanks for debugging this. |
Laravel 11 adds Carbon ^3.0, with this PR it works