- Issue created by @BenStallings
phpstan reports,
Unsafe usage of new static().
π‘ See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
for AutologoutController, AutologoutBlockForm, AutologoutSettingsForm, and AutologoutWarningBlock. Additionally, for ConfigAutologoutRoles, it says
\Drupal calls should be avoided in classes, use dependency injection instead
phpstan analyse autologout
Use the pattern $instance = parent::create()
instead of re-implementing __construct() on child classes. In AutologoutWarningBlock, mark __construct() as final. In ConfigAutologoutRoles, implement create() to inject the dependency.
make an MR
Active
2.0
Code