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

📦 Ignore .phpstorm.meta.php because this is not PHP file #6594

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

andrew-demb
Copy link
Contributor

Replaces #6593

Refs: #6593 (comment)

// this file cannot be interpreted as PHP file
// https://www.jetbrains.com/help/phpstorm/ide-advanced-metadata.html#expected-arguments
->notName('.phpstorm.meta.php')
;
Copy link
Member

Choose a reason for hiding this comment

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

I think we should not need to enable dot files by default, eg:

public function withRootFiles(bool $includeDotFiles = false)

ensure be safe by default, while still hardcoded this obvious .phpstorm.meta.php so no change by default.

Then you can add condition:

if ($includeDotFiles) {
     $rootPhpFilesFinder->ignoreDotFiles(false);
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm OK with all options (enable for all dotfiles except known risky, enable for known dotfiles, provide an argument, etc)

Copy link
Member

@samsonasik samsonasik Dec 15, 2024

Choose a reason for hiding this comment

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

I am for:

  • disable by default (make optional)
  • still exclude .phpstorm.meta.php as known risky

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@TomasVotruba, what do you think about this?

@samsonasik
Copy link
Member

Let's merge to keep forward and ensure other PR on sync not hung up on run rector.

Let's see how next improvement will happen

@samsonasik samsonasik merged commit 3e2e579 into rectorphp:main Dec 16, 2024
41 checks passed
@samsonasik
Copy link
Member

Thank you @andrew-demb

@andrew-demb andrew-demb deleted the exclude-phpstorm-meta branch December 16, 2024 11:37
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