It doesn't matter if the class defined as final or not, the test always passes. The same situation happens when testing that class should not be readonly, due to the same reason.
test('entity classes should not be final')
->expect('App\Domain\Entity')
->classes()
->not->toBeFinal();
What Happened
Together with installed package nunomaduro/mock-final-classes, which uses dg/bypass-finals under the hood, execution of the following test produces false result.
It doesn't matter if the class defined as final or not, the test always passes. The same situation happens when testing that class should not be readonly, due to the same reason.
How to Reproduce
Sample Repository
No response
Pest Version
2.34.0
PHP Version
8.3.2
Operation System
Linux
Notes
Probably it should be somehow possible to disable dg/bypass-finals when running architecture tests.