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

Undefined property : $input_superglobals #6

Open
MTaimoor79 opened this issue Nov 1, 2023 · 5 comments
Open

Undefined property : $input_superglobals #6

MTaimoor79 opened this issue Nov 1, 2023 · 5 comments

Comments

@MTaimoor79
Copy link

Getting error in a file which is in marketplace test files instead of showing an error in my file

FILE: ...\app\public\wp-content\plugins\my-plugin\my-plugin.php

FOUND 1 ERROR AFFECTING 1 LINE

1 | ERROR | An error occurred during processing; checking has been
| | aborted. The error message was: Undefined property:
| | ET\ElegantThemes\Sniffs\ValidatedSanitizedInputSniff::$input_superglobals
| | in C:\Users\pc\Local
| | Sites\divi-assistant-developement\app\public\wp-content\plugins\marketplace-phpcs\Sniffs\ValidatedSanitizedInputSniff.php
| | on line 80

@divibooster
Copy link

I'm seeing the same issue. It looks like the affected sniff is extending WordPressCS\WordPress\Sniff from https://github.com/WordPress/WordPress-Coding-Standards but that base class has been refactored (as of v3.0.0) to remove the $input_superglobals property.

A work around for now is to downgrade to v2.3.0, e.g. by specifying this in composer.json:

   "require-dev": {
		...
        "wp-coding-standards/wpcs": "2.3.0",
		...
    },

stracker-phil pushed a commit to divimode/marketplace-phpcs that referenced this issue Nov 8, 2023
@stracker-phil
Copy link

Thanks for pointing out the workaround, @divibooster 👍
With that change, the PHPCS completes smoothly again

@divibooster
Copy link

Glad it helped, @stracker-phil, and thanks for setting up the fork :)

@stracker-phil
Copy link

Ha, nice job on spotting the fork 😄
Btw, I've just updated the phpcs rules the checks will pass php7 syntax.

https://github.com/divimode/marketplace-phpcs/

@divibooster
Copy link

Cool, I'll check that out shortly :)

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

No branches or pull requests

3 participants