When sniffing my Drupal 8 theme I am getting the following error:

   26 | WARNING | [ ] Class name must be prefixed with the project name "JoinupTheme.info" (DrupalPractice.General.ClassName.ClassPrefix)

This should be project name "JoinupTheme".

This is happening because in the info files in Drupal 8 have the extension *.info.yml while in Drupal 7 is it *.info.

Comments

pfrenssen created an issue. See original summary.

pfrenssen’s picture

Status: Active » Needs review
tmanhollan’s picture

Status: Needs review » Reviewed & tested by the community
Related issues: +#2935388: phpcs throwing warning for hook_form_alter in *.theme file.

I'm experiencing the behavior described in https://www.drupal.org/project/coder/issues/2935388. The patch on that issue and your PR both resolve the issue for me, but I think yours is more complete by addressing the info.yml file.

pfrenssen’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the review and for linking that issue! I will merge the PR and mark the other issue as a duplicate.

tmanhollan’s picture

You're welcome, thanks for the fix!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.