@dataProvider
annotation rejects previously valid method name style
#5288
Labels
feature/data-provider
Data Providers
feature/metadata/annotations
type/bug
Something is broken
version/10
Something affects PHPUnit 10
Summary
In PHPUnit 10, the
@dataProvider
annotation got unexpectedly stricter. Specifically, in previous versions I commonly wrote this:The
()
on the end of the provider method was ignored. As of v10, it is no longer ignored. This is going to create... a lot of drudge work changing all of my provider references to remove the ().Ideally they'd convert to attributes at some point, but annotations are still supported for now and this was an unexpected snag.
Current behavior
The code example above gives an error along the lines of:
(Note the double
()
in what it thinks is the method name, indicating that v10 thinks the()
is part of the method name.)How to reproduce
See code example above.
Expected behavior
As in v9, the
()
should be stripped off and ignored. Or if that's not feasible, this would be something to mention in the upgrading docs as it's an unexpected break.The text was updated successfully, but these errors were encountered: