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

Clarify settings for native file storage #3342

Merged
merged 2 commits into from Jan 1, 2014
Merged

Clarify settings for native file storage #3342

merged 2 commits into from Jan 1, 2014

Conversation

ghost
Copy link

@ghost ghost commented Dec 15, 2013

Refs #3276 #3281

Update notes about Symfony Standard
@xabbuh
Copy link
Member

xabbuh commented Dec 15, 2013

Can you please include the pull request format in the description?

'session' => array('save-path' => "%kernel.root_dir%/sessions"),
'session' => array(
'handler-id' => "session.handler.native_file"),
'save-path' => "%kernel.root_dir%/sessions"),
Copy link
Member

Choose a reason for hiding this comment

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

use single quotes instead of double quotes here

Copy link
Member

Choose a reason for hiding this comment

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

and remove the ), part from both

Copy link
Author

Choose a reason for hiding this comment

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

@wouterj No, that's valid PHP syntax.

Copy link
Member

Choose a reason for hiding this comment

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

No, there are more closing parentheses then opening ones.

Copy link
Member

Choose a reason for hiding this comment

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

2 more to be precise :)

@ghost
Copy link
Author

ghost commented Dec 15, 2013

Ok corrections incorporated.

@weaverryan
Copy link
Member

Hey Drak!

I need your help to clarify a little bit more. Since the SE uses session: ~, and handler_id defaults to session.handler.native_file in the Configuration class, then the default for the SE is that the session metadata is stored in the cache directory. Correct?

What's not clear to me is the difference between the Symfony Framework and the SE. Though not technically the same, in practice, these are the same. I'm also not sure what configuration for the session would result in the native php.ini configuration values being used - since the Configuration class defaults everything to use the native_file handler with a save_path in the cache dir.

If you can clarify for me, that would be awesome :). I want to give users a very direct "this is the default" statement.

Thanks!

@wouterj
Copy link
Member

wouterj commented Dec 26, 2013

The SE comfiguration has changed in https://github.com/symfony/symfony-standard/pull/606/files We've called that 'the default of the SE'. The original default is the native file handler.

As you can see, if handler_id is empty it defaults to the handler from php.ini

means that when you clear the cache, any current sessions will also be
deleted.
By default, Symfony stores the session data in files in the cache
directory ``%kernel.cach_dir%/sessions``. This means that when you clear
Copy link
Contributor

Choose a reason for hiding this comment

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

cache_dir

weaverryan added a commit that referenced this pull request Jan 1, 2014
Clarify settings for native file storage
@weaverryan weaverryan merged commit a3d5c6c into symfony:2.3 Jan 1, 2014
weaverryan added a commit that referenced this pull request Jan 1, 2014
@weaverryan
Copy link
Member

Thanks Drak for taking this on and everyone else for the tweaks and clarifications! I've merged this in and proposed some further changes at #3404

Thanks!

weaverryan added a commit that referenced this pull request Jan 21, 2014
…ectory details (weaverryan)

This PR was merged into the 2.3 branch.

Discussion
----------

[#3276] Trying to further clarify the session storage directory details

Hi guys!

This continues after #3342. Basically, it's confusing the symfony/symfony has a different default than the Symfony SE. However, I agree with Wouter that most framework readers are probably SE users. My strategy is simply to show people which configuration causes which situation.

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | all (or 2.3+)
| Fixed tickets | #3276

Thanks!

Commits
-------

adc57be [#3404] Adding a few comments, per @wouterj
f094237 [#3276] Trying to further clarify the session storage directory details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants