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

Resolve PHP8.1 Deprecation Notice #32

Closed jakejackson1 closed 1 year ago

jakejackson1 commented 1 year ago

Fixes the following in a backwards-compatible way

PHP Deprecated: Return type of QueryPath\QueryPathIterator::current() should either be compatible with IteratorIterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/runner/work/querypath/querypath/src/QueryPathIterator.php on line 29

Resolves #27

Pull Request type

Please check the type of change your PR introduces:

What is the current behavior?

This notice is triggered when running PHP 8.1

PHP Deprecated: Return type of QueryPath\QueryPathIterator::current() should either be compatible with IteratorIterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/runner/work/querypath/querypath/src/QueryPathIterator.php on line 29

What is the new behavior?

The notice is no longer present.

Does this introduce a breaking change?