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

Ignore “Unsafe usage of new static()” warning #187

Merged
merged 1 commit into from
Oct 9, 2020

Conversation

kasperg
Copy link
Contributor

@kasperg kasperg commented Oct 7, 2020

This causes too many problems in Drupal were Drupal always uses new static instead of new self.

Initialize an empty array of errors to ignore and let different types
of checks modify it. This way we support multiple check types where
each add their own errors to ignore.

This closes #136.

@kasperg
Copy link
Contributor Author

kasperg commented Oct 7, 2020

Tests are failing because of errors: Reflection error: Drupal\Tests\PhpunitCompatibilityTrait not found.. This seems to be related to mglaman/phpstan-drupal#143.

@mglaman
Copy link
Owner

mglaman commented Oct 8, 2020

Thanks, @kasperg ! I'm resolving the phpstan-drupal issue and then merging this

This causes too many problems in Drupal were Drupal always uses new 
static instead of self.

Initialize an empty array of errors to ignore and let different types
of checks modify it. This way we support multiple check types where
each add their own errors to ignore.
@mglaman
Copy link
Owner

mglaman commented Oct 9, 2020

Rebased on master with phpstan-drupal fixes, lets see what happens!

@mglaman mglaman merged commit 9af16ad into mglaman:master Oct 9, 2020
bramtenhove added a commit to goalgorilla/open_social that referenced this pull request Jan 20, 2021
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

Successfully merging this pull request may close these issues.

Unsafe usage of new static() errors
2 participants