zendframework / zend-session

Manage and preserve session data, a logical complement of cookie data, across multiple page requests by the same client.
BSD 3-Clause "New" or "Revised" License
42 stars 62 forks source link

Remove unreachable code in SessionManager #96

Closed Xerkus closed 6 years ago

Xerkus commented 6 years ago

Traversable case is already covered in previous conditional block

michalbundyra commented 6 years ago

I was digging it a bit before, and now I think it is not possible to have Traversable $_SESSION and not StorageInterface. I think this because we allow only StorageInterface as session storage, and we should check only this. I know that before we check there for Traversable but I think it was wrong (it doesn't work correctly anyway) - so I think now we should remove traversable conditions at all.

Xerkus commented 6 years ago

It is superglobal, it can be set by something else and for that reason check makes sense.

michalbundyra commented 6 years ago

@Xerkus

It is superglobal, it can be set by something else and for that reason check makes sense.

Should we care about it if it was set by something else, and it's not compatible with the library?

I'm not sure this conversion to array for traversable, because it is not recursive, and not sure if it should be....

Xerkus commented 6 years ago

yay. way to go pecl, way to go...

$ pecl -q install mongodb
pecl/mongodb is already installed and is the same as the released version 1.3.3
install failed
weierophinney commented 6 years ago

Thanks, @Xerkus