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

linter: expanded deprecated for calling const, property and instances of classes #1248

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Hidanio
Copy link
Contributor

@Hidanio Hidanio commented Feb 24, 2025

Now we have deprecated and deprecatedUntagged rule that could be apply for methods and functions.
I expanded it for calling const, property and instances of classes

@Hidanio Hidanio force-pushed the hidanio/deprecated_calls branch 3 times, most recently from 9b6d7b5 to 82a5b14 Compare February 26, 2025 13:43
@Hidanio Hidanio changed the title prototype: deprecated for new class calling linter: expanded deprecated for calling const, property and instances of classes Feb 26, 2025
@Hidanio Hidanio marked this pull request as ready for review February 26, 2025 13:51
@Hidanio Hidanio force-pushed the hidanio/deprecated_calls branch from 82a5b14 to 27506c0 Compare February 26, 2025 14:03
@Hidanio
Copy link
Contributor Author

Hidanio commented Feb 26, 2025

Level notice for deprecated and deprecatedUntagged

@Hidanio Hidanio self-assigned this Feb 26, 2025
@Hidanio Hidanio added the enhancement New feature or request label Feb 26, 2025
@Hidanio Hidanio force-pushed the hidanio/deprecated_calls branch from 27506c0 to 2ff400c Compare February 26, 2025 14:13
@Hidanio Hidanio force-pushed the hidanio/deprecated_calls branch from 2ff400c to f21c8de Compare March 6, 2025 14:09
func (d *rootWalker) parsePHPDocVar(doc phpdoc.Comment) (typesMap types.Map) {
for _, part := range doc.Parsed {
part, ok := part.(*phpdoc.TypeVarCommentPart)
func (d *rootWalker) parsePHPDocVar(doc phpdoc.Comment) (typesMap types.Map, deprecationInfo meta.DeprecationInfo) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DeprecationInfo should not be part of parsePHPDocVar, even the function name says that on parses var tag.

Copy link
Contributor Author

@Hidanio Hidanio Mar 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case the contex of Var - variable (property). See parseConstPHPDoc, parseClassPHPDoc: in all cases we are parse everything

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

Successfully merging this pull request may close these issues.

3 participants