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

PHP 8.1 compatibility error: "$this" can no longer be used in a plain function or method since PHP 7.1 #617

Open
harikagujjula opened this issue Sep 26, 2022 · 0 comments

Comments

@harikagujjula
Copy link

Running into PHP compatibility errors on "drupal-extension/doc/_static/snippets/context-communication.inc"

Command used:
phpcs vendor/drupal --standard=PHPCompatibility --runtime-set testVersion 8.1

13 | ERROR | "$this" can no longer be used in a plain function or method since PHP 7.1.

14 | ERROR | "$this" can no longer be used in a plain function or method since PHP 7.1.

Proposed solution:

  • $this can be removed as it appears to be a static function.

Using phpcs - 3.7.1, phpcompatibility - 9.3.5 (latest versions available).

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

1 participant