drupal-check
drupal-check copied to clipboard
Allow custom config to be used
With https://github.com/mglaman/drupal-check/issues/266 the tool now reports errors on lines that are conflicting with how Drupal is normally made.
For example,
function my_module_page_attachments(array &$attachments): void {
results in
11 Function my_module_page_attachments() has parameter $attachments with no
value type specified in iterable type array.
💡 See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type
and there is no way to fix the issue without conflicting with drupal coding standard or counter-intuitively repeat the full documentation of hook.
To overcome issues of these type, it should be possible include custom neon file. Ideally of course this type of errors wouldn't be reported in the first place