Closed pascalheidmann closed 1 year ago
Data provider can't be private.
@ondrejmirtes not sure about this. We are having several private dataProvider
s and tests are running fine. But also PHPUnit 9.6 so not sure about phpunit 10.
See: https://github.com/sebastianbergmann/phpunit/issues/5115
PHPUnit documentation states (https://docs.phpunit.de/en/10.1/writing-tests-for-phpunit.html#data-providers) - even in older versions:
A data provider method must be
public
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
We are using
phpunit
9.6 and are preparing for migrating to phpunit 10 which wants itsdataProvider
s to be static. Gladly phpunit supports staticdataProvider
s already in 9.6 (or even longer?). Sadly phpstan is now detecting thosedataProvider
s as unused.