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

Apply rector to the self .phpstorm.meta.php #6593

Closed

Conversation

andrew-demb
Copy link
Contributor

Extracted from #6592

@TomasVotruba
Copy link
Member

I'm curious, what is a reason behind this change?

In the docs https://www.jetbrains.com/help/phpstorm/ide-advanced-metadata.html#expected-arguments, only static syntax is allowed.

Screenshot from 2024-12-15 19-18-12

@andrew-demb
Copy link
Contributor Author

@TomasVotruba This is an automated change by Rector - after introducing "include dotfiles for withRootFiles" - Rector refactored this file.

Why rector refactored \PHPStan\PhpDocParser\Ast\Node::getAttribute() to the (new Node())->getAttribute() - because getAttribute is not a static method.

Should I add an ignore rule for .phpstorm.meta.php in rector.php?

@TomasVotruba
Copy link
Member

I think we have to be more careful here.

How would this be handled in the wild? We don't want Rector breaking this file on next update.

@andrew-demb
Copy link
Contributor Author

We can hardcode ignoring this filename in the withRootFiles to avoid applying rector to this file (which can not be interpreted by PHP)

@TomasVotruba
Copy link
Member

Sounds good 👍

@andrew-demb
Copy link
Contributor Author

Closed in favor #6594

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

Successfully merging this pull request may close these issues.

2 participants