Skip to content

session.save_handler - add two uncovered cases #15337

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

Merged
merged 2 commits into from
Aug 11, 2024

Conversation

jorgsowa
Copy link
Contributor

@jorgsowa jorgsowa commented Aug 11, 2024

Adds 2 test cases related to the session.save_handler that are not currently covered.

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a minor nit

Might make sense as a follow-up to warn about an empty save handler

session_set_save_handler(new \SessionHandler(), true);
session_start();
} catch (Throwable $e) {
echo $e->getMessage() . "\n";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I prefer seeing what exception is being thrown

Suggested change
echo $e->getMessage() . "\n";
echo $e::class . ': ' . $e->getMessage() . "\n";

Copy link
Contributor Author

@jorgsowa jorgsowa Aug 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Added

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you forget to push?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sorry. Internet connection interruption.

@Girgias Girgias merged commit c4eccf3 into php:master Aug 11, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants