-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add PHP8.1 Compatibility #12
base: master
Are you sure you want to change the base?
Add PHP8.1 Compatibility #12
Conversation
Add GitHub Actions and update PHPUnit Test Suite to pass from PHP7.1 to 8.1.
685ae62
to
35e9266
Compare
Once this is merged I'll create this PR jakejackson1#2 upsteam 👍 |
Hey @arthurkushman. Any feedback on this PR? |
Seems a good PR, why isn't this being merged? I'm using it on our module and it fixes the PHP 8.1 issues. |
@salesigniter could be @arthurkushman is no longer available, hasn't had the time to review and merge, or is no longer interested in maintaining the package. If nothing is heard soon I'll look at creating another fork of the library and publishing on Packagist. |
Ok, thanks to you both for your hard work on this 🙂 |
Hi @jakejackson1 |
@luigimannoni no. I was hoping @arthurkushman would merge this PR so a fork wasn't necessary, but it's becoming more and more likely that is what I will need to do. |
Thanks, that would be helpful. I would do it myself through the packagist website but I'd rather leave you to take credit for it. If you decide to publish it, can you add a replace directive on the composer.json? It'll help project dependencies to fetch your version of the package instead the non-working one. Thanks again |
@luigimannoni I have finished forking QueryPath and publishing to Packagist https://packagist.org/packages/gravitypdf/querypath The fork includes the PHP8.1 work in this PR, code formatting from jakejackson1#2, and a bunch of changes to ensure our team and the development community can easily report issues and contribute to the library. See https://github.com/GravityPDF/querypath/releases/tag/3.2.0 for a summary. Note: we did a manual fork of QueryPath so that GitHub doesn't automatically create pull requests upstream every time a PR is opened (which can't be turned off as far as I can tell). This will make it easily to maintain long term. We ensured the manual fork included the branches and tags, as well as relevant issues from the original repo and the fork. |
Thanks @jakejackson1 |
Getting the following when fetching the iterator
from what I can understand: public function getIterator(): \Traversable changes its typehint to public function getIterator(): mixed or perhaps a pseudo This is triggering from a simple foreach: $all_images = $this->q->top()->find('img:not(noscript img)');
if ( ($all_images instanceof \Traversable) ) {
/** @var DOMQuery $element */
foreach ($all_images as $element) {
[...]
}
} |
This PR:
Note: The GitHub Actions won't get run until merged into the master branch, but you can see they all pass in my fork.
I'll create another PR that includes a linter, fixes up any lint errors, and will do automatic linting on the library on commits using GitHub Actions too.