Skip to content

session default handler #3276

@bamarni

Description

@bamarni
Contributor

Since symfony/symfony-standard#606 has been merged, http://symfony.com/doc/current/cookbook/session/sessions_directory.html cookbook entry is obsolete.

I don't want to argue about the change per se as it's pointless and it's just a default value anyway, but I think it makes the documentation messy :

  • symfony/framework-standard-edition and symfony/symfony provide 2 different default values, which of those packages is covered by the official documentation?
  • we know there won't be any BC break until 3.0, but what about "documentation break"? When introducing sessions, this is basically the first thing one says "Symfony comes with a sessions managment system, by default they are stored ..." and now there is no consistent documentation possible accross all ~2.3 versions.

Should we do something about this? Personally I suggest to either backport this commit to 2.3 or postpone it to 3.0.

cc @fabpot @pulzarraider @Drak

Activity

ghost

ghost commented on Dec 4, 2013

@ghost

Why is it obsolete? This is still the way to configure using userland.
symfony/symfony-standard#606 only allows to use the php.ini values but that is only if you want to use php.ini. The way the file handler is written allows you to control the settings in userland.

Additionally, the documentation is also not for Symfony Standard but Symfony Full Stack Framework. There is no documentation for the symfony standard edition.

wouterj

wouterj commented on Dec 4, 2013

@wouterj
Member

First of all, the article is not obsolete, it only needs some minor rewrites.
Secondly, the docs are about the full stack framework, but we always use the SE as a base for the articles.

What needs to be done:

  • Rewrite the article, so it isn't based on the file storage, but instead on the native session handler
  • Add a note, telling people the framework has the file storage as default
  • Add a versionadded block, telling people this behaviour changed in 2.3 for the SE and it was defaulting to the file storage prior to 2.4
ghost

ghost commented on Dec 4, 2013

@ghost

@wouterj The change was only made to Symfony standard, not Symfony (nor should be) where the default is session.nativefile.handler. We've never documented Symfony standard in the cookbook to date that I am aware of.

wouterj

wouterj commented on Dec 4, 2013

@wouterj
Member

@Drak but 99% of our readers use the SE, so we need to not confuse them. So, let's do it the other way around: Leave the article as is and add a note telling people that as of Symfony 2.4, the SE defaults to the native session handler.

bamarni

bamarni commented on Dec 4, 2013

@bamarni
ContributorAuthor

@Drak : If the documentation is strictly about symfony/symfony, then it's all correct and this entry can be kept as is. But in practice I really doubt people, when discovering the framework and the documentation, make such a distinction between the full stack framework and the standard edition. The installation section tells to install the standard edition, so then when browsing to the cookbooks and reading "By default, ..." I'd naturally assume that I'm concerned by the sentence.

@wouterj : By "obsolete" I meant the approach, not the content itself. We can for sure re-write it but it would just become a description of a configuration directive of a given session handler. I'm under the impression this cookbook was made in order to tackle a very particular issue : people using the standard edition and loosing session data when deploying their app or clearing the cache. Using a custom symfony edition or making its own is a very "advanced" task, people doing this should have enough knowledge of the framework to understand what's going on here without the need of a cookbook entry.

ghost

ghost commented on Dec 4, 2013

@ghost

@bamarni The documentation is for Symfony Full Stack Framework, unless it's the components/ docs when it's about the components. Sf Standard Edition is just an example project. Take a look at #3281 which I added for clarity about the feature anyhow. This feature goes back to 2.1 If I recall correctly. I drafted it quickly so please check the suggested PR.

ghost

ghost commented on Dec 4, 2013

@ghost
added a commit that references this issue on Jan 1, 2014
added a commit that references this issue on Jan 21, 2014
ricardclau

ricardclau commented on Aug 7, 2014

@ricardclau
Contributor

Since the clarifications were added, this can be closed right? @weaverryan @wouterj @Drak

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    HttpFoundationactionableClear and specific issues ready for anyone to take them.good first issueIdeal for your first contribution! (some Symfony experience may be required)hasPRA Pull Request has already been submitted for this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ricardclau@wouterj@bamarni

        Issue actions

          session default handler · Issue #3276 · symfony/symfony-docs