You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reverting the cloning of sessions before releasing #445
The develop branch contains an implementation of __clone on the Session, which is not yet released. But it has many limitations:
the implementation relies on drivers being cloneable properly. But this is not the case. Each driver depends on external libraries to implement the logic, and this would imply that they can be cloned properly to avoid sharing state between sessions. But this is not the case (a BrowserKit client cannot be cloned properly for instance, and this is an explicit choice as it would cause the same issues again related to BrowserKit implementations)
the primary reason for the support of cloning was to allow using several sessions based on the same driver type in Behat, because the MinkExtension 1.x was not configuring sessions but drivers. This is obsolete now as the MinkExtension 2.x (for Behat 3.0+) now supports configuring sessions properly
the architecture changes done in changing the Goutte autoload path to "." instead of "src/" - the Goutte ... #247 won't allow cloning the object graph easily anymore while maintaining a consistent object graph (as some objects are sharing a common dependency, which should still be a common clone after cloning), so I was already suggesting to drop it in 2.x
I think we should revert this change before release Mink 1.6, and encourage users to create their separate sessions in a clean way.
Activity
aik099 commentedon Jan 14, 2014
👍 for removing
__clonemethod from Session and *Driver classes in general and before 1.6 release in particular.Reverted the cloning implementation for the Session
Reverted the cloning implementation for the Session