Problem/Motivation

Even for this simple module, it's good to add a functional test to ensure classes are added to the node. In the issue: https://www.drupal.org/project/node_class/issues/3582631, I added pipelines.

Issue fork node_class-3582656

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

vitaliyb98 created an issue. See original summary.

vitaliyb98’s picture

Status: Active » Needs review

anybody made their first commit to this issue’s fork.

anybody’s picture

Priority: Minor » Normal
Status: Needs review » Needs work

Nice @vitaliyb98! I added some comments and this will need the new permission!

vitaliyb98’s picture

Status: Needs work » Needs review

Made changes according to your comments, however, "phpstan (previous major)" failed because

 Line   tests/src/Functional/NodeClassTest.php                              
 ------ -------------------------------------------------------------------- 
  15     Attribute class                                                     
         PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses does not   
         exist.                                                              
  16     Attribute class PHPUnit\Framework\Attributes\Group does not exist.  
anybody’s picture

@vitaliyb98 thanks, I think that annotation may not be supported in D10?

vitaliyb98’s picture

Yes, I think it can be ignored using // @phpstan-ignore attribute.notFound, but not sure that is a good idea

vitaliyb98’s picture

@anybody, I added phpstan.neon with an exception for those notices from phpstan pipelines for previous major version (similar approach used for commerce module: https://git.drupalcode.org/project/commerce/-/blob/3.x/phpstan.neon?ref_...)

anybody’s picture

Status: Needs review » Needs work

Mhm I don't really like that approach. It will mute these errors not only for previous major. Even though Commerce does it...

Instead then let's allow phpstan to fail for previous major (in .gitlab-ci.yml)

vitaliyb98’s picture

Hi, nice idea, will do that soon

vitaliyb98’s picture

Status: Needs work » Needs review
anybody’s picture

Status: Needs review » Reviewed & tested by the community

Great! Thank you @vitaliyb98! Merging!

anybody’s picture

The failing test will heal itself with Drupal 10 EOL / D12.

anybody’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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