-
Notifications
You must be signed in to change notification settings - Fork 46
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
PHPCompatibility #205
Comments
Hi @mackensen, When I run the PHPCompatibility ruleset directly against moodle-local_ldap's countable branch, is_countable shows up for me along with several other issues.
|
If possible, I recommend using the moodle-plugin-ci as part of your GitHub actions: https://github.com/moodlehq/moodle-plugin-ci/blob/master/gha.dist.yml You'll probably need to customize it a bit to make sure you are testing the appropriate combinations. Here's the version we're using for the moodle-mod_zoom plugin: https://github.com/ncstate-delta/moodle-mod_zoom/blob/main/.github/workflows/ci.yml |
@jrchamp Thanks for those sample results, that's helpful. I haven't implemented GHA for this plugin (yet) because I haven't come up with a good solution for the OpenLDAP support (I need to able to load the custom eduPerson schema). I use GHA for all my other plugins and like it. I realized on reviewing that I'd excluded locallib.php from code-checker at some point in the past. I don't remember why. Removing that means I get results now, though oddly enough still not the right ones. This is a run for PHP 7.1, but it looks like PHP 8.0 results: https://app.travis-ci.com/github/LafColITS/moodle-local_ldap/jobs/596885638. I guess that's a function of moodlehq/moodle-local_codechecker#109. |
Yeah, it looks like moodle-plugin-ci might not be setting a testVersion value, which seems to prevent PHPCompatibility from showing new functions/features.
|
I may just be misunderstanding something about the PHPCompatibility checker. I added
is_countable()
on https://github.com/LafColITS/moodle-local_ldap/tree/countable to deal with some PHP 8.0 wonkiness. That code is also tested against PHP 7.1, so it ought to fail, and doesn't. I assume the PHPUnit test succeeds because of a polyfill in the dev dependency, but I wouldn't think that would affect static analysis.The text was updated successfully, but these errors were encountered: