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

Allow setting session namespace and prefix #1060

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

filips123
Copy link
Contributor

@filips123 filips123 commented Mar 30, 2019

Q                       A
Fixed Issues? Fixes #828, #1036
Patch: Bug Fix? No
Major: Breaking Change? No
Minor: New Feature? Yes
Documentation PR No

I added support for setting session namespace and prefix.

Copy link
Member

@ApacheEx ApacheEx left a comment

Choose a reason for hiding this comment

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

Thanks for your PR - it makes sense for sure, but probably it's not good idea to allow using empty storeNamespace...

}

/**
* {@inheritdoc}
*/
public function clear()
{
$_SESSION[$this->storeNamespace] = [];
if (!$this->storeNamespace) {
$_SESSION = [];
Copy link
Member

Choose a reason for hiding this comment

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

not sure if it's safe .... need to find out another way

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree. But without namespace, this is probably only an easy way. Another way may be to manually unset all keys that are set by HybridAuth.

Copy link
Member

@ApacheEx ApacheEx Oct 1, 2019

Choose a reason for hiding this comment

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

@filips123 how about this:

we make storeNamespace as required param - So, then we are safe.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ApacheEx Ok, I will fix this tomorrow.

src/Storage/Session.php Outdated Show resolved Hide resolved
src/Storage/Session.php Outdated Show resolved Hide resolved
src/Storage/Session.php Outdated Show resolved Hide resolved
@StorytellerCZ StorytellerCZ modified the milestones: 3.x, 3.1 Aug 20, 2019
@ApacheEx ApacheEx modified the milestones: 3.1, 3.2 Dec 13, 2019
@ApacheEx ApacheEx modified the milestones: 3.2, 3.3 Mar 4, 2020
@ApacheEx ApacheEx modified the milestones: 3.3, 3.4 Apr 16, 2020
@ApacheEx ApacheEx modified the milestones: 3.4, 3.5 Jul 21, 2020
@ApacheEx ApacheEx modified the milestones: 3.5, 3.x Sep 3, 2020
@nikitasinelnikov
Copy link

Hi there guys!

Are you still planning to merge this PR with the master and add it to the released version?
Or there is possible to change the storeNamespace in another way?

Let me know,
Best Regards!

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.

Change store namespace
4 participants