From ae90b36fd889df143a9505cb95ce9d2078ca4aff Mon Sep 17 00:00:00 2001
From: Liam Morland <liam@openplus.ca>
Date: Wed, 6 Mar 2024 13:18:17 -0500
Subject: [PATCH] Issue #3426100: Ignore "Unsafe usage of new static()" errors
 from phpstan, as recommended

https://www.drupal.org/docs/develop/development-tools/phpstan/handling-unsafe-usage-of-new-static

This usage of "new static()" is a Drupal best practice.
---
 phpstan.neon | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 phpstan.neon

diff --git a/phpstan.neon b/phpstan.neon
new file mode 100644
index 0000000..c4819cf
--- /dev/null
+++ b/phpstan.neon
@@ -0,0 +1,9 @@
+includes:
+  - phar://phpstan.phar/conf/bleedingEdge.neon
+
+parameters:
+  level: 1
+  reportUnmatchedIgnoredErrors: false
+  ignoreErrors:
+    # new static() is a best practice in Drupal, so we cannot fix that.
+    - "#^Unsafe usage of new static#"
-- 
GitLab