-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Remove config deprecations #51428
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
[FrameworkBundle] Remove config deprecations #51428
Conversation
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
Outdated
Show resolved
Hide resolved
…session.save_path` and `framework.session.handler_id` at the same time (alexandre-daubois) This PR was merged into the 6.4 branch. Discussion ---------- [FrameworkBundle] Deprecate not setting both `framework.session.save_path` and `framework.session.handler_id` at the same time | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | yes | Tickets | - | License | MIT | Doc PR | - This is the follow-up of #51428 (comment) Commits ------- 85faa69 [FrameworkBundle] Deprecate not setting both `framework.session.save_path` and `framework.session.handler_id` at the same time
e98b2db
to
9a05727
Compare
$v['session'] += [ | ||
'cookie_samesite' => null, | ||
'handler_id' => 'session.handler.native_file', | ||
'save_path' => '%kernel.cache_dir%/sessions', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when handler_id
is non-null, save_path should still default to %kernel.cache_dir%/sessions
, how can we deal with that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the condition:
if (!\array_key_exists('handler_id', $v['session'])) {
$v['session']['handler_id'] = $v['session']['save_path'] ? 'session.handler.native_file' : null;
} elseif (null !== $v['session']['handler_id']) {
$v['session']['save_path'] ??= '%kernel.cache_dir%/sessions';
}
Also updated changelog to Make the framework.session.save_path config option default to %kernel.cache_dir%/sessions if framework.session.handler_id is set or null otherwise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also added a call to info()
to document this behavior
cfaee6f
to
0106c5b
Compare
0106c5b
to
7935e94
Compare
7935e94
to
45cdb7c
Compare
I'd say this PR should be merged before this one to fix the errors raised by I fixed the |
5ce5bac
to
d9c64ff
Compare
d9c64ff
to
4fe6f5b
Compare
Thank you @alexandre-daubois. |
Follow-up of: