Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Session cleanup#3333

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 4 commits intosymfony:masterfromstof:session_cleanup
Feb 12, 2012
Merged

Session cleanup#3333

fabpot merged 4 commits intosymfony:masterfromstof:session_cleanup
Feb 12, 2012

Conversation

@stof
Copy link
Member

This cleans the phpdoc of the refactored session by using inheritdoc in all appropriate places. For the SessionInterface, I added the@api tag in all methods as the Session class had them.
It also fixes a few typos in the variable names.

I figured a few things:

  • the Session class implements some methods that are not part of the SessionInterface. Is it intended or simply a left-over ?
  • the MemcachedSessionStorage uses aprefix property which does not exist. This is clearly a copy-paste from the MemcacheSessionStorage which has it. It also call theMemcached#close method which does not exist according to PhpStorm.@Drak could you check this class ? I don't know Memcached at all.
  • as I said on the refactoring PR, the Serializable implementation of the Session class seems totally wrong as the SessionStorage is not serializable.

/cc@Drak

@ghost
Copy link

@stof there is a ticket about this, the problem exists from Symfony 2.0 also - refs#3000 PDOSessionStorage

@ghost
Copy link

@stof I will look at the memcache issue and make a quick PR

@stof
Copy link
MemberAuthor

@Drak the issue could exist with any SessionStorage as your SessionStorageInterface does not enforce making it serializable

@stof
Copy link
MemberAuthor

@Drak note that this PR already fixes 2 typo in the memcached storage. It seems like some tests are missing for it as they should have been found (they would have raised a notice in the constructor)

@ghost
Copy link

Afaik, only PDO is not serializable@ but theSerializable is on the SessionInterface. The problem is with#3000, the serialization is necessary but impossible.

@stof
Copy link
MemberAuthor

@Drak what about a Mongo storage or things like that ?

@ghost
Copy link

@stof Since you've started this PR would you mind removing$prefix. from the*session() methods inMemcachedSessionStorage - they are not required because Memcached handles prefixes itself. I'll write some tests in another PR for them. I guess I omitted it because at the time I didn't have them on my test env.

@ghost
Copy link

@stof - Let's take the serialization issue to#3000 because it's being discussed there.

@stof
Copy link
MemberAuthor

@Drak what about theclose() method which does not exist in the Memcached class ?

@ghost
Copy link

The method just needs toreturn true;.

fabpot added a commit that referenced this pull requestFeb 12, 2012
Commits-------2c767d1 [HttpFoundation] Fixed closeSession for the Memcached storageec44e68 [HttpFoundation] Fixed the use of the prefix for the Memcached storage5808773 [HttpFoundation] Fixed a typo and updated the phpdoc for the session0550bef Removed methods duplicated from parent classDiscussion----------Session cleanupThis cleans the phpdoc of the refactored session by using inheritdoc in all appropriate places. For the SessionInterface, I added the ``@api`` tag in all methods as the Session class had them.It also fixes a few typos in the variable names.I figured a few things:- the Session class implements some methods that are not part of the SessionInterface. Is it intended or simply a left-over ?- the MemcachedSessionStorage uses a ``prefix`` property which does not exist. This is clearly a copy-paste from the MemcacheSessionStorage which has it. It also call the ``Memcached#close`` method which does not exist according to PhpStorm.@Drak could you check this class ? I don't know Memcached at all.- as I said on the refactoring PR, the Serializable implementation of the Session class seems totally wrong as the SessionStorage is not serializable./cc@Drak---------------------------------------------------------------------------by drak at 2012-02-12T02:09:38Z@stof there is a ticket about this, the problem exists from Symfony 2.0 also - refs#3000 PDOSessionStorage---------------------------------------------------------------------------by drak at 2012-02-12T02:10:12Z@stof I will look at the memcache issue and make a quick PR---------------------------------------------------------------------------by stof at 2012-02-12T02:11:07Z@Drak the issue could exist with any SessionStorage as your SessionStorageInterface does not enforce making it serializable---------------------------------------------------------------------------by stof at 2012-02-12T02:14:15Z@Drak note that this PR already fixes 2 typo in the memcached storage. It seems like some tests are missing for it as they should have been found (they would have raised a notice in the constructor)---------------------------------------------------------------------------by drak at 2012-02-12T02:14:50ZAfaik, only PDO is not serializable@ but the `Serializable` is on the SessionInterface.  The problem is with#3000, the serialization is necessary but impossible.---------------------------------------------------------------------------by stof at 2012-02-12T02:21:42Z@Drak what about a Mongo storage or things like that ?---------------------------------------------------------------------------by drak at 2012-02-12T02:23:58Z@stof Since you've started this PR would you mind removing `$prefix.` from the `*session()` methods in `MemcachedSessionStorage` - they are not required because Memcached handles prefixes itself.  I'll write some tests in another PR for them.  I guess I omitted it because at the time I didn't have them on my test env.---------------------------------------------------------------------------by drak at 2012-02-12T02:24:35Z@stof - Let's take the serialization issue to#3000 because it's being discussed there.---------------------------------------------------------------------------by stof at 2012-02-12T02:27:27Z@Drak what about the ``close()`` method which does not exist in the Memcached class ?---------------------------------------------------------------------------by drak at 2012-02-12T03:58:11ZThe method just needs to `return true;`.
@fabpotfabpot merged commit2c767d1 intosymfony:masterFeb 12, 2012
nicolas-grekas added a commit that referenced this pull requestJan 25, 2019
…se connection (grachevko)This PR was merged into the 3.4 branch.Discussion----------[HttpFoundation] MemcachedSessionHandler::close() must close connection| Q             | A| ------------- | ---| Branch?       | 3.4 <!-- see below -->| Bug fix?      | yes| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->| BC breaks?    | no     <!-- seehttps://symfony.com/bc -->| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->| License       | MITIntoduced here#3333Commits-------38a9d8b [Bugfix] MemcachedSessionHandler::close() must close connection
symfony-splitter pushed a commit to symfony/http-foundation that referenced this pull requestJan 25, 2019
…se connection (grachevko)This PR was merged into the 3.4 branch.Discussion----------[HttpFoundation] MemcachedSessionHandler::close() must close connection| Q             | A| ------------- | ---| Branch?       | 3.4 <!-- see below -->| Bug fix?      | yes| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->| BC breaks?    | no     <!-- seehttps://symfony.com/bc -->| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->| License       | MITIntoduced heresymfony/symfony#3333Commits-------38a9d8b6a3 [Bugfix] MemcachedSessionHandler::close() must close connection
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@stof@fabpot

[8]ページ先頭

©2009-2025 Movatter.jp