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

MongoDB Session class #1944

Merged
merged 1 commit into from Jan 13, 2014
Merged

MongoDB Session class #1944

merged 1 commit into from Jan 13, 2014

Conversation

@klimov-paul
Copy link
Member

@klimov-paul klimov-paul commented Jan 13, 2014

Add mongo db session storage.

Migrated from #1920

if (YII_DEBUG) {
echo $e->getMessage();
}
// it is too late to log an error message here

This comment has been minimized.

@cebe

cebe Jan 13, 2014
Member

Why can't we log a message here? Also stacktrace should be printed additionally to the message.
Maybe a workaround like this is applicable here: https://github.com/yiisoft/yii2/blob/master/framework/mail/BaseMessage.php#L43 ?

This comment has been minimized.

@klimov-paul

klimov-paul Jan 13, 2014
Author Member

I don't know. This is the part of DbSession code adapted for MongoDB.

This comment has been minimized.

@cebe

cebe Jan 13, 2014
Member

will add a separate issue for this then. #1946 to be fixed in general, so you can merge this PR without change.

@cebe
Copy link
Member

@cebe cebe commented Jan 13, 2014

rest looks good to me :)

$query = new Query;
$row = $query->from($this->sessionCollection)
->where(['id' => $oldID])
->one($this->db);

This comment has been minimized.

@igogo5yo

igogo5yo Jan 13, 2014

I think that there is better to use count()

This comment has been minimized.

@cebe

cebe Jan 13, 2014
Member

row is used in code afterwards. count is not sufficient.

This comment has been minimized.

@igogo5yo

igogo5yo Jan 13, 2014

Exactly! My mistake :(

klimov-paul added a commit that referenced this pull request Jan 13, 2014
MongoDB Session class
@klimov-paul klimov-paul merged commit bf537af into yiisoft:master Jan 13, 2014
1 check passed
1 check passed
default The Travis CI build passed
Details
@ghost ghost assigned klimov-paul Jan 13, 2014
@klimov-paul klimov-paul deleted the klimov-paul:mongodb-session branch Jun 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.