For packages wanting to support multiple major versions of PHPUnit (from 9 to latest in the case of prophecy-phpunit), it would be great to be able to define hook methods in a way supported in all versions without getting deprecations. See phpspec/prophecy-phpunit#60 for the discussion.
My suggestion would be supporting to define both the attribute and the annotation on the test method. Such cases should ignore the annotation entirely (making the corresponding attribute provide the configuration) without reporting a deprecation in PHPUnit 11 about the annotation being deprecated.
What do you think about this proposal ?