Skip to content

Conversation

@stof
Copy link
Member

@stof stof commented Jan 8, 2015

The goal is to ease the development of Mink 2.0 by allowing drivers to be compatible with both Mink 1.7 and 2.0 on a single code base. The only change required for drivers is now handled at the level of the CoreDriver shipped in Mink when drivers should to override findElements rather than find (see https://github.com/minkphp/MinkZombieDriver/pull/58/files for what is required currently).
This will allow decoupling the 2.0 version of Mink from a new major version of drivers (the new major version of ZombieDriver should rather be related to the full rewrite suggested in minkphp/MinkZombieDriver#104 if it ever happens than to the Mink refactoring for instance)

@aik099
Copy link
Member

aik099 commented Jan 8, 2015

OK.

@stof
Copy link
Member Author

stof commented Jan 8, 2015

this is how it will impact drivers regarding to the Mink versions:

  • current stable release: ~1.6 => Mink 1.6 and 1.7 (I don't plan a 1.8 release, but it would also support it if any)
  • next driver release switching to implementing findElements instead: ~1.7|~2.0, supporting both the latest 1.x versions (so people can use it easily) and the next Mink version (for people dealing with the necessary upgrades for BC breaks in the API). any work in drivers will then support both.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% satisfied about the name of this method (it does not return Element objects after all). But I don't have a better idea. What about you @aik099 ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it finds xpaths of elements within element with given xpath. We don't have much words to operate with here. Only find, element, xpath, but since xpath is implementation detail we can't use it method name.

Maybe we can call it findElementSelectors.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also see an issue with this name: we also use the concept of Selector in Mink, and it is not exactly the same think than here (even though it is related)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@everzet do you have any suggestion about the name ?

@aik099 what do you think ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

matchElements() ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, my issue with the findElements name is the elements part, because it does not return elements objects. So matchElements is not better in this regard

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method accepts xpaths and returns xpaths and it's unlikely, that this behavior will change any time soon. Maybe we should expose xpath word in method name.

Another set of possible names:

  • findElementXpaths
  • findElementLocators
  • findSubXpaths
  • findLocatorsFromXpath

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will go for findElementXpaths

@stof stof added this to the 1.7 milestone Jan 8, 2015
@stof stof force-pushed the forward_compatibility branch 2 times, most recently from f07ed9e to 1ccc391 Compare February 4, 2015 17:12
@stof
Copy link
Member Author

stof commented Feb 4, 2015

@aik099 are we good now ?

@aik099
Copy link
Member

aik099 commented Feb 4, 2015

Yes.

The goal is to ease the development of Mink 2.0 by allowing drivers to
be compatible with both Mink 1.7 and 2.0 on a single code base. The only
change required for drivers is now handled at the level of the
CoreDriver shipped in Mink when drivers should to override
findElementXpaths rather than find.
@stof
Copy link
Member Author

stof commented Feb 4, 2015

All driver PRs are now done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants