Skip to content
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

Fix wording in attribute reference #2691

Open
alcaeus opened this issue Oct 18, 2024 · 2 comments
Open

Fix wording in attribute reference #2691

alcaeus opened this issue Oct 18, 2024 · 2 comments

Comments

@alcaeus
Copy link
Member

alcaeus commented Oct 18, 2024

The attribute reference refers to parameters of attributes as "attributes", most likely as a leftover from when it was the annotation reference and wasn't as confusing. The following alternatives come to mind:

  • options: this can be confusing and makes for awkward wording, as in "the xyz option is optional" and implies that everything is optional
  • arguments: this is most likely the better choice, using the same wording used in general for parameter values in method calls
  • parameters: used interchangeably with arguments, but technically incorrect as it refers to the variables listed in a declaration

I would suggest replacing all mentions of option, attribute, etc. when talking about arguments with argument.

@malarzm
Copy link
Member

malarzm commented Oct 18, 2024

+1 for arguments, PHP docs are also using them https://www.php.net/manual/en/language.attributes.syntax.php

Arguments to the attribute are optional, but are enclosed in the usual parenthesis (). Arguments to attributes can only be literal values or constant expressions. Both positional and named arguments syntax can be used.

@jmikola
Copy link
Member

jmikola commented Oct 18, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants