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

Allow custom config to be used #280

Closed
Dropa opened this issue Aug 12, 2022 · 1 comment
Closed

Allow custom config to be used #280

Dropa opened this issue Aug 12, 2022 · 1 comment

Comments

@Dropa
Copy link

Dropa commented Aug 12, 2022

With #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

Dropa pushed a commit to Dropa/drupal-check-1 that referenced this issue Aug 12, 2022
@mglaman
Copy link
Owner

mglaman commented Mar 27, 2023

Use PHPStan directly, instead

@mglaman mglaman closed this as completed Mar 27, 2023
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

2 participants