Closed Piairre closed 3 months ago
Hi,
thaks for reporting this.
It seems that you're using PHPUnit 11. But Foundry still have not taken the phpunit 10 train, nor the whole Symfony world... we are more or less waiting for symfony phpunit bridge. I think you can add these warnings to a baseline, for sure when phpunit 12 will be released, we will use attributes :innocent:
@Piairre, can you confirm if a test has the docblock AND the corresponding attribute, the deprecation is removed? I think the solution here is to have the attribute in addition to the docblock.
From : https://docs.phpunit.de/en/11.0/annotations.html
PHPUnit will first look for metadata in attributes before it looks for annotations in comments. When metadata is found in attributes, metadata in comments is ignored. Support for metadata in comments is closed for further development: bugs will be fixed, but no new functionality will be implemented based on annotations.
this means the migration can be done smoothly
Should be fixed by #562.
We are currently writing functionals tests. We implement our test files with Factories and ResetDatabase this way:
Our tests pass, but we have this warning: Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.
It appears on the
_setUpFactories
,_tearDownFactories
,_resetDatabase
and_resetSchema
methods.It appears that annotations will soon no longer be supported.