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

Setting Option::FILE_EXTENSIONS does not preserve .php suffix #6008

Closed
mglaman opened this issue Mar 29, 2021 · 1 comment
Closed

Setting Option::FILE_EXTENSIONS does not preserve .php suffix #6008

mglaman opened this issue Mar 29, 2021 · 1 comment
Labels

Comments

@mglaman
Copy link

mglaman commented Mar 29, 2021

Bug Report

Subject Details
Rector version Rector dev-main@{no ref
Installed as Project dependency

In palantirnet/drupal-rector#134 we are upgrading to Rector 0.10. We add the Drupal-specific file extensions, however, it turned out nothing was being processed. We set the file extensions without including .php and it turns out, this caused nothing to process.

Minimal PHP Code Causing Issue

Configuration

    $parameters->set(Option::FILE_EXTENSIONS, [
      'module',
      'theme',
      'install',
      'profile',
      'inc',
      'engine'
    ]);

Expected Behaviour

While adding custom file extensions, I would expect .php to still be analyzed.

@TomasVotruba
Copy link
Member

Hi,

the 'php' must be in file exensions explicitly. Any other behavior would be too magical and impossible to exclude.

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

No branches or pull requests

2 participants