-
Notifications
You must be signed in to change notification settings - Fork 2
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 triggers deprecation notice for implicit nullable parameter $downgradeProtection
#15
Comments
Hi, I'm a bit confused by your issue. Should not only the following be a problem? public function __construct(
...
DowngradeProtectionOptions $downgradeProtection = null
) { And the fix would be: public function __construct(
...
?DowngradeProtectionOptions $downgradeProtection = null
) { All your other examples shouldn't trigger the notice, since we don't have types declared there. |
Yes sorry, I overlooked. My bad :) Might be interesting to add typing for those parameters though, to have a code a bit more restrictive. |
Adding nullable types would unfortunately require dropping support for PHP versions older than 7.1. One of the initial goals of this library was to maintain compatibility with PHP 5.3 and later, allowing older software to still receive security updates. However, PHP 5.3 reached its end of life (EOL) 10 years ago, back in 2014. Over all these years, no security issues have been reported for this library or for Auth_SASL2. Still, maintaining compatibility with such outdated PHP versions has become increasingly challenging. I believe the time has come to move forward and modernize this library. I’ll create a ticket for this task and tackle it whenever I find the time. I’ll also make some edits to your issue to clarify the initial problem a bit. Edit: btw thank you for pointing this out. |
$downgradeProtection
It seems that you missed a nullable parameter declaration to pass PHP 8.4 support :)
The text was updated successfully, but these errors were encountered: