You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, I was not able to run the tests locally. I tried: running tests on my host (Windows) machine, running in Ubuntu via WSL and running via docker. All yielded the same failure, more or less (failed at setDesiredCapabilities test).
Notes:
I've removed testing on PHP 5.3/5.4 and bumped minimum PHP version to 5.5
I've added PHPUnit to require-dev
Currently relies on a proxy class called Selenium2DriverSession, but I'll probably remove it later on
It is not fully backward-compatible because some classes no longer exist
The mentioned Travis CI build doesn't really help, because all tests end up with The job exceeded the maximum time limit for jobs, and has been terminated. message and don't show why they've failed.
And I already see many changes, that should be avoided, like:
changing array( ... ) into [] (the PHP 5.4 array syntax) - we must be PHP 5.3 compatible
removing formatting from multi-line array declarations
adding spaces around . (concatenation operator)
whole file upload code was removed, but it was there to support remote file uploads; not sure if sendKeys in Facebook driver version is clever enough to do this
code for setting desired capabilities was removed and probably that's why tests for it fail
Travis CI - I had set the stopOnFailure option, but removed it afterwards - my fault, I'll add it back.
PHP 5.3/5.4 - Security releases for PHP 5.4 stopped at the end of 2015, moreover there are features in PHP 5.5 that are invaluable to development (eg; finally, ::class, etc).
PHPUnit is required for development (class in tests eventually rely on PHPUnit)
The rest of the comments can be better addressed in the PR that I'm opening now :)
PHP 5.3/5.4 - Security releases for PHP 5.4 stopped at the end of 2015, moreover there are features in PHP 5.5 that are invaluable to development (eg; finally, ::class, etc).
That was already discussed in minkphp/Mink#729. We won't be dropping PHP version support because of feature in newer PHP versions that we don't use.
PHPUnit is required for development (class in tests eventually rely on PHPUnit)
This is a topic that would always be a problem, because some people believe that PHPUnit must be a dev dependency and some who believe it shouldn't be. Since we don't have it as dev dependency current, then you can guess on which side of the discussion Mink team is 😄 . Please remove it.
That was already discussed in minkphp/Mink#729. We won't be dropping PHP version support because of feature in newer PHP versions that we don't use.
That explains the horrible coding I've seen trying to simulate finally... :/
This is a topic that would always be a problem, because some people believe that PHPUnit must be a dev dependency and some who believe it shouldn't be. Since we don't have it as dev dependency current, then you can guess on which side of the discussion Mink team is 😄 . Please remove it.
Regarding PHPUnit... there's a file in the project root, phpunit.xml.dist.... I wonder what it is for. :)
Seriously though, why make it difficult for devs? I spent way more time trying to get tests to work than actually writing the new code. :(
As to enforcing coding style, why not use php-cs-fixer? Then you don't have to go after the devs of every PR to complain about things like array style or spaces around concat operator... I can do it in my PR if you want..
Regarding PHPUnit... there's a file in the project root, phpunit.xml.dist.... I wonder what it is for. :)
It's for people who have PHPUnit installed globally on their computer (e.g. via Composer) which can run phpunit in project folder. No need to have a copy of PHPUnit in each project using it.
It's for people who have PHPUnit installed globally on their computer (e.g. via Composer) which can run phpunit in project folder. No need to have a copy of PHPUnit in each project using it.
Let's agree to disagree and I'll remove it.
Can you reference link to that code? I haven't seen that myself.
By the way, facebook/php-webdriver requires at least PHP 5.5... so we either increase minimum version, or not do this transition at all.
That's unfortunate. If I knew that prior you making any code changes, then I could have closed the issue upfront. Surely we won't be changing minimal PHP version for the driver to PHP 5.5.
I don't see the reason behind the obsession of supporting PHP 5.3/4... the excuse I hear about old version is that you won't drop support because of features you don't use. Well I say this excuse is not valid anymore.
No one should be using those old PHP versions, and even if they do... just use the old version of MinkSelenium2Driver. IMO you should draw a line and upgrade - bump the major version of this package and let the old one die.
If you still believe in supporting those unsupported PHP versions, let me know and I'll close this PR.
The older PHP versions are supported because people are still using them. Fact, that they're not supported by PHP team doesn't mean all people will stop using them.
By increasing minimum supported PHP version library developers effectively preventing library users from updating to it until they update PHP version on their servers first.
I think this is not fair move from library developers side to block users from receiving new features just because they use older PHP version.
By the way obsession works other way around: require latest released PHP version just because it's released. From company side that use PHP there is no point to upgrade to newer PHP version because:
everything works perfectly on current PHP version
project code might not even work on upgraded PHP version
I disagree, you can be obsessed with both old or latest version. I think it's perfectly fair to force developers to upgrade their software whose last security patch was released 2 years ago.
Remember that between 5.4 and 7 there are two other versions, one is completely unsupported, and the other partially unsupported.
So basically you decided to hurt development to support a few hypothetical devs still stuck in '14. Fine by me.
We're just not forcing anything 😉 . Library developers forcing library consumers to upgrade their PHP version is the same as if McDonalds would replace beef in their burgers with chicken because they think it's best for the customer. It's always the customer (library consumer) who needs to choose.
Activity
aik099 commentedon Jan 30, 2017
There was an attempt to do it in #79 PR, but nothing was merged due PR author seem to have abandoned it.
If you can switch to Facebook version of the Web Driver client without introducing a BC breaks, then why not.
uuf6429 commentedon Jan 30, 2017
OK, cool. I'll give it a try.
smuggli commentedon Jan 31, 2017
Would love to see that! Worked with both drivers and facebook's is way better. If BCs come up, why not introduce a new mink driver.
uuf6429 commentedon Feb 4, 2017
Guys, I rewrote it with my (minimal) understanding of this whole system:
master...uuf6429:Switch-to-FB-webdriver
However as you can see, something is broken (and I do not understand the details):
https://travis-ci.org/uuf6429/MinkSelenium2Driver
Unfortunately, I was not able to run the tests locally. I tried: running tests on my host (Windows) machine, running in Ubuntu via WSL and running via docker. All yielded the same failure, more or less (failed at setDesiredCapabilities test).
Notes:
Selenium2DriverSession, but I'll probably remove it later onaik099 commentedon Feb 5, 2017
The mentioned Travis CI build doesn't really help, because all tests end up with
The job exceeded the maximum time limit for jobs, and has been terminated.message and don't show why they've failed.aik099 commentedon Feb 5, 2017
Why?
Why?
aik099 commentedon Feb 5, 2017
You'd better send a PR so that we can review it.
aik099 commentedon Feb 5, 2017
And I already see many changes, that should be avoided, like:
array( ... )into[](the PHP 5.4 array syntax) - we must be PHP 5.3 compatible.(concatenation operator)sendKeysin Facebook driver version is clever enough to do thisuuf6429 commentedon Feb 5, 2017
@aik099
stopOnFailureoption, but removed it afterwards - my fault, I'll add it back.finally,::class, etc).testseventually rely on PHPUnit)uuf6429 commentedon Feb 5, 2017
Done: #263
aik099 commentedon Feb 5, 2017
That was already discussed in minkphp/Mink#729. We won't be dropping PHP version support because of feature in newer PHP versions that we don't use.
aik099 commentedon Feb 5, 2017
This is a topic that would always be a problem, because some people believe that PHPUnit must be a dev dependency and some who believe it shouldn't be. Since we don't have it as dev dependency current, then you can guess on which side of the discussion Mink team is 😄 . Please remove it.
uuf6429 commentedon Feb 5, 2017
That explains the horrible coding I've seen trying to simulate
finally... :/Regarding PHPUnit... there's a file in the project root, phpunit.xml.dist.... I wonder what it is for. :)
Seriously though, why make it difficult for devs? I spent way more time trying to get tests to work than actually writing the new code. :(
As to enforcing coding style, why not use php-cs-fixer? Then you don't have to go after the devs of every PR to complain about things like array style or spaces around concat operator... I can do it in my PR if you want..
aik099 commentedon Feb 5, 2017
It's for people who have PHPUnit installed globally on their computer (e.g. via Composer) which can run
phpunitin project folder. No need to have a copy of PHPUnit in each project using it.aik099 commentedon Feb 5, 2017
Can you please reference link to that code? I haven't seen that myself.
uuf6429 commentedon Feb 5, 2017
Let's agree to disagree and I'll remove it.
Here: https://github.com/minkphp/MinkSelenium2Driver/blob/master/src/Selenium2Driver.php#L1177-L1196
uuf6429 commentedon Feb 5, 2017
@aik099 By the way,
facebook/php-webdriverrequires at least PHP 5.5... so we either increase minimum version, or not do this transition at all.aik099 commentedon Feb 5, 2017
That's unfortunate. If I knew that prior you making any code changes, then I could have closed the issue upfront. Surely we won't be changing minimal PHP version for the driver to PHP 5.5.
uuf6429 commentedon Feb 5, 2017
I don't see the reason behind the obsession of supporting PHP 5.3/4... the excuse I hear about old version is that you won't drop support because of features you don't use. Well I say this excuse is not valid anymore.
No one should be using those old PHP versions, and even if they do... just use the old version of MinkSelenium2Driver. IMO you should draw a line and upgrade - bump the major version of this package and let the old one die.
If you still believe in supporting those unsupported PHP versions, let me know and I'll close this PR.
aik099 commentedon Feb 5, 2017
The older PHP versions are supported because people are still using them. Fact, that they're not supported by PHP team doesn't mean all people will stop using them.
By increasing minimum supported PHP version library developers effectively preventing library users from updating to it until they update PHP version on their servers first.
I think this is not fair move from library developers side to block users from receiving new features just because they use older PHP version.
aik099 commentedon Feb 5, 2017
By the way obsession works other way around: require latest released PHP version just because it's released. From company side that use PHP there is no point to upgrade to newer PHP version because:
uuf6429 commentedon Feb 5, 2017
I disagree, you can be obsessed with both old or latest version. I think it's perfectly fair to force developers to upgrade their software whose last security patch was released 2 years ago.
Remember that between 5.4 and 7 there are two other versions, one is completely unsupported, and the other partially unsupported.
So basically you decided to hurt development to support a few hypothetical devs still stuck in '14. Fine by me.
aik099 commentedon Feb 5, 2017
We're just not forcing anything 😉 . Library developers forcing library consumers to upgrade their PHP version is the same as if McDonalds would replace beef in their burgers with chicken because they think it's best for the customer. It's always the customer (library consumer) who needs to choose.