vscode-intelephense icon indicating copy to clipboard operation
vscode-intelephense copied to clipboard

Respect .php-cs-fixer.php

Open muuvmuuv opened this issue 2 years ago • 0 comments

Feature description or problem with existing feature

Intelephense already runs some PSR12 rules, but we use and have extended php-cs-fixer. Currently, we have set up a separate php-cs-fixer-extension in VS Code that runs it, but would like to reduce the boilerplate for new developers and just use one extension.

.php-cs-fixer.php
<?php

$finder = PhpCsFixer\Finder::create()
  ->exclude('storage')
  ->exclude('bootstrap/cache')
  ->exclude('vendor')
  ->in(__DIR__);

$config = new PhpCsFixer\Config();

return $config->setRules([
  '@PSR12' => true,
  '@Symfony' => true,
  'method_chaining_indentation' => true,
  'array_indentation' => true,
  'concat_space' => ['spacing' => 'one'],
])
  ->setFinder($finder)
  ->setLineEnding("\n")
  ->setIndent('  ');

Describe the solution you'd like

I would appreciate it if Intelephense could hook into that and use the appropriate config.

Additional context

php-cs-fixer != PHP CodeSniffer

muuvmuuv avatar Sep 13 '22 07:09 muuvmuuv