GravityPDF / querypath

A fork of QueryPath: a PHP library for HTML(5)/XML querying (CSS 4 or XPath) and processing (like jQuery) with PHP8.3 support
Other
21 stars 2 forks source link

Refactor PHPUnit #29

Closed jakejackson1 closed 1 year ago

jakejackson1 commented 1 year ago

Explicitly display all PHP errors, notices, deprecations. Use new PHPUnit syntax for XML Remove extra autoload require statement Remove old code coverage bash script

Pull Request type

Please check the type of change your PR introduces:

What is the current behavior?

PHPUnit wasn't reporting deprecation errors correctly and missed a message in the PHP8.1 unit tests.

What is the new behavior?

PHP8.1 correctly reports an issue with the QueryPathIterator class and its return type.

Does this introduce a breaking change?

jakejackson1 commented 1 year ago

I had looked at converting deprecation notices to exceptions in PHPUnit, but this caused issues with earlier versions of PHP where the deprecated create_function() is being used. Until a major release is made which removes this legacy code, we'll have to be fine with only logging deprecation notices.