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

PHP 8.4 missing changelog deprecation for gc_divisor #4421

Open
nickdnk opened this issue Jan 28, 2025 · 2 comments
Open

PHP 8.4 missing changelog deprecation for gc_divisor #4421

nickdnk opened this issue Jan 28, 2025 · 2 comments
Labels
bug Documentation contains incorrect information good first issue Good for newcomers Status: Verified
Milestone

Comments

@nickdnk
Copy link

nickdnk commented Jan 28, 2025

Hello

When upgrading to PHP 8.4, you can no longer set gc_divisor for session configuration to zero at runtime (and probably not in the INI either). This was possible on 8.3 without raising a notice, but this is not listed in the deprecation list at https://www.php.net/manual/en/migration84.deprecated.php under "Session".

@damianwadley
Copy link
Member

This did make it into the NEWS during php/php-src@ff69f33 so it is a documentation issue.

That said, the calculation of whether to run the GC is officially gc_probability / gc_divisor, thus a value of zero is invalid. If that value made it to the actual implementation, there would be fun integer overflows and underflows involved and I think the result is an effective calculation of 0.5 + gc_probability / PHP_INT_MAX - so essentially 50%.

@nickdnk
Copy link
Author

nickdnk commented Jan 28, 2025

Whatever the math or implementation logic is; it accepted 0 before and doesn't now, so the deprecations list should reflect this change. Naturally, it's easy to fix, but still.

@Girgias Girgias added bug Documentation contains incorrect information good first issue Good for newcomers Status: Verified labels Jan 30, 2025
@Girgias Girgias added this to the PHP 8.4 milestone Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Documentation contains incorrect information good first issue Good for newcomers Status: Verified
Projects
None yet
Development

No branches or pull requests

3 participants