PHPUnit 7 declares void on the template methods, so an override without it is an incompatible signature and a fatal error rather than a warning.
protected function setUp(): void
{
parent::setUp();
$this->repo = new InMemoryOrders();
}
protected function tearDown(): void
{
parent::tearDown();
}
It is a mechanical change across every test class and a sed will do it, with the caveat that setUpBeforeClass and tearDownAfterClass are static and need the same treatment. Forgetting parent::setUp() is the other classic and produces failures that look nothing like the cause — the framework’s own initialisation never runs. This is the upgrade’s one genuinely breaking change and it is worth doing in its own commit.