Is there any possibility to use the session of Yii 1.1.x and Yii 2.0.8?


I have a criteria to use the Yii framework versions 1.1.x and Yii 2.0.8 together. Is there any possibility of using the Yii 1.1.x session in Yii 2.0.8?

Any idea of handling the versions together?

Thanks in advance


About session as long as you use same session identifier you can access both.

The problem came out if there is a collision between components, like User Identity (dunno if there is a collision between yii1 UI and yi2 UI, just an hypothesis)

If you use different session identifier, no collision but you need to switch between the 2 each time.

Hi Roberto,

Thanks for your reply.

I just followed the same link which you have mentioned, But I face problem where using the identity because in Yii 2 the identity must be an instance of yii\web\IdentityInterface. In case of Yii 1.1.x it is enough to extend the CUserIdentity class.

So I m looking for how overcome this. Am I going in right way?

Thanks in advance.