-
Notifications
You must be signed in to change notification settings - Fork 22
Conversation
Turns out there are two implementations of `UnsupportedDriverActionException`: one in Mink and one in PaulGibbs. I had imported the incorrect one in `UserAwareContextTrait`
Turns out there are two implementations of `UnsupportedDriverActionException`: one in Mink and one in PaulGibbs. I had imported the incorrect one in `UserAwareContextTrait`
Turns out there are two implementations of `UnsupportedDriverActionException`: one in Mink and one in PaulGibbs. I had imported the incorrect one in `UserAwareContextTrait`
tweaks to your Fix-134 branch
I'm not convinced. I don't want to introduce "Entity" because that's just a new name and we haven't found a use for that anywhere else. If a Context had a new trait, it'd go into the context/trait(s)/ folder, and if some non-Context object needed a trait, we'd just sub-namespace under that appropriately. I think the options are between:
|
Entity is what the matching classes are called on the driver side. I'll
rename the folder. Don't really mind what it's called :o)
…On Fri, 20 Oct 2017, 16:23 Paul Gibbs, ***@***.***> wrote:
I think we need to plan for the situation that we have traits to do other
things. If awareness sounds odd then how about Entity - EntityTraits might
be even better?
I'm not convinced. I don't want to introduce "Entity" because that's just
a new name and we haven't found a use for that anywhere else. If a Context
had a new trait, it'd go into the context/trait(s)/ folder, and if some
non-Context object needed a trait, we'd just sub-namespace under that
appropriately.
I think the options are between:
1.
removing the proposed Awareness folder and namespace entirely and
putting everything in to src/Context/ (like the existing
PageObjectContextTrait.php, which I guess we'd rename to
PageObjectAwareContextTrait.php for this new naming convention).
2.
renaming Awareness to Trait or something else yet to be suggested.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#144 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADO2yfwahRLtTYFHyBFZDqAOfEZdwCToks5suLr0gaJpZM4P8nvW>
.
|
You might be thinking of Element.
On 20 October 2017 at 16:25, Richard Vodden <notifications@github.com>
wrote:
… Entity is what the matching classes are called on the driver side. I'll
rename the folder. Don't really mind what it's called :o)
On Fri, 20 Oct 2017, 16:23 Paul Gibbs, ***@***.***> wrote:
> I think we need to plan for the situation that we have traits to do other
> things. If awareness sounds odd then how about Entity - EntityTraits
might
> be even better?
>
> I'm not convinced. I don't want to introduce "Entity" because that's just
> a new name and we haven't found a use for that anywhere else. If a
Context
> had a new trait, it'd go into the context/trait(s)/ folder, and if some
> non-Context object needed a trait, we'd just sub-namespace under that
> appropriately.
>
> I think the options are between:
>
> 1.
>
> removing the proposed Awareness folder and namespace entirely and
> putting everything in to src/Context/ (like the existing
> PageObjectContextTrait.php, which I guess we'd rename to
> PageObjectAwareContextTrait.php for this new naming convention).
> 2.
>
> renaming Awareness to Trait or something else yet to be suggested.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/paulgibbs/behat-wordpress-extension/
pull/144#issuecomment-338238429>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
ADO2yfwahRLtTYFHyBFZDqAOfEZdwCToks5suLr0gaJpZM4P8nvW>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#144 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABN4Crd_d2gj6wwx91aDIvUO2-VjPlxCks5suLtagaJpZM4P8nvW>
.
--
Regards,
Paul Gibbs
|
ahah - EXACTLY - serves me right for making suggestions without looking at the code base. What do you think of ElementTraits? |
I noticed that my IDE couldn't resolve the call to getDriver() in any of the AwarenessTraits. This is because getDriver() is declared in RawWordPressContext which is not part of the AwarenessTrait hierachy. I have therefore created BaseAwarenessTrait which contains a single abstract method getDriver(). This means if an AwarenessTrait is included in a class which does not implement getDriver() there will be a compliation time failure - rather than a messy runtime debug. It also means that IDEs know what getDriver is and can make proper use of the type hinting we've included.
they’re not really traits for an element, they’re for a context. But. Given we are only talking about the name of part of a namespace and a folder name, I like it better than Awareness by lots. |
Changed the Awareness folder to traits. Unfortunately 'trait' which I think both of us would have preferred is a reserved word and therefore cannot be used as part of a namespace.
Right @paulgibbs all yours! I have a couple of comments:
Now all of the driver agnostic code is in the traights. All the driver specific code is in the drivers. Let me know what you think - I've been pretty thorough with scrutinizer and codacy, but I dare say I've missed something. :-) |
In reply to yours:
Also:
Great work, again! |
@rvodden I've told Github to give you push access to this repository. Once you have it, please merge this PR in. I don't want to become a roadblock or speed bump to any change you may wish to contribute in the future. :) If you can jump on our Slack channel, we can have a conversation sometime about how we commit to master, but in a nutshell: 1) don't worry about breaking things, 2) please do not tag new releases, 3) never commit to master, 4) be patient and try hard to let someone else code review/merge your branches, and finally 5) know when to break these rules (great power comes with great responsibility). Thanks again :) |
Thanks Paul - a very sensible set of rules. I'm delighted to be on board. |
Resolution to issue #134