Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Determine the lowest-possible of zendframework/zend-dom that's compatible with the trait #9

Closed
stevegrunwell opened this issue Jan 12, 2018 · 2 comments

Comments

@stevegrunwell
Copy link
Owner

To maximize portability, we should determine the lowest available version of the one non-dev dependency (zendframework/zend-dom) and specify the widest range possible for loading the library.

@mhujer's Composer tips article has some good details on how to automate the testing of this with Travis CI.

@stevegrunwell
Copy link
Owner Author

Did a bit of manual testing, using the following pattern:

  1. Choose the lowest published (minor) version from Packagist (^2.0, to start)

  2. Run the following locally:

    $ composer update --prefer-lowest --prefer-stable
    
  3. Run PHPUnit and look for errors.

  4. If errors are found, move to the next minor version and try again.

Eventually, I was able to narrow it down to version 2.2.5 that introduced the fix. The changelog for that release is a little all over the place (this was before Zend split all of the components into separate packages), but I believe it was zendframework/zendframework#5351 that fixed it.

stevegrunwell added a commit that referenced this issue Jan 14, 2018
Versions prior to 2.2.5 would cause the tests for this package to emit errors like the following:

1) Tests\MarkupAssertionsTraitTest::testAssertContainsSelector with data set "Tag with href attribute" ('a[href="https://example.com"]')
ErrorException: DOMXPath::query(): Invalid predicate

/phpunit-markup-assertions/vendor/zendframework/zend-dom/src/Query.php:317
/phpunit-markup-assertions/vendor/zendframework/zend-dom/src/Query.php:269
/phpunit-markup-assertions/vendor/zendframework/zend-dom/src/Query.php:214
/phpunit-markup-assertions/src/MarkupAssertionsTrait.php:106
/phpunit-markup-assertions/src/MarkupAssertionsTrait.php:26
/phpunit-markup-assertions/tests/MarkupAssertionsTraitTest.php:31

Refs #9.
stevegrunwell added a commit that referenced this issue Jan 14, 2018
@stevegrunwell
Copy link
Owner Author

Fixed in a3abdac.

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

No branches or pull requests

1 participant