v2.9.0
This release deprecates Factories and ResetDatabase traits in favor of the usage of the PHPUnit extension shipped with Foundry. These features mainly impact users using PHPUnit >= 10.
You can now remove all usages of the Factories trait. And replace the trait ResetDatabase with the attribute #[ResetDatabase]. Rectors sets are shipped with the release, see https://github.com/zenstruck/foundry/blob/2.x/UPGRADE-2.9.md.
You can even automate the reset database mechanism:
<!-- phpunit.xml -->
<phpunit>
<extensions>
<bootstrap class="Zenstruck\Foundry\PHPUnit\FoundryExtension">
<parameter name="enabled-auto-reset" value="true"/>
</bootstrap>
</extensions>
</phpunit>
This will automatically reset the database before all tests. With this configuration, even traits can be omitted.