Skip to content

Commit

Permalink
minor #3769 Updated references to new Session() (scottwarren)
Browse files Browse the repository at this point in the history
This PR was submitted for the 2.4 branch but it was merged into the 2.3 branch instead (closes #3769).

Discussion
----------

Updated references to new Session()

If you use new Session(), you get a 500 error, with the following message:

```log
Failed to start the session: already started by PHP.
```

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | I tested 2.4.2, but it most likely will be earlier version as well
| Fixed tickets | none

Commits
-------

fa86275 Updated warning for Sessions
4e06f0e fixed spaces and 72 char line limit
3624fec Updated grammer issues in caution section
b2ac5bc fixed typo
6e6b19f Fixed typo and removed extra space
df4ef14 Added extra new lines
275dd97 Added Caution note
a64f274 Removed use command
490efdc Updated references to new Session()
  • Loading branch information
weaverryan committed May 12, 2014
2 parents 7288a33 + 0b8747e commit d92c522
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/http_foundation/sessions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ object-oriented interface using a variety of session storage drivers.
Sessions are used via the simple :class:`Symfony\\Component\\HttpFoundation\\Session\\Session`
implementation of :class:`Symfony\\Component\\HttpFoundation\\Session\\SessionInterface` interface.

.. caution::

Make sure your PHP session isn't already started before using the Session
class. If you have a legacy session system that starts your session, see
http://symfony.com/doc/current/components/http_foundation/session_php_bridge.html

Quick example::

use Symfony\Component\HttpFoundation\Session\Session;
Expand Down

0 comments on commit d92c522

Please sign in to comment.