-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpFoundation] Add use_strict_mode
in validOptions for session
#22352
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
Conversation
You can still run SF 2.x on PHP 5.5 and want to set this option. So IMO this can go into 2.7 (earlier versions of PHP should just ignore the option if you set it) |
Rebased on 2.7. |
Is there a good reason not to enable it by default? I'm not 100% sure of the intricacies of the option, so maybe it's a bad idea. |
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.
👍
Thank you @sstok. |
… session (sstok) This PR was merged into the 2.7 branch. Discussion ---------- [HttpFoundation] Add `use_strict_mode` in validOptions for session | Q | A | ------------- | --- | Branch? | 3.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #9258 | License | MIT | Doc PR | PHP ini `session.use_strict_mode` was added in PHP 5.5.2 so I didn't target 2.8 as this still uses PHP 5.3. https://secure.php.net/manual/en/session.configuration.php#ini.session.use-strict-mode Commits ------- 130ee32 Add `use_strict_mode` in validOptions for session
How do I configure this? I've tried:
But it throws And it's not defined in the config: https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php#L696 |
The Make a PR? |
… option for NativeSessionStorage (MacDada) This PR was merged into the 2.7 branch. Discussion ---------- [FrameworkBundle] Sessions: configurable "use_strict_mode" option for NativeSessionStorage | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | License | MIT It is currently not possible to configure the `use_strict_mode` option for `NativeSessionStorage` in a proper manner. The reason of this PR: #22352 (comment) It could be considered a new feature, but I wish it wouldn't, as I don't want to do any ugly hacking to get it working. What else could be done? * implement more options from `NativeSessionStorage` in the config? * get rid of duplication somehow (maybe a static method in `NativeSessionStorage` that would return the option list and could be used in `FrameworkExtension`?) * update `FrameworkExtensionTest`? * update `ConfigurationTest`? * update [the docs](https://symfony.com/doc/current/reference/configuration/framework.html#session)? I'm willing to do those if decided. Commits ------- 90e192e Sessions: configurable "use_strict_mode" option for NativeSessionStorage
PHP ini
session.use_strict_mode
was added in PHP 5.5.2 so I didn't target 2.8 as this still uses PHP 5.3. https://secure.php.net/manual/en/session.configuration.php#ini.session.use-strict-mode