Skip to content

Deprecated attribute #96

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

Closed
Tracked by #97
Crell opened this issue Sep 3, 2024 · 6 comments
Closed
Tracked by #97

Deprecated attribute #96

Crell opened this issue Sep 3, 2024 · 6 comments

Comments

@Crell
Copy link
Collaborator

Crell commented Sep 3, 2024

PHP now has a #[Deprecated] attribute. As PER-CS, do we care and are there any guidelines we should put around it, or it is out of scope? (Out of scope is fully acceptable, I just want to be explicit about it.)

@Crell Crell mentioned this issue Sep 3, 2024
12 tasks
@Crell
Copy link
Collaborator Author

Crell commented Sep 3, 2024

The only thing I can think of for us to try and standardize is wording for the deprecation message. I don't know if it's too early for that, though.

@TimWolla
Copy link
Contributor

TimWolla commented Sep 4, 2024

php/php-src#14750 might be of interest regarding samples of wording used in PHP itself.

@samdark
Copy link
Member

samdark commented Sep 4, 2024

The placement of attributes is the scope of the coding style but the message itself... I don't think so.

@Crell
Copy link
Collaborator Author

Crell commented Oct 7, 2024

I will mark this as closed with no action needed in ~3 days unless someone from the WG objects.

@KorvinSzanto
Copy link
Contributor

I agree this should be closed without changes but I do think there might be opportunity to add some "SHOULD"s around using attributes to specify metadata in general when available. I wonder if we could recommend people use the Deprecated attribute and others like Override without being too specific about what to use when.

Maybe something like:

Attributable constructs such as classes, methods, properties, class constants, functions, parameters, etc. SHOULD include relevant descriptive attributes where available and necessary. For example, if a method is considered "deprecated" by the codebase, a \Deprecated or equivalent attribute SHOULD be used to specify.

But that might be too general

@Crell
Copy link
Collaborator Author

Crell commented Oct 15, 2024

No action required.

@Crell Crell closed this as completed Oct 15, 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

4 participants