catalyst / moodle-auth_saml2

SAML done 100% in Moodle, fast, simple, secure
https://moodle.org/plugins/auth_saml2
70 stars 132 forks source link

Replace Deprecated PHP 8.1 function strftime() #765

Closed gustavoparolin closed 8 months ago

gustavoparolin commented 1 year ago

Hello Dev Team,

I hope this message finds you well. I am writing to bring your attention to an important issue regarding the plugin SAML2 Single sign on.

When updating from Moodle 3.9 to Moodle 4.1, we updated PHP to 8.1. Then we encountered a critical error related to a deprecated PHP function, specifically "strftime()".

Deprecated: Function strftime() is deprecated in /var/www/html/auth/saml2/.extlib/simplesamlphp/lib/SimpleSAML/Logger/FileLoggingHandler.php on line 120

As of PHP 8.1, the "strftime()" function has been marked as deprecated, which means it will no longer be supported from now on. It is crucial for us to update the plugin and replace this deprecated function with an alternative that aligns with the latest PHP standards.

I kindly request the development team to address this issue promptly by updating the plugin and modifying the mentioned line of code. This will not only ensure the smooth functioning of our website but also keep it compatible with upcoming PHP versions.

For further information regarding the deprecation of "strftime()" function, you can refer to the official PHP documentation at: https://www.php.net/manual/en/function.strftime.php

Thank you for your attention to this matter, and we appreciate your efforts in resolving this issue.

Best regards,

Gustavo Parolin

danmarsden commented 1 year ago

looks like that comes from the simplesamlphp lib - we try not to modify that library where we can, but I'd suspect this is fixed in the newer version of simplesamlphp which we'll likely update to at some point.

sarahjcotton commented 9 months ago

Confirming this is fixed in the latest version of simplesamlephp: https://simplesamlphp.org/docs/2.0/simplesamlphp-upgrade-notes-2.0.html