-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Allow single #[Examples] attribute #6812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
e6edd61
6ecb81e
2e03756
c2a260f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line nu 10000 mber | Diff line change |
---|---|---|
|
@@ -39,7 +39,8 @@ private function close1(AttrsTester $I) | |
} | ||
|
||
#[Group('e1')] | ||
#[Examples([1, 1], [2, 2])] | ||
#[Examples(1, 1)] | ||
#[Examples(2, 2)] | ||
Comment on lines
+42
to
+43
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As already mentioned in #6752 (comment) this is a slight BC break introduced by this PR. However, the behavior doesn't seem to be documented and from DX perspective I would prefer the new behavior. Any thoughts about this are welcome. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The first syntax allows for dereferencing from arrays using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Shouldn't this still be possible by just passing an array as example, f.e.
Do you mean that the new syntax breaks generators? Can you provide an example? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @SamMousa Any news about this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I dont remember exactly. I don't remember this PR (it's been a while, so feel free to ignore this comment and merge if you like it. |
||
public function exampleTest(AttrsTester $I, Example $e) | ||
{ | ||
$I->assertEquals($e[1], $e[0]); | ||
|
Uh oh!
There was an error while loading. Please reload this page.