- ๐ฎ๐นItaly mondrake ๐ฎ๐น
#28 actually that's true: https://www.drupal.org/project/drupal/issues/3445106#comment-15587547 ๐ Replace @dataProvider annotations with #[DataProvider()] attributes Postponed you can have attributes and annotations in the same test in PHPUnit 9, apparently. Need probably to decide what to use where though, to avoid duplication and possible mistakes.
- ๐ฎ๐นItaly mondrake ๐ฎ๐น
Just noticed CR is there already, https://www.drupal.org/node/3447698; โ please review
- ๐ฌ๐งUnited Kingdom catch
can't do that alas - attributes are a PHPUnit 10+ thing, and D10 is testing with PHPUnit 9.
But if we're doing the discovery, does PHPUnit 9 care? (apologies if this is a silly question). Is the problem that the attribute class wouldn't exist?
- ๐ฎ๐นItaly mondrake ๐ฎ๐น
@catch
backport this to 10.x
can't do that alas - attributes are a PHPUnit 10+ thing, and D10 is testing with PHPUnit 9.
should we have a follow-up to try to use phpunit's discovery or did you end up deciding that's too far off
- Must do prerequisite is ๐ Ensure run-tests.sh and PHPUnit CLI run with the same list of tests to be executed Active to make sure we are testing the same things
- It's not far ( ๐ Refactor PhpUnitTestRunner and TestRun internal classes Active latest revision is doing that already), but it's ... slow. The logic in that issue is to run PHPUnit's CLI to build the test list in a xml file, then parse that file to build the internal list in PHP. That takes time, also considering that PHPUnit invokes dataproviders to build the full testcases list. It's not dramatic in CI context but locally the difference is visible.
- ๐ฌ๐งUnited Kingdom catch
This could use an issue summary update and a change record to indicate that attributes will be supported. We'll need to decide if we backport this to 10.x so that contrib tests using group attributes, I think that has to be a yes if we want people to use it.
Also should we have a follow-up to try to use phpunit's discovery or did you end up deciding that's too far off?