Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[HttpFoundation] fixed bag registration after session start #16136

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

Closed
wants to merge 3 commits into from
Closed

[HttpFoundation] fixed bag registration after session start #16136

wants to merge 3 commits into from

Conversation

digilist
Copy link
Contributor

@digilist digilist commented Oct 5, 2015

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #10707
License MIT
Doc PR

I suggested this fix some time ago, but there were no resoponses. Hopefully, this PR finds some attention 😃

public function testRegisterBagAfterStarting()
{
$storage = $this->getStorage();
$storage->start();
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you also add a test to see what happens when you register before starting?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, see above. Did you expect it this way?

* @param SessionBagInterface $bag
* @param array|null $session
*/
protected function loadSessionBag(SessionBagInterface $bag, array &$session = null)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be private.

@fabpot
Copy link
Member

fabpot commented Mar 2, 2016

Closing as the "right" fix would instead be to throw an exception when trying to register a bag after the session is started.

@fabpot fabpot closed this Mar 2, 2016
fabpot added a commit that referenced this pull request Mar 8, 2016
…ed sessions (xabbuh)

This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] exception when registering bags for started sessions

| Q             | A
| ------------- | ---
| Branch        | 2.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10707, #16136
| License       | MIT
| Doc PR        |

Commits
-------

c4a5b67 exception when registering bags for started sessions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants