Right now we can define the Layer attribute in the method or in the class which has this method.
It's not great to enforce developers to add this attribute to all classes, because most of the time it's the same for all test classes inside of the layer directory and each test class in the layer may have an abstract class.
For example:
#[Layer('unit')]
abstract class UnitTestCase {}
#[Layer('integration')]
abstract class IntegrationTestCase {}
final class SomePureTests extends UnitTestCase {}
final class SomeDbTests extends IntegrationTestCase {}
1 level deep search for the attribute is enough.
Right now we can define the Layer attribute in the method or in the class which has this method.
It's not great to enforce developers to add this attribute to all classes, because most of the time it's the same for all test classes inside of the layer directory and each test class in the layer may have an abstract class.
For example:
1 level deep search for the attribute is enough.