Mink icon indicating copy to clipboard operation
Mink copied to clipboard

[WIP] Allow use ValueObject for DriverInterface->setValue() method

Open spolischook opened this issue 9 years ago • 11 comments

spolischook avatar Oct 24 '16 14:10 spolischook

  1. Are you sure you can pass an object as $value argument?
  2. How will it work?
  3. Do all drivers support this (behavior covered by tests)?

aik099 avatar Oct 24 '16 14:10 aik099

Yes I need to test it first, unless this purpose have enough votes to implement this.

spolischook avatar Oct 24 '16 14:10 spolischook

Then I don't understand why you send a PR that updated DocBlock to say object passing is supported when this functionality even isn't implemented?

aik099 avatar Oct 24 '16 15:10 aik099

I can even more, try to write tests before functionality isn't implemented))

spolischook avatar Oct 25 '16 02:10 spolischook

@aik099 because you as maintainer, can say that it's not possible and prohibitively to use valueObject in Driver. So I just check is it not prohibited by maintainers.

spolischook avatar Oct 25 '16 02:10 spolischook

I'm not saying it's prohibited. It's completely up to you if you decide to use setValue method in a non-supported way 😉 .

I'm just suggesting, that If DocBlock of the method doesn't say it's possible, then it's not possible (or in rare cases DocBlock is wrong).

If you try to pass an object instead of value and this magically worked for one driver it doesn't mean that it's officially supported behavior in this driver and will work consistently across drivers.

aik099 avatar Oct 25 '16 07:10 aik099

Anyway if you plan to suggest this (passing object as value) as a feature, then I'm 👎 for this, because why things needs to complicated and simple value passing isn't enough.

aik099 avatar Oct 25 '16 07:10 aik099

I really take care about setValue method in Selenium2Driver - it's ugly, isn't it? I'll think about design of this method with value object because it can simplify and open to modify logic of set value, without to inherit Driver.

spolischook avatar Oct 25 '16 07:10 spolischook

Think about all drivers instead, because changes, that improve only 1 driver by default won't be accepted. And also about BC breaks/performance hits you might introduce with this change (you get performance hit, when try to preserve BC by converting non-value object into value object).

aik099 avatar Oct 25 '16 07:10 aik099

Sure, I will add tests and let you know. Please hold it open, I'll do some work with it.

On Mon, Oct 24, 2016 at 6:00 PM, Alexander Obuhovich < [email protected]> wrote:

Then I don't understand why you send a PR that updated DocBlock to say object passing is supported when this functionality even isn't implemented?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/minkphp/Mink/pull/723#issuecomment-255765763, or mute the thread https://github.com/notifications/unsubscribe-auth/AB4v25iElbfMo4DF-fTxZxXRbDiTZ5fkks5q3MgLgaJpZM4Ke3K- .

Serhii Polishchuk Symfony developer

a: 8072 Melrose Ave. Los Angeles, CA 90046 w: www.oroinc.com p: +380 (93) 418 75 75 e: [email protected] [email protected] s: serge_partner_ck

spolischook avatar Oct 25 '16 18:10 spolischook

I'm -1 for this. I don't see value for drivers to be forced to accept any object (they don't know what do do with them anyway)

stof avatar Oct 31 '16 13:10 stof