Skip to content

ext/session: Various refactorings #19041

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 11 commits into from
Jul 6, 2025
Merged

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Jul 5, 2025

Commits should be reviewed one by one

@nielsdos
Copy link
Member

nielsdos commented Jul 5, 2025

You broke something hard, and it seems related to the ini quantity parsing. I don't think quantity parsing makes a lot of sense for those settings

@Girgias Girgias force-pushed the session-refactor-07-2025 branch from 20eda53 to d13ef59 Compare July 6, 2025 02:47
date_fmt = php_format_date("D, d M Y H:i:s \\G\\M\\T", sizeof("D, d M Y H:i:s \\G\\M\\T")-1, t, 0);
smart_str_appends(&ncookie, COOKIE_EXPIRES);
date_fmt = php_format_date(ZEND_STRL("D, d M Y H:i:s \\G\\M\\T"), t, false);
smart_str_appendl(&ncookie, ZEND_STRL(COOKIE_EXPIRES));
Copy link
Member

Choose a reason for hiding this comment

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

For cases like these, I prefer the original code. The strlen() call will almost certainly be evaluated at compile time.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, I forgot that this is inlined. I was expecting the need for a _literal suffix API.

@Girgias Girgias force-pushed the session-refactor-07-2025 branch from f656530 to 82c1e8c Compare July 6, 2025 14:29
@Girgias Girgias marked this pull request as ready for review July 6, 2025 16:20
@Girgias Girgias merged commit 36358ba into php:master Jul 6, 2025
9 checks passed
@Girgias Girgias deleted the session-refactor-07-2025 branch July 6, 2025 16:21
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