MongoDB Session class #1944

Merged
merged 1 commit into from Jan 13, 2014

Conversation

Projects
None yet
3 participants
@klimov-paul
Member

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 ?

@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

Member

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

@klimov-paul

klimov-paul Jan 13, 2014

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

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

This comment has been minimized.

Show comment
Hide comment
@cebe

cebe Jan 13, 2014

Member

rest looks good to me :)

Member

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()

@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.

@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 :(

@igogo5yo

igogo5yo Jan 13, 2014

Exactly! My mistake :(

klimov-paul added a commit that referenced this pull request Jan 13, 2014

@klimov-paul klimov-paul merged commit bf537af into yiisoft:master Jan 13, 2014

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