Skip to content

Relying on old package #262

Closed
Closed

Description

@uuf6429

This package depends on instaclick/php-webdriver, whose last commit was 2 years ago.

Seems to me that facebook/php-webdriver is better supported... why not switch to this package? Are there any functional differences between the two?

Activity

  1. aik099 commented on Jan 30, 2017

    @aik099
    Member

    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.

  2. uuf6429 commented on Jan 30, 2017

    @uuf6429
    MemberAuthor

    OK, cool. I'll give it a try.

  3. smuggli commented on Jan 31, 2017

    @smuggli

    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.

  4. uuf6429 commented on Feb 4, 2017

    @uuf6429
    MemberAuthor

    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:

    • 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
  5. aik099 commented on Feb 5, 2017

    @aik099
    Member

    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.

  6. aik099 commented on Feb 5, 2017

    @aik099
    Member

    I've removed testing on PHP 5.3/5.4 and bumped minimum PHP version to 5.5

    Why?

    I've added PHPUnit to require-dev

    Why?

  7. aik099 commented on Feb 5, 2017

    @aik099
    Member

    You'd better send a PR so that we can review it.

  8. aik099 commented on Feb 5, 2017

    @aik099
    Member

    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
  9. uuf6429 commented on Feb 5, 2017

    @uuf6429
    MemberAuthor

    @aik099

    • 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 :)
  10. uuf6429 commented on Feb 5, 2017

    @uuf6429
    MemberAuthor

    Done: #263

  11. aik099 commented on Feb 5, 2017

    @aik099
    Member

    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.

  12. aik099 commented on Feb 5, 2017

    @aik099
    Member

    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.

  13. uuf6429 commented on Feb 5, 2017

    @uuf6429
    MemberAuthor

    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..

  14. aik099 commented on Feb 5, 2017

    @aik099
    Member

    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.

  15. aik099 commented on Feb 5, 2017

    @aik099
    Member

    That explains the horrible coding I've seen trying to simulate finally... :/

    Can you please reference link to that code? I haven't seen that myself.

  16. uuf6429 commented on Feb 5, 2017

    @uuf6429
    MemberAuthor

    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.

    Here: https://github.com/minkphp/MinkSelenium2Driver/blob/master/src/Selenium2Driver.php#L1177-L1196

  17. uuf6429 commented on Feb 5, 2017

    @uuf6429
    MemberAuthor

    @aik099 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.

  18. aik099 commented on Feb 5, 2017

    @aik099
    Member

    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.

  19. uuf6429 commented on Feb 5, 2017

    @uuf6429
    MemberAuthor

    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.

  20. aik099 commented on Feb 5, 2017

    @aik099
    Member

    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.

  21. aik099 commented on Feb 5, 2017

    @aik099
    Member

    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
  22. uuf6429 commented on Feb 5, 2017

    @uuf6429
    MemberAuthor

    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.

  23. aik099 commented on Feb 5, 2017

    @aik099
    Member

    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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions