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] Use SessionHandlerInterface instead of Zend_Session_SaveHandler_Interface #22690

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Oct 15, 2024

Description:

PHP 8.4 will deprecate the legacy signature of session_set_save_handler. Passing more than 2 parameters to the method will then trigger a deprecation notice.

To fix this the PR will replace the usage of Zend_Session_SaveHandler_Interface with the PHP built in interface SessionHandlerInterface, which can be directly passed to session_set_save_handler. This already exists since PHP 5.4, so should be compatible with all PHP versions we support.

For this the original Zend Session classes have been adjusted.

See https://php.watch/versions/8.4/session_set_save_handler-alt-signature-deprecated

refs #22471

Review

@sgiehl sgiehl marked this pull request as ready for review October 17, 2024 07:14
@sgiehl sgiehl added this to the 5.2.0 milestone Oct 17, 2024
@sgiehl sgiehl requested a review from a team October 17, 2024 07:14
@sgiehl sgiehl added the Needs Review PRs that need a code review label Oct 17, 2024
@michalkleiner
Copy link
Contributor

I'm wondering whether we could direct all PHP 8.4 related PRs into a separate PHP 8.4 compatibility branch and then merge it all at once when all the adjustment work is done? Mainly to avoid merging in stuff that will pass on 5.x against 8.3 but we won't have immediate tests feedback on 8.4

@sgiehl
Copy link
Member Author

sgiehl commented Oct 18, 2024

@michalkleiner The changes of this PR are currently also in #22667, where the tests are only running with 8.4 and are passing. But I had to disable deprecations there, as the tests didn't pass with deprecations enabled.

@sgiehl sgiehl merged commit 2e13b49 into 5.x-dev Oct 18, 2024
26 checks passed
@sgiehl sgiehl deleted the fixsessionhandlerphp84 branch October 18, 2024 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants