Skip to content

Reverting the cloning of sessions before releasing #445

Closed

Description

@stof

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.

What do you think about it ?

Activity

  1. aik099 commented on Jan 14, 2014

    @aik099
    Member

    👍 for removing __clone method from Session and *Driver classes in general and before 1.6 release in particular.

  2. added 2 commits that reference this issue on Jan 19, 2014
    539a4f6
    d4a38ac
  3. added this to the 1.6 milestone on Mar 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions