Closed wouterj closed 3 years ago
Awesome, this looks like the best of both worlds.
Curious to see your pest experiment. It's on my list to check out. Glad to hear it seems like it works with Symfony/browser.
How do you think this should be documented?
(and btw, I'm completely open to an overhaul of the docs if necessary - I find them awkward)
@wouter, as we've discussed in Slack, I'm in favour of just 3 traits (no "trait hacking"):
HasBrowser
: with browser()
method that returns an instance of KernelBrowser
HasHttpBrowser
: with httpBrowser()
method that returns an instance of HttpBrowser
HasPantherBrowser
: with pantherBrowser()
method that returns an instance of PantherBrowser
Are we still on the same page here?
Yes, sorry for the delay here. Everything is now according to our decision as fasr as I can see.
We also discussed changing the README a bit IIRC, to focus on "browser" and then explain panther + httpclient and their special APIs. Let's do that in another PR :)
Thanks @wouterj!
This partially reverts #3, while keeping the API introduced there.
With this change,
HasBrowser
is still available with the same API as before. Yet, all browsers are also available in their own trait.I'm not sure if you want this amount of trait hacking in the library. I'm experimenting with using Browser in Pest. Having a trait for each browser implementation is the best way to configure the browser implementation in Pest.