Hello everyone!
I have some questions regarding rule exceptions. In the example below, we are using the @Entity annotation, but the rule is still being applied. Is there any additional step required for this exception to work correctly?
Example:
<?php
namespace X\Y\Z;
/**
* Description of MyClass
*
* @author ABC DEF <abc@def.com.br>
* @Entity(repositoryClass="X\Y\Z\MyClassRepository")
* @Table(name="my_class")
* @Requisito RF000
* @HasLifecycleCallbacks
*/
class MyClass implements IMyInterface {...}
My apologies, I’ve had to redact some information to avoid privacy or security concerns.
-
Which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension):
- SonarQube ID information
Version: 26.2.0.119303
Date: 2026-03-26
- SonarQube ID information
-
how is SonarQube deployed: zip, Docker, Helm:
- Docker
-
what are you trying to achieve:
- We are looking to have the PHP rule S1448 (“Classes should not have too many methods”) ignore classes that are marked with the
@Entityannotation.
- We are looking to have the PHP rule S1448 (“Classes should not have too many methods”) ignore classes that are marked with the
-
what have you tried so far to achieve this:
- We verified that the
@Entityannotation is correctly placed in the docblock of the PHP class.
- We verified that the
I appreciate your support so far!

